sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install -y docker-ce
sudo usermod -a -G docker $(whoami)
sudo tee /etc/docker/daemon.json <<EOF
{
"insecure-registries" : ["localhost:32000"]
}
EOF
sudo kill -SIGHUP $(pidof dockerd)
Disable localhost
entries for IPv6 addresses in '/etc/localhost', otherwise Docker image pulling from the local registry using localhost
will not work.
sudo apt-get install -y snapd
sudo snap install microk8s --classic --channel=1.18/stable
Now log out of/back in the shell.
sudo iptables -P FORWARD ACCEPT
sudo apt-get install -y iptables-persistent
sudo iptables-save | sudo tee /etc/iptables/rules.v4
sudo usermod -a -G microk8s $(whoami)
sudo chown -f -R $(whoami) ~/.kube
microk8s.enable dns registry ingress
microk8s.inspect