# Install microk8s
sudo snap install microk8s --edge --classic
microk8s.enable dns storage ingress
mkdir -p ~/.jx/bin curl -L https://github.com/jenkins-x/jx/releases/download/v1.3.566/jx-linux-amd64.tar.gz | tar xzv -C ~/.jx/bin export PATH=$PATH:~/.jx/bin echo 'export PATH=$PATH:~/.jx/bin' >> ~/.bashrc
sudo apt-get update && sudo apt-get install -y apt-transport-https curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list sudo apt-get update sudo apt-get install -y kubectl
microk8s.config > ~/.kube/config
kubectl get all --all-namespaces
- Create StorageClass
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fast
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-ssd
kubectl create -f storage.yaml
sudo iptables -P FORWARD ACCEPT
jx install --provider=kubernetes --external-ip <IP> \
--ingress-service=default-http-backend \
--ingress-deployment=default-http-backend \
--ingress-namespace=default \
--on-premise \
--domain=devlab.rs
Remove microk8s
microk8s.reset
sudo snap remove microk8s
Useful commands. No need to run these during the installation.
# alias microk8s kubectl - DON'T DO THIS
sudo snap alias microk8s.kubectl kubectl