<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthewrogers</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthewrogers"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Matthewrogers"/>
	<updated>2026-04-30T12:12:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=22786</id>
		<title>K8s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=22786"/>
		<updated>2022-12-20T04:28:47Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: /* 2. Node Setup 🖥️ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; K8s in 10 Minutes =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This guide will allow you to deploy a fresh Alpine Linux install into a Kubernetes K8 cluster in less than 10 minutes.&lt;br /&gt;
&lt;br /&gt;
== Why &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;sparkles&amp;quot;&amp;gt;✨&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
I went to learn Kubernetes recently and I built a k3 cluster using Alpine in an hour or so, it was a great experience. I figured the next step would be K8s, but I found no material on K8s for Alpine. This guide is the result of my first pass and the incorporations of high quality notes from the contributers. Kubernetes &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;unicorn&amp;quot;&amp;gt;🦄&amp;lt;/span&amp;gt; is awesome.&lt;br /&gt;
&lt;br /&gt;
== Contributers ==&lt;br /&gt;
&lt;br /&gt;
* Matthew Rogers [https://github.com/RamboRogers Github] [https://www.linkedin.com/in/matthewrogerscissp/ LinkedIn]&lt;br /&gt;
* Mike Zolla [https://github.com/Zolla-Zolla Github] [https://www.linkedin.com/in/mike-zolla-5903b8/ LinkedIn]&lt;br /&gt;
* Matthew Emmett [https://github.com/mattemmett Github] [https://www.linkedin.com/in/mattemmett/ LinkedIn]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
= Build K8s on Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
=== Prerequisits &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mag&amp;quot;&amp;gt;🔍&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
You need an [https://alpinelinux.org/ Alpine Linux] install (this guide is written against version 3.15 standard image) with internet access. I recommend at least 2 CPU with 4GB of ram and 10GB of disk for each node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;For HA control planes you&#039;ll need a mininum of three nodes&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== 1. Setup the Repositories &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;green_book&amp;quot;&amp;gt;📗&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Update you repositories under /etc/apk/repositories to include community, edge community and testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/community&lt;br /&gt;
#http://dl-cdn.alpinelinux.org/alpine/edge/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/community&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== 2. Node Setup &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;desktop_computer&amp;quot;&amp;gt;🖥️&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This series of commands solves a series is incremental problems and sets up the system (if the first control node) for kubectl/kubeadm to run properly on next login by linking the config.&lt;br /&gt;
&lt;br /&gt;
The result here gives you a functional node that can be joined to an existing cluster or can become the first control plane of a new cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;notes&amp;quot;&amp;gt;🎶&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;*** &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; This build assumes CNI usage of flannel for networking &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; ***&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#add kernel module for networking stuff&lt;br /&gt;
echo &amp;quot;br_netfilter&amp;quot; &amp;gt; /etc/modules-load.d/k8s.conf&lt;br /&gt;
modprobe br_netfilter&lt;br /&gt;
apk add cni-plugin-flannel&lt;br /&gt;
apk add cni-plugins&lt;br /&gt;
apk add flannel&lt;br /&gt;
apk add flannel-contrib-cni&lt;br /&gt;
apk add kubelet&lt;br /&gt;
apk add kubeadm&lt;br /&gt;
apk add kubectl&lt;br /&gt;
apk add docker&lt;br /&gt;
apk add uuidgen&lt;br /&gt;
apk add nfs-utils&lt;br /&gt;
#get rid of swap&lt;br /&gt;
cat /etc/fstab | grep -v swap &amp;gt; temp.fstab&lt;br /&gt;
cat temp.fstab &amp;gt; /etc/fstab&lt;br /&gt;
rm temp.fstab&lt;br /&gt;
swapoff -a&lt;br /&gt;
#Fix prometheus errors&lt;br /&gt;
mount --make-rshared /&lt;br /&gt;
echo &amp;quot;#!/bin/sh&amp;quot; &amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
echo &amp;quot;mount --make-rshared /&amp;quot; &amp;gt;&amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
chmod +x /etc/local.d/sharemetrics.start&lt;br /&gt;
rc-update add local&lt;br /&gt;
#Fix id error messages&lt;br /&gt;
uuidgen &amp;gt; /etc/machine-id&lt;br /&gt;
#Add services&lt;br /&gt;
rc-update add docker&lt;br /&gt;
rc-update add kubelet&lt;br /&gt;
#Sync time&lt;br /&gt;
rc-update add ntpd&lt;br /&gt;
/etc/init.d/ntpd start&lt;br /&gt;
/etc/init.d/docker start&lt;br /&gt;
#fix flannel&lt;br /&gt;
ln -s /usr/libexec/cni/flannel-amd64 /usr/libexec/cni/flannel&lt;br /&gt;
#kernel stuff&lt;br /&gt;
echo &amp;quot;net.bridge.bridge-nf-call-iptables=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl net.bridge.bridge-nf-call-iptables=1&lt;br /&gt;
#Pin your versions!  If you update and the nodes get out of sync, it implodes.&lt;br /&gt;
apk add &#039;kubelet=~1.23&#039;&lt;br /&gt;
apk add &#039;kubeadm=~1.23&#039;&lt;br /&gt;
apk add &#039;kubectl=~1.23&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your blank node is now ready! If it&#039;s the first, you&#039;ll want to make a control node.&lt;br /&gt;
&lt;br /&gt;
=== 3. Setup the Control Plane (New Cluster!) &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mechanical_arm&amp;quot;&amp;gt;🦾&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this command to start the cluster and then apply a network.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#do not change subnet&lt;br /&gt;
kubeadm init --pod-network-cidr=10.244.0.0/16 --node-name=master&lt;br /&gt;
mkdir ~/.kube&lt;br /&gt;
ln -s /etc/kubernetes/admin.conf /root/.kube/config&lt;br /&gt;
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You now have a control plane. This also gives you the command to run on our blank nodes to add them to this cluster as workers.&lt;br /&gt;
&lt;br /&gt;
=== 4. Join the cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;ant&amp;quot;&amp;gt;🐜&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this to get the join command from the control plane which you would then run on your new worker.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kubeadm token create --print-join-command &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Bonus &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;moneybag&amp;quot;&amp;gt;💰&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
== Setup NFS Mounts on K8s ==&lt;br /&gt;
&lt;br /&gt;
This can be shared NFS storage to allow for auto persistent claim fulfilment. You&#039;ll need your IP updated and export information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/&lt;br /&gt;
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \&lt;br /&gt;
    --set nfs.server=192.168.1.31 \&lt;br /&gt;
    --set nfs.path=/exports/cluster00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now set the default storage class for the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get storageclass&lt;br /&gt;
kubectl patch storageclass nfs-client -p &#039;{&amp;amp;quot;metadata&amp;amp;quot;: {&amp;amp;quot;annotations&amp;amp;quot;:{&amp;amp;quot;storageclass.kubernetes.io/is-default-class&amp;amp;quot;:&amp;amp;quot;true&amp;amp;quot;}}}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Check on System &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;eyes&amp;quot;&amp;gt;👀&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Check on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get nodes&lt;br /&gt;
kubectl get all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=22785</id>
		<title>K8s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=22785"/>
		<updated>2022-12-20T04:27:31Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; K8s in 10 Minutes =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This guide will allow you to deploy a fresh Alpine Linux install into a Kubernetes K8 cluster in less than 10 minutes.&lt;br /&gt;
&lt;br /&gt;
== Why &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;sparkles&amp;quot;&amp;gt;✨&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
I went to learn Kubernetes recently and I built a k3 cluster using Alpine in an hour or so, it was a great experience. I figured the next step would be K8s, but I found no material on K8s for Alpine. This guide is the result of my first pass and the incorporations of high quality notes from the contributers. Kubernetes &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;unicorn&amp;quot;&amp;gt;🦄&amp;lt;/span&amp;gt; is awesome.&lt;br /&gt;
&lt;br /&gt;
== Contributers ==&lt;br /&gt;
&lt;br /&gt;
* Matthew Rogers [https://github.com/RamboRogers Github] [https://www.linkedin.com/in/matthewrogerscissp/ LinkedIn]&lt;br /&gt;
* Mike Zolla [https://github.com/Zolla-Zolla Github] [https://www.linkedin.com/in/mike-zolla-5903b8/ LinkedIn]&lt;br /&gt;
* Matthew Emmett [https://github.com/mattemmett Github] [https://www.linkedin.com/in/mattemmett/ LinkedIn]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
= Build K8s on Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
=== Prerequisits &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mag&amp;quot;&amp;gt;🔍&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
You need an [https://alpinelinux.org/ Alpine Linux] install (this guide is written against version 3.15 standard image) with internet access. I recommend at least 2 CPU with 4GB of ram and 10GB of disk for each node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;For HA control planes you&#039;ll need a mininum of three nodes&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== 1. Setup the Repositories &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;green_book&amp;quot;&amp;gt;📗&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Update you repositories under /etc/apk/repositories to include community, edge community and testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/community&lt;br /&gt;
#http://dl-cdn.alpinelinux.org/alpine/edge/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/community&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== 2. Node Setup &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;desktop_computer&amp;quot;&amp;gt;🖥️&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This series of commands solves a series is incremental problems and sets up the system (if the first control node) for kubectl/kubeadm to run properly on next login by linking the config.&lt;br /&gt;
&lt;br /&gt;
The result here gives you a functional node that can be joined to an existing cluster or can become the first control plane of a new cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;notes&amp;quot;&amp;gt;🎶&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;*** &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; This build assumes CNI usage of flannel for networking &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; ***&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#add kernel module for networking stuff&lt;br /&gt;
echo &amp;quot;br_netfilter&amp;quot; &amp;gt; /etc/modules-load.d/k8s.conf&lt;br /&gt;
modprobe br_netfilter&lt;br /&gt;
apk add cni-plugin-flannel&lt;br /&gt;
apk add cni-plugins&lt;br /&gt;
apk add flannel&lt;br /&gt;
apk add flannel-contrib-cni&lt;br /&gt;
apk add kubelet&lt;br /&gt;
apk add kubeadm&lt;br /&gt;
apk add kubectl&lt;br /&gt;
apk add docker&lt;br /&gt;
apk add uuidgen&lt;br /&gt;
apk add nfs-utils&lt;br /&gt;
#get rid of swap&lt;br /&gt;
cat /etc/fstab | grep -v swap &amp;gt; temp.fstab&lt;br /&gt;
cat temp.fstab &amp;gt; /etc/fstab&lt;br /&gt;
rm temp.fstab&lt;br /&gt;
swapoff -a&lt;br /&gt;
#Fix prometheus errors&lt;br /&gt;
mount --make-rshared /&lt;br /&gt;
echo &amp;quot;#!/bin/sh&amp;quot; &amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
echo &amp;quot;mount --make-rshared /&amp;quot; &amp;gt;&amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
chmod +x /etc/local.d/sharemetrics.start&lt;br /&gt;
rc-update add local&lt;br /&gt;
#Fix id error messages&lt;br /&gt;
uuidgen &amp;gt; /etc/machine-id&lt;br /&gt;
#Add services&lt;br /&gt;
rc-update add docker&lt;br /&gt;
rc-update add kubelet&lt;br /&gt;
#Sync time&lt;br /&gt;
rc-update add ntpd&lt;br /&gt;
/etc/init.d/ntpd start&lt;br /&gt;
/etc/init.d/docker start&lt;br /&gt;
#fix flannel&lt;br /&gt;
ln -s /usr/libexec/cni/flannel-amd64 /usr/libexec/cni/flannel&lt;br /&gt;
#kernel stuff&lt;br /&gt;
echo &amp;quot;net.bridge.bridge-nf-call-iptables=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl net.bridge.bridge-nf-call-iptables=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your blank node is now ready! If it&#039;s the first, you&#039;ll want to make a control node.&lt;br /&gt;
&lt;br /&gt;
=== 3. Setup the Control Plane (New Cluster!) &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mechanical_arm&amp;quot;&amp;gt;🦾&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this command to start the cluster and then apply a network.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#do not change subnet&lt;br /&gt;
kubeadm init --pod-network-cidr=10.244.0.0/16 --node-name=master&lt;br /&gt;
mkdir ~/.kube&lt;br /&gt;
ln -s /etc/kubernetes/admin.conf /root/.kube/config&lt;br /&gt;
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You now have a control plane. This also gives you the command to run on our blank nodes to add them to this cluster as workers.&lt;br /&gt;
&lt;br /&gt;
=== 4. Join the cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;ant&amp;quot;&amp;gt;🐜&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this to get the join command from the control plane which you would then run on your new worker.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kubeadm token create --print-join-command &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Bonus &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;moneybag&amp;quot;&amp;gt;💰&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
== Setup NFS Mounts on K8s ==&lt;br /&gt;
&lt;br /&gt;
This can be shared NFS storage to allow for auto persistent claim fulfilment. You&#039;ll need your IP updated and export information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/&lt;br /&gt;
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \&lt;br /&gt;
    --set nfs.server=192.168.1.31 \&lt;br /&gt;
    --set nfs.path=/exports/cluster00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now set the default storage class for the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get storageclass&lt;br /&gt;
kubectl patch storageclass nfs-client -p &#039;{&amp;amp;quot;metadata&amp;amp;quot;: {&amp;amp;quot;annotations&amp;amp;quot;:{&amp;amp;quot;storageclass.kubernetes.io/is-default-class&amp;amp;quot;:&amp;amp;quot;true&amp;amp;quot;}}}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Check on System &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;eyes&amp;quot;&amp;gt;👀&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Check on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get nodes&lt;br /&gt;
kubectl get all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=22635</id>
		<title>K8s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=22635"/>
		<updated>2022-10-21T14:10:05Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: /* 2. Node Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Linux K8s in 10 Minutes =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This guide will allow you to deploy a fresh Alpine Linux install into a Kubernetes K8 cluster in less than 10 minutes.&lt;br /&gt;
&lt;br /&gt;
== Why ==&lt;br /&gt;
&lt;br /&gt;
I went to learn Kubernetes recently and I built a k3 cluster using Alpine in an hour or so, it was a great experience. I figured the next step would be K8s, but I found no material on K8s for Alpine. This guide is the result of my first pass and the incorporations of high quality notes from the contributers. Kubernetes is awesome.&lt;br /&gt;
&lt;br /&gt;
== Contributers ==&lt;br /&gt;
&lt;br /&gt;
* Matthew Rogers [https://github.com/RamboRogers Github] [https://www.linkedin.com/in/matthewrogerscissp/ LinkedIn]&lt;br /&gt;
* Mike Zolla [https://github.com/Zolla-Zolla Github] [https://www.linkedin.com/in/mike-zolla-5903b8/ LinkedIn]&lt;br /&gt;
* Matthew Emmett [https://github.com/mattemmett Github] [https://www.linkedin.com/in/mattemmett/ LinkedIn]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
= Build K8s on Alpine Linux =&lt;br /&gt;
&lt;br /&gt;
=== Prerequisits ===&lt;br /&gt;
&lt;br /&gt;
You need an [https://alpinelinux.org/ Alpine Linux] install (this guide is written against version 3.15 standard image) with internet access. I recommend at least 2 CPU with 4GB of ram and 10GB of disk for each node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;For HA control planes you&#039;ll need a mininum of three nodes&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== 1. Setup the Repositories ===&lt;br /&gt;
&lt;br /&gt;
Update you repositories under /etc/apk/repositories to include community, edge community and testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/community&lt;br /&gt;
#http://dl-cdn.alpinelinux.org/alpine/edge/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/community&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== 2. Node Setup ===&lt;br /&gt;
&lt;br /&gt;
This series of commands solves a series is incremental problems and sets up the system (if the first control node) for kubectl/kubeadm to run properly on next login by linking the config.&lt;br /&gt;
&lt;br /&gt;
The result here gives you a functional node that can be joined to an existing cluster or can become the first control plane of a new cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;notes&amp;quot;&amp;gt;🎶&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;*** This build assumes CNI usage of flannel for networking ***&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#add kernel module for networking stuff&lt;br /&gt;
echo &amp;quot;br_netfilter&amp;quot; &amp;gt; /etc/modules-load.d/k8s.conf&lt;br /&gt;
modprobe br_netfilter&lt;br /&gt;
apk add cni-plugin-flannel&lt;br /&gt;
apk add cni-plugins&lt;br /&gt;
apk add flannel&lt;br /&gt;
apk add flannel-contrib-cni&lt;br /&gt;
apk add kubelet&lt;br /&gt;
apk add kubeadm&lt;br /&gt;
apk add kubectl&lt;br /&gt;
apk add docker&lt;br /&gt;
apk add uuidgen&lt;br /&gt;
apk add nfs-utils&lt;br /&gt;
&lt;br /&gt;
#Pin your versions!  If you update and the nodes get out of sync, it implodes.&lt;br /&gt;
apk add &#039;kubelet=~1.23&#039;&lt;br /&gt;
apk add &#039;kubeadm=~1.23&#039;&lt;br /&gt;
apk add &#039;kubectl=~1.23&#039;&lt;br /&gt;
&lt;br /&gt;
#get rid of swap&lt;br /&gt;
cat /etc/fstab | grep -v swap &amp;gt; temp.fstab&lt;br /&gt;
cat temp.fstab &amp;gt; /etc/fstab&lt;br /&gt;
rm temp.fstab&lt;br /&gt;
swapoff -a&lt;br /&gt;
#Fix prometheus errors&lt;br /&gt;
mount --make-rshared /&lt;br /&gt;
echo &amp;quot;#!/bin/sh&amp;quot; &amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
echo &amp;quot;mount --make-rshared /&amp;quot; &amp;gt;&amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
chmod +x /etc/local.d/sharemetrics.start&lt;br /&gt;
rc-update add local&lt;br /&gt;
#Fix id error messages&lt;br /&gt;
uuidgen &amp;gt; /etc/machine-id&lt;br /&gt;
#Add services&lt;br /&gt;
rc-update add docker&lt;br /&gt;
rc-update add kubelet&lt;br /&gt;
#Sync time&lt;br /&gt;
rc-update add ntpd&lt;br /&gt;
/etc/init.d/ntpd start&lt;br /&gt;
/etc/init.d/docker start&lt;br /&gt;
#fix flannel&lt;br /&gt;
ln -s /usr/libexec/cni/flannel-amd64 /usr/libexec/cni/flannel&lt;br /&gt;
#kernel stuff&lt;br /&gt;
echo &amp;quot;net.bridge.bridge-nf-call-iptables=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl net.bridge.bridge-nf-call-iptables=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your blank node is now ready! If it&#039;s the first, you&#039;ll want to make a control node.&lt;br /&gt;
&lt;br /&gt;
=== 3. Setup the Control Plane (New Cluster!) ===&lt;br /&gt;
&lt;br /&gt;
Run this command to start the cluster and then apply a network.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#do not change subnet&lt;br /&gt;
kubeadm init --pod-network-cidr=10.244.0.0/16 --node-name=master&lt;br /&gt;
mkdir ~/.kube&lt;br /&gt;
ln -s /etc/kubernetes/admin.conf /root/.kube/config&lt;br /&gt;
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You now have a control plane. This also gives you the command to run on our blank nodes to add them to this cluster as workers.&lt;br /&gt;
&lt;br /&gt;
=== 4. Join the cluster. ===&lt;br /&gt;
&lt;br /&gt;
Run this to get the join command from the control plane which you would then run on your new worker.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kubeadm token create --print-join-command &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Bonus =&lt;br /&gt;
&lt;br /&gt;
== Setup NFS Mounts on K8s ==&lt;br /&gt;
&lt;br /&gt;
This can be shared NFS storage to allow for auto persistent claim fulfilment. You&#039;ll need your IP updated and export information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/&lt;br /&gt;
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \&lt;br /&gt;
    --set nfs.server=192.168.1.31 \&lt;br /&gt;
    --set nfs.path=/exports/cluster00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now set the default storage class for the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get storageclass&lt;br /&gt;
kubectl patch storageclass nfs-client -p &#039;{&amp;amp;quot;metadata&amp;amp;quot;: {&amp;amp;quot;annotations&amp;amp;quot;:{&amp;amp;quot;storageclass.kubernetes.io/is-default-class&amp;amp;quot;:&amp;amp;quot;true&amp;amp;quot;}}}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Check on System ==&lt;br /&gt;
&lt;br /&gt;
Check on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get nodes&lt;br /&gt;
kubectl get all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21725</id>
		<title>K8s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21725"/>
		<updated>2022-04-14T14:37:05Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: /* 2. Node Setup 🖥️ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; K8s in 10 Minutes =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This guide will allow you to deploy a fresh Alpine Linux install into a Kubernetes K8 cluster in less than 10 minutes.&lt;br /&gt;
&lt;br /&gt;
== Why &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;sparkles&amp;quot;&amp;gt;✨&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
I went to learn Kubernetes recently and I built a k3 cluster using Alpine in an hour or so, it was a great experience. I figured the next step would be K8s, but I found no material on K8s for Alpine. This guide is the result of my first pass and the incorporations of high quality notes from the contributers. Kubernetes &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;unicorn&amp;quot;&amp;gt;🦄&amp;lt;/span&amp;gt; is awesome.&lt;br /&gt;
&lt;br /&gt;
== Contributers ==&lt;br /&gt;
&lt;br /&gt;
* Matthew Rogers [https://github.com/RamboRogers Github] [https://www.linkedin.com/in/matthewrogerscissp/ LinkedIn]&lt;br /&gt;
* Mike Zolla [https://github.com/Zolla-Zolla Github] [https://www.linkedin.com/in/mike-zolla-5903b8/ LinkedIn]&lt;br /&gt;
* Matthew Emmett [https://github.com/mattemmett Github] [https://www.linkedin.com/in/mattemmett/ LinkedIn]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
= Build K8s on Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
=== Prerequisits &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mag&amp;quot;&amp;gt;🔍&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
You need an [https://alpinelinux.org/ Alpine Linux] install (this guide is written against version 3.15 standard image) with internet access. I recommend at least 2 CPU with 4GB of ram and 10GB of disk for each node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;For HA control planes you&#039;ll need a mininum of three nodes&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== 1. Setup the Repositories &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;green_book&amp;quot;&amp;gt;📗&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Update you repositories under /etc/apk/repositories to include community, edge community and testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/community&lt;br /&gt;
#http://dl-cdn.alpinelinux.org/alpine/edge/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/community&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== 2. Node Setup &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;desktop_computer&amp;quot;&amp;gt;🖥️&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This series of commands solves a series is incremental problems and sets up the system (if the first control node) for kubectl/kubeadm to run properly on next login by linking the config.&lt;br /&gt;
&lt;br /&gt;
The result here gives you a functional node that can be joined to an existing cluster or can become the first control plane of a new cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;notes&amp;quot;&amp;gt;🎶&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;*** &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; This build assumes CNI usage of flannel for networking &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; ***&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#add kernel module for networking stuff&lt;br /&gt;
echo &amp;quot;br_netfilter&amp;quot; &amp;gt; /etc/modules-load.d/k8s.conf&lt;br /&gt;
modprobe br_netfilter&lt;br /&gt;
apk add cni-plugin-flannel&lt;br /&gt;
apk add cni-plugins&lt;br /&gt;
apk add flannel&lt;br /&gt;
apk add flannel-contrib-cni&lt;br /&gt;
apk add kubelet&lt;br /&gt;
apk add kubeadm&lt;br /&gt;
apk add kubectl&lt;br /&gt;
apk add docker&lt;br /&gt;
apk add uuidgen&lt;br /&gt;
apk add nfs-utils&lt;br /&gt;
#get rid of swap&lt;br /&gt;
cat /etc/fstab | grep -v swap &amp;gt; temp.fstab&lt;br /&gt;
cat temp.fstab &amp;gt; /etc/fstab&lt;br /&gt;
rm temp.fstab&lt;br /&gt;
swapoff -a&lt;br /&gt;
#Fix prometheus errors&lt;br /&gt;
mount --make-rshared /&lt;br /&gt;
echo &amp;quot;#!/bin/sh&amp;quot; &amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
echo &amp;quot;mount --make-rshared /&amp;quot; &amp;gt;&amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
chmod +x /etc/local.d/sharemetrics.start&lt;br /&gt;
rc-update add local&lt;br /&gt;
#Fix id error messages&lt;br /&gt;
uuidgen &amp;gt; /etc/machine-id&lt;br /&gt;
#Add services&lt;br /&gt;
rc-update add docker&lt;br /&gt;
rc-update add kubelet&lt;br /&gt;
#Sync time&lt;br /&gt;
rc-update add ntpd&lt;br /&gt;
/etc/init.d/ntpd start&lt;br /&gt;
/etc/init.d/docker start&lt;br /&gt;
#fix flannel&lt;br /&gt;
ln -s /usr/libexec/cni/flannel-amd64 /usr/libexec/cni/flannel&lt;br /&gt;
#kernel stuff&lt;br /&gt;
echo &amp;quot;net.bridge.bridge-nf-call-iptables=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl net.bridge.bridge-nf-call-iptables=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your blank node is now ready! If it&#039;s the first, you&#039;ll want to make a control node.&lt;br /&gt;
&lt;br /&gt;
=== 3. Setup the Control Plane (New Cluster!) &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mechanical_arm&amp;quot;&amp;gt;🦾&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this command to start the cluster and then apply a network.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#do not change subnet&lt;br /&gt;
kubeadm init --pod-network-cidr=10.244.0.0/16 --node-name=master&lt;br /&gt;
mkdir ~/.kube&lt;br /&gt;
ln -s /etc/kubernetes/admin.conf /root/.kube/config&lt;br /&gt;
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You now have a control plane. This also gives you the command to run on our blank nodes to add them to this cluster as workers.&lt;br /&gt;
&lt;br /&gt;
=== 4. Join the cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;ant&amp;quot;&amp;gt;🐜&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this to get the join command from the control plane which you would then run on your new worker.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kubeadm token create --print-join-command &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Bonus &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;moneybag&amp;quot;&amp;gt;💰&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
== Setup NFS Mounts on K8s ==&lt;br /&gt;
&lt;br /&gt;
This can be shared NFS storage to allow for auto persistent claim fulfilment. You&#039;ll need your IP updated and export information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/&lt;br /&gt;
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \&lt;br /&gt;
    --set nfs.server=192.168.1.31 \&lt;br /&gt;
    --set nfs.path=/exports/cluster00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now set the default storage class for the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get storageclass&lt;br /&gt;
kubectl patch storageclass nfs-client -p &#039;{&amp;amp;quot;metadata&amp;amp;quot;: {&amp;amp;quot;annotations&amp;amp;quot;:{&amp;amp;quot;storageclass.kubernetes.io/is-default-class&amp;amp;quot;:&amp;amp;quot;true&amp;amp;quot;}}}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Check on System &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;eyes&amp;quot;&amp;gt;👀&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Check on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get nodes&lt;br /&gt;
kubectl get all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21724</id>
		<title>K8s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21724"/>
		<updated>2022-04-13T14:22:01Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: /* 3. Setup the Control Plane (New Cluster!) 🦾 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; K8s in 10 Minutes =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This guide will allow you to deploy a fresh Alpine Linux install into a Kubernetes K8 cluster in less than 10 minutes.&lt;br /&gt;
&lt;br /&gt;
== Why &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;sparkles&amp;quot;&amp;gt;✨&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
I went to learn Kubernetes recently and I built a k3 cluster using Alpine in an hour or so, it was a great experience. I figured the next step would be K8s, but I found no material on K8s for Alpine. This guide is the result of my first pass and the incorporations of high quality notes from the contributers. Kubernetes &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;unicorn&amp;quot;&amp;gt;🦄&amp;lt;/span&amp;gt; is awesome.&lt;br /&gt;
&lt;br /&gt;
== Contributers ==&lt;br /&gt;
&lt;br /&gt;
* Matthew Rogers [https://github.com/RamboRogers Github] [https://www.linkedin.com/in/matthewrogerscissp/ LinkedIn]&lt;br /&gt;
* Mike Zolla [https://github.com/Zolla-Zolla Github] [https://www.linkedin.com/in/mike-zolla-5903b8/ LinkedIn]&lt;br /&gt;
* Matthew Emmett [https://github.com/mattemmett Github] [https://www.linkedin.com/in/mattemmett/ LinkedIn]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
= Build K8s on Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
=== Prerequisits &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mag&amp;quot;&amp;gt;🔍&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
You need an [https://alpinelinux.org/ Alpine Linux] install (this guide is written against version 3.15 standard image) with internet access. I recommend at least 2 CPU with 4GB of ram and 10GB of disk for each node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;For HA control planes you&#039;ll need a mininum of three nodes&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== 1. Setup the Repositories &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;green_book&amp;quot;&amp;gt;📗&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Update you repositories under /etc/apk/repositories to include community, edge community and testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/community&lt;br /&gt;
#http://dl-cdn.alpinelinux.org/alpine/edge/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/community&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== 2. Node Setup &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;desktop_computer&amp;quot;&amp;gt;🖥️&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This series of commands solves a series is incremental problems and sets up the system (if the first control node) for kubectl/kubeadm to run properly on next login by linking the config.&lt;br /&gt;
&lt;br /&gt;
The result here gives you a functional node that can be joined to an existing cluster or can become the first control plane of a new cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;notes&amp;quot;&amp;gt;🎶&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;*** &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; This build assumes CNI usage of flannel for networking &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; ***&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#add kernel module for networking stuff&lt;br /&gt;
echo &amp;quot;br_netfilter&amp;quot; &amp;gt; /etc/modules-load.d/k8s.conf&lt;br /&gt;
modprobe br_netfilter&lt;br /&gt;
apk add cni-plugin-flannel&lt;br /&gt;
apk add cni-plugins&lt;br /&gt;
apk add flannel&lt;br /&gt;
apk add flannel-contrib-cni&lt;br /&gt;
apk add kubelet&lt;br /&gt;
apk add kubeadm&lt;br /&gt;
apk add kubectl&lt;br /&gt;
apk add docker&lt;br /&gt;
apk add uuidgen&lt;br /&gt;
#get rid of swap&lt;br /&gt;
cat /etc/fstab | grep -v swap &amp;gt; temp.fstab&lt;br /&gt;
cat temp.fstab &amp;gt; /etc/fstab&lt;br /&gt;
rm temp.fstab&lt;br /&gt;
swapoff -a&lt;br /&gt;
#Fix prometheus errors&lt;br /&gt;
mount --make-rshared /&lt;br /&gt;
echo &amp;quot;#!/bin/sh&amp;quot; &amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
echo &amp;quot;mount --make-rshared /&amp;quot; &amp;gt;&amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
chmod +x /etc/local.d/sharemetrics.start&lt;br /&gt;
rc-update add local&lt;br /&gt;
#Fix id error messages&lt;br /&gt;
uuidgen &amp;gt; /etc/machine-id&lt;br /&gt;
#Add services&lt;br /&gt;
rc-update add docker&lt;br /&gt;
rc-update add kubelet&lt;br /&gt;
#Sync time&lt;br /&gt;
rc-update add ntpd&lt;br /&gt;
/etc/init.d/ntpd start&lt;br /&gt;
/etc/init.d/docker start&lt;br /&gt;
#fix flannel&lt;br /&gt;
ln -s /usr/libexec/cni/flannel-amd64 /usr/libexec/cni/flannel&lt;br /&gt;
#kernel stuff&lt;br /&gt;
echo &amp;quot;net.bridge.bridge-nf-call-iptables=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl net.bridge.bridge-nf-call-iptables=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your blank node is now ready! If it&#039;s the first, you&#039;ll want to make a control node.&lt;br /&gt;
&lt;br /&gt;
=== 3. Setup the Control Plane (New Cluster!) &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mechanical_arm&amp;quot;&amp;gt;🦾&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this command to start the cluster and then apply a network.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#do not change subnet&lt;br /&gt;
kubeadm init --pod-network-cidr=10.244.0.0/16 --node-name=master&lt;br /&gt;
mkdir ~/.kube&lt;br /&gt;
ln -s /etc/kubernetes/admin.conf /root/.kube/config&lt;br /&gt;
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You now have a control plane. This also gives you the command to run on our blank nodes to add them to this cluster as workers.&lt;br /&gt;
&lt;br /&gt;
=== 4. Join the cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;ant&amp;quot;&amp;gt;🐜&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this to get the join command from the control plane which you would then run on your new worker.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kubeadm token create --print-join-command &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Bonus &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;moneybag&amp;quot;&amp;gt;💰&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
== Setup NFS Mounts on K8s ==&lt;br /&gt;
&lt;br /&gt;
This can be shared NFS storage to allow for auto persistent claim fulfilment. You&#039;ll need your IP updated and export information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/&lt;br /&gt;
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \&lt;br /&gt;
    --set nfs.server=192.168.1.31 \&lt;br /&gt;
    --set nfs.path=/exports/cluster00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now set the default storage class for the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get storageclass&lt;br /&gt;
kubectl patch storageclass nfs-client -p &#039;{&amp;amp;quot;metadata&amp;amp;quot;: {&amp;amp;quot;annotations&amp;amp;quot;:{&amp;amp;quot;storageclass.kubernetes.io/is-default-class&amp;amp;quot;:&amp;amp;quot;true&amp;amp;quot;}}}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Check on System &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;eyes&amp;quot;&amp;gt;👀&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Check on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get nodes&lt;br /&gt;
kubectl get all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21708</id>
		<title>K8s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21708"/>
		<updated>2022-04-11T02:29:01Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; K8s in 10 Minutes =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This guide will allow you to deploy a fresh Alpine Linux install into a Kubernetes K8 cluster in less than 10 minutes.&lt;br /&gt;
&lt;br /&gt;
== Why &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;sparkles&amp;quot;&amp;gt;✨&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
I went to learn Kubernetes recently and I built a k3 cluster using Alpine in an hour or so, it was a great experience. I figured the next step would be K8s, but I found no material on K8s for Alpine. This guide is the result of my first pass and the incorporations of high quality notes from the contributers. Kubernetes &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;unicorn&amp;quot;&amp;gt;🦄&amp;lt;/span&amp;gt; is awesome.&lt;br /&gt;
&lt;br /&gt;
== Contributers ==&lt;br /&gt;
&lt;br /&gt;
* Matthew Rogers [https://github.com/RamboRogers Github] [https://www.linkedin.com/in/matthewrogerscissp/ LinkedIn]&lt;br /&gt;
* Mike Zolla [https://github.com/Zolla-Zolla Github] [https://www.linkedin.com/in/mike-zolla-5903b8/ LinkedIn]&lt;br /&gt;
* Matthew Emmett [https://github.com/mattemmett Github] [https://www.linkedin.com/in/mattemmett/ LinkedIn]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
= Build K8s on Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
=== Prerequisits &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mag&amp;quot;&amp;gt;🔍&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
You need an [https://alpinelinux.org/ Alpine Linux] install (this guide is written against version 3.15 standard image) with internet access. I recommend at least 2 CPU with 4GB of ram and 10GB of disk for each node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;For HA control planes you&#039;ll need a mininum of three nodes&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== 1. Setup the Repositories &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;green_book&amp;quot;&amp;gt;📗&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Update you repositories under /etc/apk/repositories to include community, edge community and testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/community&lt;br /&gt;
#http://dl-cdn.alpinelinux.org/alpine/edge/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/community&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== 2. Node Setup &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;desktop_computer&amp;quot;&amp;gt;🖥️&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This series of commands solves a series is incremental problems and sets up the system (if the first control node) for kubectl/kubeadm to run properly on next login by linking the config.&lt;br /&gt;
&lt;br /&gt;
The result here gives you a functional node that can be joined to an existing cluster or can become the first control plane of a new cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;notes&amp;quot;&amp;gt;🎶&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;*** &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; This build assumes CNI usage of flannel for networking &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; ***&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#add kernel module for networking stuff&lt;br /&gt;
echo &amp;quot;br_netfilter&amp;quot; &amp;gt; /etc/modules-load.d/k8s.conf&lt;br /&gt;
modprobe br_netfilter&lt;br /&gt;
apk add cni-plugin-flannel&lt;br /&gt;
apk add cni-plugins&lt;br /&gt;
apk add flannel&lt;br /&gt;
apk add flannel-contrib-cni&lt;br /&gt;
apk add kubelet&lt;br /&gt;
apk add kubeadm&lt;br /&gt;
apk add kubectl&lt;br /&gt;
apk add docker&lt;br /&gt;
apk add uuidgen&lt;br /&gt;
#get rid of swap&lt;br /&gt;
cat /etc/fstab | grep -v swap &amp;gt; temp.fstab&lt;br /&gt;
cat temp.fstab &amp;gt; /etc/fstab&lt;br /&gt;
rm temp.fstab&lt;br /&gt;
swapoff -a&lt;br /&gt;
#Fix prometheus errors&lt;br /&gt;
mount --make-rshared /&lt;br /&gt;
echo &amp;quot;#!/bin/sh&amp;quot; &amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
echo &amp;quot;mount --make-rshared /&amp;quot; &amp;gt;&amp;gt; /etc/local.d/sharemetrics.start&lt;br /&gt;
chmod +x /etc/local.d/sharemetrics.start&lt;br /&gt;
rc-update add local&lt;br /&gt;
#Fix id error messages&lt;br /&gt;
uuidgen &amp;gt; /etc/machine-id&lt;br /&gt;
#Add services&lt;br /&gt;
rc-update add docker&lt;br /&gt;
rc-update add kubelet&lt;br /&gt;
#Sync time&lt;br /&gt;
rc-update add ntpd&lt;br /&gt;
/etc/init.d/ntpd start&lt;br /&gt;
/etc/init.d/docker start&lt;br /&gt;
#fix flannel&lt;br /&gt;
ln -s /usr/libexec/cni/flannel-amd64 /usr/libexec/cni/flannel&lt;br /&gt;
#kernel stuff&lt;br /&gt;
echo &amp;quot;net.bridge.bridge-nf-call-iptables=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl net.bridge.bridge-nf-call-iptables=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your blank node is now ready! If it&#039;s the first, you&#039;ll want to make a control node.&lt;br /&gt;
&lt;br /&gt;
=== 3. Setup the Control Plane (New Cluster!) &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mechanical_arm&amp;quot;&amp;gt;🦾&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this command to start the cluster and then apply a network.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#do not change subnet&lt;br /&gt;
kubeadm init --pod-network-cidr=10.244.0.0/16 --node-name=master&lt;br /&gt;
#set up the networking&lt;br /&gt;
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml&lt;br /&gt;
#now you don&#039;t need to export&lt;br /&gt;
ln -s /etc/kubernetes/admin.conf /root/.kube/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You now have a control plane. This also gives you the command to run on our blank nodes to add them to this cluster as workers.&lt;br /&gt;
&lt;br /&gt;
=== 4. Join the cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;ant&amp;quot;&amp;gt;🐜&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this to get the join command from the control plane which you would then run on your new worker.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kubeadm token create --print-join-command &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Bonus &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;moneybag&amp;quot;&amp;gt;💰&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
== Setup NFS Mounts on K8s ==&lt;br /&gt;
&lt;br /&gt;
This can be shared NFS storage to allow for auto persistent claim fulfilment. You&#039;ll need your IP updated and export information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/&lt;br /&gt;
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \&lt;br /&gt;
    --set nfs.server=192.168.1.31 \&lt;br /&gt;
    --set nfs.path=/exports/cluster00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now set the default storage class for the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get storageclass&lt;br /&gt;
kubectl patch storageclass nfs-client -p &#039;{&amp;amp;quot;metadata&amp;amp;quot;: {&amp;amp;quot;annotations&amp;amp;quot;:{&amp;amp;quot;storageclass.kubernetes.io/is-default-class&amp;amp;quot;:&amp;amp;quot;true&amp;amp;quot;}}}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Check on System &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;eyes&amp;quot;&amp;gt;👀&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Check on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get nodes&lt;br /&gt;
kubectl get all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21707</id>
		<title>K8s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21707"/>
		<updated>2022-04-11T02:16:36Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: /* 4. Join the cluster. 🐜 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; K8s in 10 Minutes =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This guide will allow you to deploy a fresh Alpine Linux install into a Kubernetes K8 cluster in less than 10 minutes.&lt;br /&gt;
&lt;br /&gt;
== Why &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;sparkles&amp;quot;&amp;gt;✨&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
I went to learn Kubernetes recently and I built a k3 cluster using Alpine in an hour or so, it was a great experience. I figured the next step would be K8s, but I found no material on K8s for Alpine. This guide is the result of my first pass and the incorporations of high quality notes from the contributers. Kubernetes &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;unicorn&amp;quot;&amp;gt;🦄&amp;lt;/span&amp;gt; is awesome.&lt;br /&gt;
&lt;br /&gt;
== Contributers ==&lt;br /&gt;
&lt;br /&gt;
* Matthew Rogers [https://github.com/RamboRogers Github] [https://www.linkedin.com/in/matthewrogerscissp/ LinkedIn]&lt;br /&gt;
* Mike Zolla [https://github.com/Zolla-Zolla Github] [https://www.linkedin.com/in/mike-zolla-5903b8/ LinkedIn]&lt;br /&gt;
* Matthew Emmett [https://github.com/mattemmett Github] [https://www.linkedin.com/in/mattemmett/ LinkedIn]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
= Build K8s on Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
=== Prerequisits &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mag&amp;quot;&amp;gt;🔍&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
You need an [https://alpinelinux.org/ Alpine Linux] install (this guide is written against version 3.15 standard image) with internet access. I recommend at least 2 CPU with 4GB of ram and 10GB of disk for each node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;For HA control planes you&#039;ll need a mininum of three nodes&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== 1. Setup the Repositories &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;green_book&amp;quot;&amp;gt;📗&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Update you repositories under /etc/apk/repositories to include community, edge community and testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/community&lt;br /&gt;
#http://dl-cdn.alpinelinux.org/alpine/edge/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/community&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== 2. Node Setup &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;desktop_computer&amp;quot;&amp;gt;🖥️&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This series of commands solves a series is incremental problems and sets up the system (if the first control node) for kubectl/kubeadm to run properly on next login by linking the config.&lt;br /&gt;
&lt;br /&gt;
The result here gives you a functional node that can be joined to an existing cluster or can become the first control plane of a new cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;notes&amp;quot;&amp;gt;🎶&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;*** &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; This build assumes CNI usage of flannel for networking &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; ***&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#add kernel module for networking stuff&lt;br /&gt;
echo &amp;amp;quot;br_netfilter&amp;amp;quot; &amp;amp;gt; /etc/modules-load.d/k8s.conf&lt;br /&gt;
modprobe br_netfilter&lt;br /&gt;
apk add cni-plugin-flannel&lt;br /&gt;
apk add cni-plugins&lt;br /&gt;
apk add flannel&lt;br /&gt;
apk add flannel-contrib-cni&lt;br /&gt;
apk add kubelet&lt;br /&gt;
apk add kubeadm&lt;br /&gt;
apk add kubectl&lt;br /&gt;
apk add docker&lt;br /&gt;
apk add uuidgen&lt;br /&gt;
#get rid of swap&lt;br /&gt;
cat /etc/fstab | grep -v swap &amp;amp;gt; temp.fstab&lt;br /&gt;
cat temp.fstab &amp;amp;gt; /etc/fstab&lt;br /&gt;
rm temp.fstab&lt;br /&gt;
swapoff -a&lt;br /&gt;
#Fix prometheus errors&lt;br /&gt;
mount --make-rshared /&lt;br /&gt;
#Fix id error messages&lt;br /&gt;
uuidgen &amp;amp;gt; /etc/machine-id&lt;br /&gt;
#Add services&lt;br /&gt;
rc-update add docker&lt;br /&gt;
rc-update add kubelet&lt;br /&gt;
#Sync time&lt;br /&gt;
rc-update add ntpd&lt;br /&gt;
/etc/init.d/ntpd start&lt;br /&gt;
/etc/init.d/docker start&lt;br /&gt;
#create flannel link to where kubernetes expects it&lt;br /&gt;
ln -s /usr/libexec/cni/flannel-amd64 /usr/libexec/cni/flannel&lt;br /&gt;
#kernel stuff&lt;br /&gt;
echo &amp;amp;quot;net.bridge.bridge-nf-call-iptables=1&amp;amp;quot; &amp;amp;gt;&amp;amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl net.bridge.bridge-nf-call-iptables=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your blank node is now ready! If it&#039;s the first, you&#039;ll want to make a control node.&lt;br /&gt;
&lt;br /&gt;
=== 3. Setup the Control Plane (New Cluster!) &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mechanical_arm&amp;quot;&amp;gt;🦾&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this command to start the cluster and then apply a network.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#do not change subnet&lt;br /&gt;
kubeadm init --pod-network-cidr=10.244.0.0/16 --node-name=master&lt;br /&gt;
#set up the networking&lt;br /&gt;
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml&lt;br /&gt;
#now you don&#039;t need to export&lt;br /&gt;
ln -s /etc/kubernetes/admin.conf /root/.kube/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You now have a control plane. This also gives you the command to run on our blank nodes to add them to this cluster as workers.&lt;br /&gt;
&lt;br /&gt;
=== 4. Join the cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;ant&amp;quot;&amp;gt;🐜&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this to get the join command from the control plane which you would then run on your new worker.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kubeadm token create --print-join-command &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Bonus &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;moneybag&amp;quot;&amp;gt;💰&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
== Setup NFS Mounts on K8s ==&lt;br /&gt;
&lt;br /&gt;
This can be shared NFS storage to allow for auto persistent claim fulfilment. You&#039;ll need your IP updated and export information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/&lt;br /&gt;
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \&lt;br /&gt;
    --set nfs.server=192.168.1.31 \&lt;br /&gt;
    --set nfs.path=/exports/cluster00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now set the default storage class for the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get storageclass&lt;br /&gt;
kubectl patch storageclass nfs-client -p &#039;{&amp;amp;quot;metadata&amp;amp;quot;: {&amp;amp;quot;annotations&amp;amp;quot;:{&amp;amp;quot;storageclass.kubernetes.io/is-default-class&amp;amp;quot;:&amp;amp;quot;true&amp;amp;quot;}}}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Check on System &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;eyes&amp;quot;&amp;gt;👀&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Check on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get nodes&lt;br /&gt;
kubectl get all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=21699</id>
		<title>Tutorials and Howtos</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Tutorials_and_Howtos&amp;diff=21699"/>
		<updated>2022-04-07T22:50:29Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: /* Servers: deploy in production */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Todo|This material needs to be re-organized .. as &#039;&#039;&#039;Howtos are smaller articles&#039;&#039;&#039; and &#039;&#039;&#039;tutorials are more detailed document&#039;&#039;&#039; both need to be reordered as independent sections }}&lt;br /&gt;
