sudo snap install microk8s --classic
sudo microk8s status --wait-ready
sudo microk8s enable dns ingress rbac storage
sudo snap install kubectl helm --classic
mkdir ~/.kube
sudo microk8s config > ~/.kube/config
chmod 600 ~/.kube/config
sudo sed -i '/DNS.5/a \
DNS.6 = api.yourdomain.com' /var/snap/microk8s/current/certs/csr.conf.template
- A-Record : yourdomain.com > <YOUR_IP_ADDRESS>
- Alias (CNAME) : api.yourdomain.com > yourdomain.com
- Alias (CNAME) : *.apps.yourdomain.com > yourdomain.com
- 80
- 443
- 16443
- Kubernetes cluster name :
microk8s-cluster
- API URL :
https://api.yourdomain.com:16443
- Base Domain :
apps.yourdomain.com
kubectl get secret $(kubectl get secret | grep default-token | awk '{print $1}') -o jsonpath="{['data']['ca\.crt']}" | base64 --decode
kubectl -n kube-system create serviceaccount gitlab
kubectl create clusterrolebinding gitlab-admin --clusterrole=cluster-admin --serviceaccount=kube-system:gitlab
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep gitlab | awk '{print $1}')
Finally install Gitlab Runner
and Cert-Manager
under Applications tab page