Aim: To install MicroK8s on Ubuntu Server
Also see k8s docs here.
Download version of Ubuntu Server and create a bootable USB
Easiest to do from another machine running Ubuntu: See the tutorial
It is possible from Windows or Mac but there are some hoops to jump through.
Boot from the USB and Install
Plug in the USB and reboot, ensuring your BIOS is set o boot from USB. Follow the guide to continue the setup procedure. Note that the last step of installing security updates will take a long time.
- Do install SSH so you can connect remotely. Suggest downloading keys e.g. from GitHub
Post Install
Install MicroK8s
microk8s enable dns
microk8s enable storage
microk8s enable helm
Setup kubectl
MicroK8s comes with it's own microk8s.kubectl cmd, so if you want to you can either configure kubectl or setup an alias
Configure kubctl
- Install kubectl if you don't have it already: either from native package manager or snap.
snap install kubectl --classic && kubectl version --client - Configure it to work with MicroK8s. If the only configuration:
cd $HOME
mkdir .kube
cd .kube
microk8s config > config
Setup Alias
Install Helm
sudo snap install helm --classic
Join a Cluster
https://microk8s.io/docs/clustering
On existing node: microk8s add-node
On joining node: microk8s join ...
If the machines are local you might need to add the hostnames to /etc/hosts:
vi /etc/hosts
Append:
[ip address] [hostname]
No comments:
Post a Comment