&lt;br /&gt;
[[Image:package_edutainment.svg|right|link=]]&lt;br /&gt;
{{TOC left}}&lt;br /&gt;
&#039;&#039;&#039;Welcome to Tutorials and Howtos, a place of basic and advanced configuration tasks for your Alpine Linux.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The tutorials are hands-on&#039;&#039;&#039; and the reader is expected to try and achieve the goals described in each step, possibly with the help of a good example. The output in one step is the starting point for the following step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Howtos are smaller articles&#039;&#039;&#039; explaining how to perform a particular task with Alpine Linux, that expects a minimal knowledge from reader to perform actions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT:&#039;&#039;&#039; contributions on those pages must be complete articles as well as requesting topics to be covered, don&#039;t override already made contributions. If you want to request a topic, please add your request in this page&#039;s [[Talk:Tutorials_and_Howtos|Discussion]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
=== Postinstall ===&lt;br /&gt;
&lt;br /&gt;
* [[Post installation|Post installation notes]]&lt;br /&gt;
&lt;br /&gt;
==== Postinstall: desktops and applications ====&lt;br /&gt;
&lt;br /&gt;
* [[Desktop environments and Window managers]] (overall information only)&lt;br /&gt;
** [[Xfce]]&lt;br /&gt;
** [[LXQt]]&lt;br /&gt;
** [[Openbox]]&lt;br /&gt;
** [[MATE]]&lt;br /&gt;
* [[Alpine and UEFI|Alpine and UEFI Support Status and related topics]]&lt;br /&gt;
&lt;br /&gt;
==== Developers: compilers, IDEs and tools ====&lt;br /&gt;
&lt;br /&gt;
* [[Alpine newbie developer]]&lt;br /&gt;
** [[Alpine newbie developer: gitea|Alpine newbie developer: Git management web frontend gitea]]&lt;br /&gt;
** [[Alpine newbie developer: full stack web]]&lt;br /&gt;
&lt;br /&gt;
==== Servers: deploy in production ====&lt;br /&gt;
&lt;br /&gt;
* [[Alpine production deploy]]&lt;br /&gt;
** [[Production Web server: Lighttpd|Production web server: Lighttpd‎‎]]&lt;br /&gt;
** [[Production DataBases : mysql|Production database: MySql]]&lt;br /&gt;
** [[Production LAMP system: Lighttpd + PHP + MySQL‎‎]]&lt;br /&gt;
* Alpine production monitoring&lt;br /&gt;
** [[Cacti: traffic analysis and monitoring network]]&lt;br /&gt;
** [[Zabbix|Zabbix - the professional complete manager]]&lt;br /&gt;
* Kubernetes&lt;br /&gt;
** [[K8s]] Building a K8s Cluster on Alpine Linux&lt;br /&gt;
&lt;br /&gt;
== Storage ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039; &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up disks manually]] &amp;lt;!-- Installation and Storage --&amp;gt;&lt;br /&gt;
* [[Setting up a software RAID array]]&lt;br /&gt;
&amp;lt;!-- ** [[Setting up a /var partition on software IDE raid1]]  Obsolete, Installation and Storage --&amp;gt; &lt;br /&gt;
* [[Raid Administration]]&lt;br /&gt;
* [[Setting up encrypted volumes with LUKS]]&lt;br /&gt;
* [[Setting up LVM on LUKS]]&lt;br /&gt;
* [[Setting up Logical Volumes with LVM]]&lt;br /&gt;
** [[Setting up LVM on GPT-labeled disks]]&lt;br /&gt;
** [[Installing on GPT LVM]]&lt;br /&gt;
* [[Filesystems|Formatting HD/Floppy/Other]] &amp;lt;!-- just a stub --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up iSCSI]]&lt;br /&gt;
** [[iSCSI Raid and Clustered File Systems]]&lt;br /&gt;
* [[Setting up NBD]]&lt;br /&gt;
* [[Setting up ZFS on LUKS]]&lt;br /&gt;
* [[Setting up ZFS with native encryption]]&lt;br /&gt;
* [[High performance SCST iSCSI Target on Linux software Raid]] &#039;&#039;(deprecated)&#039;&#039; &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
* [[Linux iSCSI Target (TCM)]]&lt;br /&gt;
* [[Disk Replication with DRBD]] &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Burning ISOs]] &amp;lt;!-- just some links now --&amp;gt;&lt;br /&gt;
* [[Partitioning and Bootmanagers]]&lt;br /&gt;
* [[Migrating data]]&lt;br /&gt;
* [[Create a bootable SDHC from a Mac]]&lt;br /&gt;
* [[Alpine on ARM]]&lt;br /&gt;
&lt;br /&gt;
== Networking ==&lt;br /&gt;
&lt;br /&gt;
* [[Configure Networking]]&lt;br /&gt;
* [[Connecting to a wireless access point]]&lt;br /&gt;
* [[Bonding]]&lt;br /&gt;
* [[Vlan]]&lt;br /&gt;
* [[Bridge]]&lt;br /&gt;
* [[Bridge wlan0 to eth0]]&lt;br /&gt;
* [[OpenVSwitch]]&lt;br /&gt;
* [[How to configure static routes]]&lt;br /&gt;
* [[Configure a Wireguard interface (wg)]]&lt;br /&gt;
&lt;br /&gt;
* [[Alpine Wall]] - [[How-To Alpine Wall]] - [[Alpine Wall User&#039;s Guide]] &#039;&#039;(a new firewall management framework)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[PXE boot]]&lt;br /&gt;
&lt;br /&gt;
* [[Using serial modem]]&lt;br /&gt;
* [[Using HSDPA modem]]&lt;br /&gt;
* [[Setting up Satellite Internet Connection]]&lt;br /&gt;
* [[Using Alpine on Windows domain with IPSEC isolation]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a SSH server]] &#039;&#039;(Using SSH is the preferred way to administer your box remotely)&#039;&#039; &amp;lt;!-- Server and Networking --&amp;gt;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
* [[How to setup a wireless access point]] &#039;&#039;(Setting up Secure Wireless AP w/ WPA encryption with bridge to wired network)&#039;&#039;&lt;br /&gt;
* [[How to set up Alpine as a wireless router]] &#039;&#039;(Setting up a firewalled, Wireless AP with wired network on a Pi Zero W)&#039;&#039;&lt;br /&gt;
* [[Setting up a OpenVPN server with Alpine]] &#039;&#039;(Allowing single users or devices to remotely connect to your network)&#039;&#039;&lt;br /&gt;
&amp;lt;!-- [[Using Racoon for Remote Sites]] is a different VPN tunnelling method, but that article is just a stub --&amp;gt;&lt;br /&gt;
* [[Experiences with OpenVPN-client on ALIX.2D3]]  &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Generating SSL certs with ACF]] &amp;lt;!-- Generating SSL certs with ACF 1.9 --&amp;gt;&lt;br /&gt;
* [[Setting up unbound DNS server]]&lt;br /&gt;
* [[Setting up nsd DNS server]]&lt;br /&gt;
* [[TinyDNS Format]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]] &amp;lt;!-- solution --&amp;gt;&lt;br /&gt;
* [[Freeradius Active Directory Integration]]&lt;br /&gt;
* [[Multi_ISP]] &#039;&#039;(Dual-ISP setup with load-balancing and automatic failover)&#039;&#039;&lt;br /&gt;
* [[OwnCloud]] &#039;&#039;(Installing OwnCloud)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Seafile: setting up your own private cloud]]&lt;br /&gt;
&lt;br /&gt;
* [[GNUnet]]&lt;br /&gt;
&lt;br /&gt;
== Post-Install ==&lt;br /&gt;
&amp;lt;!-- If you edit this, please coordinate with Installation and Developer_Documentation#Package_management.  Note that these three sections are not exact duplicates. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a new user]]&lt;br /&gt;
* [[Enable Community Repository]] &#039;&#039;(Providing additional packages)&#039;&#039;&lt;br /&gt;
* [[Alpine Linux package management|Package Management (apk)]] &#039;&#039;(How to add/remove packages on your Alpine)&#039;&#039;&lt;br /&gt;
   &amp;lt;!-- [[Alpine Linux package management#Local_Cache|How to enable APK caching]] --&amp;gt;&lt;br /&gt;
** [[Comparison with other distros]]&lt;br /&gt;
* [[Alpine local backup|Alpine local backup (lbu)]] &#039;&#039;(Permanently store your modifications in case your box needs reboot)&#039;&#039;&lt;br /&gt;
** [[Back Up a Flash Memory Installation]] &amp;lt;!-- new --&amp;gt;&lt;br /&gt;
** [[Manually editing a existing apkovl]]&lt;br /&gt;
* [[Alpine Linux Init System|Init System (OpenRC)]] &#039;&#039;(Configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
** [[Multiple Instances of Services]]&lt;br /&gt;
   &amp;lt;!-- [[Writing Init Scripts]] --&amp;gt;&lt;br /&gt;
* [[Alpine setup scripts#setup-xorg-base|Setting up Xorg]]&lt;br /&gt;
* [[Upgrading Alpine]]&lt;br /&gt;
&amp;lt;!-- Obsolete&lt;br /&gt;
 [[Upgrading Alpine - v1.9.x]]&lt;br /&gt;
 [[Upgrading Alpine - CD v1.8.x]]&lt;br /&gt;
 [[Upgrading Alpine - HD v1.8.x]]&lt;br /&gt;
 [[Upgrade to repository main|Upgrading to signed repositories]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
* [[setup-acf]] &#039;&#039;(Configures ACF (webconfiguration) so you can manage your box through https)&#039;&#039;&lt;br /&gt;
* [[Changing passwords for ACF|Changing passwords]]&lt;br /&gt;
* [[Ansible]] &#039;&#039;(Configuration management)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Enable Serial Console on Boot]]&lt;br /&gt;
&amp;lt;!-- Obsolete?&lt;br /&gt;
* [[Error message on boot: Address space collision: host bridge window conflicts with Adaptor ROM]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[How to get regular stuff working]] &#039;&#039;some notes on need-to-know topics&#039;&#039;&lt;br /&gt;
* [[Installing Oracle Java]]&lt;br /&gt;
* [[Rsnapshot|Setting up periodic backups with &amp;lt;samp&amp;gt;rsnapshot&amp;lt;/samp&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
== Virtualization==&lt;br /&gt;
&lt;br /&gt;
* [[Xen Dom0]] &#039;&#039;(Setting up Alpine as a dom0 for Xen hypervisor)&#039;&#039;&lt;br /&gt;
* [[Xen Dom0 on USB or SD]]&lt;br /&gt;
* [[Create Alpine Linux PV DomU]]&lt;br /&gt;
* [[Xen PCI Passthrough]]&lt;br /&gt;
* [[Xen LiveCD]]&lt;br /&gt;
* [[QEMU]]&lt;br /&gt;
* [[KVM]] &#039;&#039;(Setting up Alpine as a KVM hypervisor)&#039;&#039;&lt;br /&gt;
* [[LXC]] &#039;&#039;(Setting up a Linux container in Alpine Linux)&#039;&#039;&lt;br /&gt;
* [[Docker]]&lt;br /&gt;
* [[Install Alpine on VirtualBox]]&lt;br /&gt;
* [[Install Alpine on VMWare]]&lt;br /&gt;
&lt;br /&gt;
== Desktop Environment ==&lt;br /&gt;
&lt;br /&gt;
* [[AwesomeWM]]&lt;br /&gt;
* [[dwm]]&lt;br /&gt;
* [[EyeOS]] &#039;&#039;(Cloud Computing Desktop)&#039;&#039;&lt;br /&gt;
* [[Gnome]]&lt;br /&gt;
* [[KDE]]&lt;br /&gt;
* [[MATE]]&lt;br /&gt;
* [[Oneye]] &#039;&#039;(Cloud Computing Desktop - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
* [[Nextcloud]] &#039;&#039;(Self hostable cloud suite - Dropbox Alternative)&#039;&#039;&lt;br /&gt;
* [[Remote Desktop Server]]&lt;br /&gt;
* [[River]]&lt;br /&gt;
* [[Suspend on LID close]]&lt;br /&gt;
* [[Sway]]&lt;br /&gt;
* [[Xfce]]&lt;br /&gt;
* [[Sound Setup]]&lt;br /&gt;
* [[PipeWire]]&lt;br /&gt;
* [[Printer Setup]]&lt;br /&gt;
* [[Default applications]]&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pi ==&lt;br /&gt;
&lt;br /&gt;
* [[Raspberry Pi|Raspberry Pi (Installation)]]&lt;br /&gt;
* [[Raspberry Pi - Headless Installation]]&lt;br /&gt;
* [[Classic install or sys mode on Raspberry Pi]]&lt;br /&gt;
* [[RPI Video Receiver]] &#039;&#039;(network video decoder using Rasperry Pi and omxplayer)&#039;&#039;&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi (IPv6)]]&lt;br /&gt;
* [[Raspberry Pi 4 - Persistent system acting as a NAS and Time Machine]]&lt;br /&gt;
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]&lt;br /&gt;
* [[Raspberry Pi 3 - Setting Up Bluetooth]]&lt;br /&gt;
* [[Raspberry Pi 3 - Browser Client]] - kiosk or digital sign&lt;br /&gt;
* [[Raspberry Pi Zero W - Installation]]&lt;br /&gt;
* [[Raspberry Pi Bluetooth Speaker]]&lt;br /&gt;
&lt;br /&gt;
== PowerPC ==&lt;br /&gt;
&lt;br /&gt;
* [[Ppc64le|Powerpc64le (Installation)]]&lt;br /&gt;
&lt;br /&gt;
== IBM Z (IBM z Systems) ==&lt;br /&gt;
&lt;br /&gt;
* [[s390x|s390x (Installation)]]&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
=== Telephony ===&lt;br /&gt;
* [[Setting up Zaptel/Asterisk on Alpine]]&lt;br /&gt;
** [[Setting up Streaming an Asterisk Channel]]&lt;br /&gt;
* [[Freepbx on Alpine Linux]]&lt;br /&gt;
* [[FreePBX_V3]] &#039;&#039;(FreeSWITCH, Asterisk GUI web acces tool)&#039;&#039;&lt;br /&gt;
* [[2600hz]] &#039;&#039;(FreeSWITCH, Asterisk GUI web access tool)&#039;&#039;&lt;br /&gt;
* [[Kamailio]] &#039;&#039;(SIP Server, formerly OpenSER)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Mail ===&lt;br /&gt;
* [[Hosting services on Alpine]] &#039;&#039;(Hosting mail, webservices and other services)&#039;&#039;&lt;br /&gt;
** [[Hosting Web/Email services on Alpine]]&lt;br /&gt;
* [[ISP Mail Server HowTo]] &amp;lt;!-- solution, Mail --&amp;gt;&lt;br /&gt;
** [[ISP Mail Server Upgrade 2.x]]&lt;br /&gt;
** [[ISP Mail Server 2.x HowTo]] &#039;&#039;(Beta, please test)&#039;&#039;&lt;br /&gt;
** [[ISP Mail Server 3.x HowTo]]&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Setting up postfix with virtual domains]]&lt;br /&gt;
* [[Protecting your email server with Alpine]]&lt;br /&gt;
* [[Setting up clamsmtp]]&lt;br /&gt;
* [[Setting up dovecot with imap and ssl]]&lt;br /&gt;
* [[relay email to gmail (msmtp, mailx, sendmail]]&lt;br /&gt;
&lt;br /&gt;
=== HTTP ===&lt;br /&gt;
* [[Lighttpd]]&lt;br /&gt;
** [[Lighttpd Https access]]&lt;br /&gt;
** [[Setting Up Lighttpd with PHP]]&lt;br /&gt;
** [[Setting Up Lighttpd With FastCGI]]&lt;br /&gt;
* [[Cherokee]]&lt;br /&gt;
* [[Nginx]]&lt;br /&gt;
** [[Nginx_with_PHP#Nginx_with_PHP|Nginx with PHP]]&lt;br /&gt;
** [[Nginx as reverse proxy with acme (letsencrypt)]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
** [[Apache with php-fpm]]&lt;br /&gt;
** [[Setting Up Apache with PHP]]&lt;br /&gt;
** [[Apache authentication: NTLM Single Signon]]&lt;br /&gt;
&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039; &amp;lt;!-- solution, Server --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up Transparent Squid Proxy]] &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
** [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[Setting up Explicit Squid Proxy]]&lt;br /&gt;
&lt;br /&gt;
* [[Drupal]] &#039;&#039;(Content Management System (CMS) written in PHP)&#039;&#039;&lt;br /&gt;
* [[WordPress]] &#039;&#039;(Web software to create website or blog)&#039;&#039;&lt;br /&gt;
* [[MediaWiki]] &#039;&#039;(Free web-based wiki software application)&#039;&#039;&lt;br /&gt;
* [[DokuWiki]]&lt;br /&gt;
* [[Darkhttpd]]&lt;br /&gt;
* [[Tomcat]]&lt;br /&gt;
* [[Kopano]] &#039;&#039;(Microsoft Outlook compatible Groupware)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Other Servers ===&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
** [[HOWTO OpenSSH 2FA with password and Google Authenticator]] &#039;&#039;(A simple two factor setup for OpenSSH)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Setting up a nfs-server]]&lt;br /&gt;
* [[Setting up a samba-server]] &#039;&#039;(standard file sharing)&#039;&#039;&lt;br /&gt;
* [[Setting up a samba-ad-dc]] &#039;&#039;(Active Directory compatible domain controller)&#039;&#039;&lt;br /&gt;
* [[Phpizabi]] &#039;&#039;(Social Networking Platform)&#039;&#039;&lt;br /&gt;
* [[Statusnet]] &#039;&#039;(Microblogging Platform)&#039;&#039;&lt;br /&gt;
* [[Pastebin]] &#039;&#039;(Pastebin software application)&#039;&#039;&lt;br /&gt;
* [[Setting up Transmission (bittorrent) with Clutch WebUI]]&lt;br /&gt;
&lt;br /&gt;
* [[Patchwork]] &#039;&#039;(Patch review management system)&#039;&#039;&lt;br /&gt;
* [[Redmine]] &#039;&#039;(Project management system)&#039;&#039;&lt;br /&gt;
* [[Request-Tracker]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[OsTicket]] &#039;&#039;(Ticket system)&#039;&#039;&lt;br /&gt;
* [[Setting up trac wiki|Trac]] &#039;&#039;(Enhanced wiki and issue tracking system for software development projects)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_newbie_developer: gitea|Setting up Git management web frontend gitea]]&lt;br /&gt;
* [[Cgit]]&lt;br /&gt;
** [[Setting up a git repository server with gitolite and cgit]] &amp;lt;!-- doesn&#039;t exist yet --&amp;gt;&lt;br /&gt;
* [[Roundcube]] &#039;&#039;(Webmail system)&#039;&#039;&lt;br /&gt;
* [[Glpi]] &#039;&#039;(Manage inventory of technical resources)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[How to setup a Alpine Linux mirror]]&lt;br /&gt;
* [[Cups]]&lt;br /&gt;
* [[NgIRCd]] &#039;&#039;(Server for Internet Relay Chat/IRC)&#039;&#039;&lt;br /&gt;
* [[How To Setup Your Own IRC Network]] &#039;&#039;(Using {{Pkg|charybdis}} and {{Pkg|atheme-iris}})&#039;&#039;&lt;br /&gt;
* [[OpenVCP]] &#039;&#039;(VServer Control Panel)&#039;&#039;&lt;br /&gt;
* [[Mahara]] &#039;&#039;(E-portfolio and social networking system)&#039;&#039;&lt;br /&gt;
* [[Chrony and GPSD | Using chrony, gpsd, and a garmin LVC 18 as a Stratum 1 NTP source ]]&lt;br /&gt;
* [[Sending SMS using gnokii]]&lt;br /&gt;
* [[IPTV How To|Internet Protocol television (IPTV)]]&lt;br /&gt;
* [[UniFi_Controller]]&lt;br /&gt;
* [[DNSCrypt-Proxy]] &#039;&#039;Encrypt and authenticate DNS calls from your system&#039;&#039;&lt;br /&gt;
* [[Odoo]]&lt;br /&gt;
&lt;br /&gt;
=== Monitoring ===&lt;br /&gt;
* Setting up [[collectd]]&lt;br /&gt;
* [[Traffic monitoring]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up traffic monitoring using rrdtool (and snmp)]] &amp;lt;!-- Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up monitoring using rrdtool (and rrdcollect)]]&lt;br /&gt;
* [[Cacti: traffic analysis and monitoring network]] &#039;&#039;(Front-end for rrdtool networking monitor)&#039;&#039;&lt;br /&gt;
* [[LTTng]] &#039;&#039;(Kernel and userspace tracing)&#039;&#039;&lt;br /&gt;
* [[Zabbix|Zabbix - the professional complete manager]] &#039;&#039;(Monitor and track the status of network services and hardware)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft, solution, Networking and Monitoring and Server --&amp;gt;&lt;br /&gt;
** [[Setting up NRPE daemon]] &#039;&#039;(Performs remote Nagios checks)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Setting up Smokeping|Smokeping]] &#039;&#039;(Network latency monitoring)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
** [[Setting up MRTG and Smokeping to Monitor Bandwidth Usage and Network Latency]]&lt;br /&gt;
* [[Setting Up Fprobe And Ntop|Ntop]] &#039;&#039;(NetFlow collection and analysis using a remote fprobe instance)&#039;&#039; &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Cvechecker]] &#039;&#039;(Compare installed packages for Common Vulnerabilities Exposure)&#039;&#039; &amp;lt;!-- Monitoring and Security --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[IP Accounting]] &amp;lt;!-- Networking and Monitoring --&amp;gt;&lt;br /&gt;
* [[Obtaining user information via SNMP]] &#039;&#039;(Using squark-auth-snmp as a Squid authentication helper)&#039;&#039; &amp;lt;!-- Networking and Server, &amp;lt;== Using squark-auth-snmp --&amp;gt;&lt;br /&gt;
* [[SqStat]] &#039;&#039;(Script to look at active squid users connections)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Piwik]] &#039;&#039;(A real time web analytics software program)&#039;&#039;&lt;br /&gt;
* [[Awstats]] &#039;&#039;(Free log file analyzer)&#039;&#039;&lt;br /&gt;
* [[Intrusion Detection using Snort]]&lt;br /&gt;
** [[Intrusion Detection using Snort, Sguil, Barnyard and more]]&lt;br /&gt;
* [[Dglog]] &#039;&#039;(Log analyzer for the web content filter DansGuardian)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Webmin]] &#039;&#039;(A web-based interface for Linux system)&#039;&#039;&lt;br /&gt;
* [[PhpPgAdmin]] &#039;&#039;(Web-based administration tool for PostgreSQL)&#039;&#039;&lt;br /&gt;
* [[PhpMyAdmin]] &#039;&#039;(Web-based administration tool for MYSQL)&#039;&#039;&lt;br /&gt;
* [[PhpSysInfo]] &#039;&#039;(A simple application that displays information about the host it&#039;s running on)&#039;&#039;&lt;br /&gt;
* [[Linfo]]&lt;br /&gt;
&lt;br /&gt;
* [[Setting up lm_sensors]]&lt;br /&gt;
&lt;br /&gt;
* [[ZoneMinder video camera security and surveillance]]&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:Shell]]&lt;br /&gt;
* [[:Category:Programming]]&lt;br /&gt;
* [[Running glibc programs]]&lt;br /&gt;
* [[:Category:Drivers]]&lt;br /&gt;
* [[:Category:Multimedia]]&lt;br /&gt;
* [[Kernel Modesetting]]&lt;br /&gt;
* [[CPU frequency scaling]]&lt;br /&gt;
&lt;br /&gt;
== Complete Solutions ==&lt;br /&gt;
* [[DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs]]&lt;br /&gt;
* [https://codeberg.org/AVG7/alpine-sway-x86_64 DIY Live-USB-Stick with Sway] &lt;br /&gt;
* [[Alpine on the Aopen Chromebase or Chromebox Mini with Mainline Kernel]]&lt;br /&gt;
* [[Replacing non-Alpine Linux with Alpine remotely]]&lt;br /&gt;
* [[High performance SCST iSCSI Target on Linux software Raid]]&lt;br /&gt;
* [[Fault Tolerant Routing with Alpine Linux]]&lt;br /&gt;
* [[Experiences with OpenVPN-client on ALIX.2D3]]&lt;br /&gt;
* [[Building a cloud with Alpine Linux]]&lt;br /&gt;
&lt;br /&gt;
* [[ISP Mail Server HowTo]] &#039;&#039;(Postfix+PostfixAdmin+DoveCot+Roundcube+ClamAV+Spamd - A full-serivce ISP mail server)&#039;&#039;&lt;br /&gt;
** [[ISP Mail Server Upgrade 2.x]]&lt;br /&gt;
** [[ISP Mail Server 2.x HowTo]] &#039;&#039;(Beta, please test)&#039;&#039;&lt;br /&gt;
* [[High Availability High Performance Web Cache]] &#039;&#039;(uCarp + HAProxy for High Availability Services such as Squid web proxy)&#039;&#039;&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039; &amp;lt;!-- draft --&amp;gt;&lt;br /&gt;
* [[Streaming Security Camera Video with VLC]]&lt;br /&gt;
* [[Dynamic Multipoint VPN (DMVPN)]] combined with [[Small_Office_Services]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
This does not attempt to be complete. Is it useful to have these listed here? I find them more accessible if grouped with their topics; also, an up-to-date list of all Draft or Obsolete pages can be found at [[Project:Wiki maintenance]].&lt;br /&gt;
&lt;br /&gt;
== Drafts ==&lt;br /&gt;
Currently unfinished/works-in-progress.&lt;br /&gt;
* [[Using Racoon for Remote Sites]]&lt;br /&gt;
* [[Setting up Transparent Squid Proxy]] &#039;&#039;(Covers Squid proxy and URL Filtering system)&#039;&#039;&lt;br /&gt;
** [[Obtaining user information via SNMP]] &#039;&#039;(Using the Squark Squid authentication helper)&#039;&#039; [!-- no longer a draft --]&lt;br /&gt;
* [[Setting up Streaming an Asterisk Channel]]&lt;br /&gt;
* [[Setting up A Network Monitoring and Inventory System]] &#039;&#039;(Nagios + OpenAudit and related components)&#039;&#039;&lt;br /&gt;
* [[Intrusion Detection using Snort]] &#039;&#039;(Installing and configuring Snort and related applications on Alpine 2.0.x)&#039;&#039;&lt;br /&gt;
* [[IP Accounting]] &#039;&#039;(Installing and configuring pmacct for IP Accounting, Netflow/sFlow collector)&#039;&#039;&lt;br /&gt;
* [[Disk Replication with DRBD]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Newbies ==&lt;br /&gt;
&lt;br /&gt;
* [[Alpine_newbie]] (for overall information in funny sections)&lt;br /&gt;
&lt;br /&gt;
[[Category:System_Administration]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21698</id>
		<title>K8s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K8s&amp;diff=21698"/>
		<updated>2022-04-07T22:48:14Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: K8s in 10 Minutes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; K8s in 10 Minutes =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
This guide will allow you to deploy a fresh Alpine Linux install into a Kubernetes K8 cluster in less than 10 minutes.&lt;br /&gt;
&lt;br /&gt;
== Why &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;sparkles&amp;quot;&amp;gt;✨&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
I went to learn Kubernetes recently and I built a k3 cluster using Alpine in an hour or so, it was a great experience. I figured the next step would be K8s, but I found no material on K8s for Alpine. This guide is the result of my first pass and the incorporations of high quality notes from the contributers. Kubernetes &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;unicorn&amp;quot;&amp;gt;🦄&amp;lt;/span&amp;gt; is awesome.&lt;br /&gt;
&lt;br /&gt;
== Contributers ==&lt;br /&gt;
&lt;br /&gt;
* Matthew Rogers [https://github.com/RamboRogers Github] [https://www.linkedin.com/in/matthewrogerscissp/ LinkedIn]&lt;br /&gt;
* Mike Zolla [https://github.com/Zolla-Zolla Github] [https://www.linkedin.com/in/mike-zolla-5903b8/ LinkedIn]&lt;br /&gt;
* Matthew Emmett [https://github.com/mattemmett Github] [https://www.linkedin.com/in/mattemmett/ LinkedIn]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
= Build K8s on Alpine Linux &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;evergreen_tree&amp;quot;&amp;gt;🌲&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
=== Prerequisits &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mag&amp;quot;&amp;gt;🔍&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
You need an [https://alpinelinux.org/ Alpine Linux] install (this guide is written against version 3.15 standard image) with internet access. I recommend at least 2 CPU with 4GB of ram and 10GB of disk for each node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;For HA control planes you&#039;ll need a mininum of three nodes&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== 1. Setup the Repositories &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;green_book&amp;quot;&amp;gt;📗&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Update you repositories under /etc/apk/repositories to include community, edge community and testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#/media/cdrom/apks&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/v3.15/community&lt;br /&gt;
#http://dl-cdn.alpinelinux.org/alpine/edge/main&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/community&lt;br /&gt;
http://dl-cdn.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== 2. Node Setup &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;desktop_computer&amp;quot;&amp;gt;🖥️&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This series of commands solves a series is incremental problems and sets up the system (if the first control node) for kubectl/kubeadm to run properly on next login by linking the config.&lt;br /&gt;
&lt;br /&gt;
The result here gives you a functional node that can be joined to an existing cluster or can become the first control plane of a new cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;notes&amp;quot;&amp;gt;🎶&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;*** &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; This build assumes CNI usage of flannel for networking &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;bell&amp;quot;&amp;gt;🔔&amp;lt;/span&amp;gt; ***&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#add kernel module for networking stuff&lt;br /&gt;
echo &amp;amp;quot;br_netfilter&amp;amp;quot; &amp;amp;gt; /etc/modules-load.d/k8s.conf&lt;br /&gt;
modprobe br_netfilter&lt;br /&gt;
apk add cni-plugin-flannel&lt;br /&gt;
apk add cni-plugins&lt;br /&gt;
apk add flannel&lt;br /&gt;
apk add flannel-contrib-cni&lt;br /&gt;
apk add kubelet&lt;br /&gt;
apk add kubeadm&lt;br /&gt;
apk add kubectl&lt;br /&gt;
apk add docker&lt;br /&gt;
apk add uuidgen&lt;br /&gt;
#get rid of swap&lt;br /&gt;
cat /etc/fstab | grep -v swap &amp;amp;gt; temp.fstab&lt;br /&gt;
cat temp.fstab &amp;amp;gt; /etc/fstab&lt;br /&gt;
rm temp.fstab&lt;br /&gt;
swapoff -a&lt;br /&gt;
#Fix prometheus errors&lt;br /&gt;
mount --make-rshared /&lt;br /&gt;
#Fix id error messages&lt;br /&gt;
uuidgen &amp;amp;gt; /etc/machine-id&lt;br /&gt;
#Add services&lt;br /&gt;
rc-update add docker&lt;br /&gt;
rc-update add kubelet&lt;br /&gt;
#Sync time&lt;br /&gt;
rc-update add ntpd&lt;br /&gt;
/etc/init.d/ntpd start&lt;br /&gt;
/etc/init.d/docker start&lt;br /&gt;
#create flannel link to where kubernetes expects it&lt;br /&gt;
ln -s /usr/libexec/cni/flannel-amd64 /usr/libexec/cni/flannel&lt;br /&gt;
#kernel stuff&lt;br /&gt;
echo &amp;amp;quot;net.bridge.bridge-nf-call-iptables=1&amp;amp;quot; &amp;amp;gt;&amp;amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl net.bridge.bridge-nf-call-iptables=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Your blank node is now ready! If it&#039;s the first, you&#039;ll want to make a control node.&lt;br /&gt;
&lt;br /&gt;
=== 3. Setup the Control Plane (New Cluster!) &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;mechanical_arm&amp;quot;&amp;gt;🦾&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run this command to start the cluster and then apply a network.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#do not change subnet&lt;br /&gt;
kubeadm init --pod-network-cidr=10.244.0.0/16 --node-name=master&lt;br /&gt;
#set up the networking&lt;br /&gt;
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml&lt;br /&gt;
#now you don&#039;t need to export&lt;br /&gt;
ln -s /etc/kubernetes/admin.conf /root/.kube/config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You now have a control plane. This also gives you the command to run on our blank nodes to add them to this cluster as workers.&lt;br /&gt;
&lt;br /&gt;
=== 4. Join the cluster. &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;ant&amp;quot;&amp;gt;🐜&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Simply run the command given from the control plane to add this node to your cluster.&lt;br /&gt;
&lt;br /&gt;
= Bonus &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;moneybag&amp;quot;&amp;gt;💰&amp;lt;/span&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
== Setup NFS Mounts on K8s ==&lt;br /&gt;
&lt;br /&gt;
This can be shared NFS storage to allow for auto persistent claim fulfilment. You&#039;ll need your IP updated and export information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/&lt;br /&gt;
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \&lt;br /&gt;
    --set nfs.server=192.168.1.31 \&lt;br /&gt;
    --set nfs.path=/exports/cluster00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now set the default storage class for the cluster.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get storageclass&lt;br /&gt;
kubectl patch storageclass nfs-client -p &#039;{&amp;amp;quot;metadata&amp;amp;quot;: {&amp;amp;quot;annotations&amp;amp;quot;:{&amp;amp;quot;storageclass.kubernetes.io/is-default-class&amp;amp;quot;:&amp;amp;quot;true&amp;amp;quot;}}}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Check on System &amp;lt;span class=&amp;quot;emoji&amp;quot; data-emoji=&amp;quot;eyes&amp;quot;&amp;gt;👀&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Check on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;kubectl get nodes&lt;br /&gt;
kubectl get all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Open-vm-tools&amp;diff=17299</id>
		<title>Open-vm-tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Open-vm-tools&amp;diff=17299"/>
		<updated>2020-04-26T23:04:17Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When installing Alpine Linux on an ESXi or VSphere system you definitely want to enable the hypervisor tools. The good news is that Alpine has this package ready to go! Open-VM-Tools provides the VMWare hypervisor info from Alpine and other Linux.  https://github.com/vmware/open-vm-tools&lt;br /&gt;
&lt;br /&gt;
=== Install and Run ===&lt;br /&gt;
# Install with: apk add open-vm-tools&lt;br /&gt;
# Check with: rc-service open-vm-tools start&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Working Tools.png|Working ESXi Tools&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Open-vm-tools&amp;diff=17298</id>
		<title>Open-vm-tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Open-vm-tools&amp;diff=17298"/>
		<updated>2020-04-26T23:02:30Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Open-VM-Tools provides the VMWare hypervisor info from Alpine and other Linux.  https://github.com/vmware/open-vm-tools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Install with: apk add open-vm-tools&lt;br /&gt;
# Check with: rc-service open-vm-tools start&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Working Tools.png|Working ESXi Tools&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Open-vm-tools&amp;diff=17297</id>
		<title>Open-vm-tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Open-vm-tools&amp;diff=17297"/>
		<updated>2020-04-26T23:00:28Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: Created page with &amp;quot;Open-VM-Tools provides the VMWare hypervisor info from Alpine and other Linux.  https://github.com/vmware/open-vm-tools   &amp;lt;nowiki&amp;gt;apk add open-vm-tools&amp;lt;/nowiki&amp;gt;  &amp;lt;gallery&amp;gt; Wor...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Open-VM-Tools provides the VMWare hypervisor info from Alpine and other Linux.  https://github.com/vmware/open-vm-tools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;apk add open-vm-tools&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Working Tools.png|Working ESXi Tools&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=File:Working_Tools.png&amp;diff=17296</id>
		<title>File:Working Tools.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=File:Working_Tools.png&amp;diff=17296"/>
		<updated>2020-04-26T22:58:22Z</updated>

		<summary type="html">&lt;p&gt;Matthewrogers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A view of proper network and other information from open-vm-tools.&lt;/div&gt;</summary>
		<author><name>Matthewrogers</name></author>
	</entry>
</feed>