This is currently a work in progress.
Install via snap
.
sudo snap install kubernetes-worker
This will install the latest version of Kubernetes. If you would like to use an older version, you can see the available options.
snap info kubernetes-worker
An example of installing an older version.
sudo snap install kubernetes-worker --channel 1.14/stable
After installation, we will need to connect the remaining interfaces.
sudo snap connect kubernetes-worker:kernel-module-control
We must feed in a kubeconfig
file to allow the worker to enrol with the
cluster.
Example:
sudo snap set kubernetes-worker kubeconfig="$(cat ~/.kube/config)"
We also need to feed in a ca.cert
to allow Kubernetes to get data from the kubelet.
Example:
sudo snap set kubernetes-worker cacert="$(cat ~/ca.crt)"
Access the underlying containerd CLI. Must be used with sudo
.
Example:
sudo kubernetes-worker.ctr --namespace=k8s.io containers ls
Run the Kubernetes CLI within the context of the Snap.
Example:
kubernetes-worker.kubectl get all --all-namespaces
When building with snapcraft
, due to the snap using core18
, the build will
take place within a multipass
container. We need to up the default memory
for this container, otherwise the build will fail. We can do this with the
following command.
SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G snapcraft
We can also add cores to make the build faster.
SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G SNAPCRAFT_BUILD_ENVIRONMENT_CPU=8 snapcraft
Install the built snap.
sudo snap install ./kubernetes-worker_*.snap --dangerous
Connect all the interfaces.
for i in docker-privileged k8s-kubelet dot-kube docker-support firewall-control hardware-observe kernel-module-control mount-observe network-control process-control system-observe opengl; do sudo snap connect kubernetes-worker:$i; done
We are adding support for different cloud providers. Supported providers are listed below.
For instructions on deploying to EKS, see the Using with EKS wiki page.