Hi all,
We’re starting microk8s on a ci pipeline to provide kube services etc like this:
sudo snap install microk8s --classic
sudo microk8s status --wait-ready
sudo microk8s enable dns registry storage
sudo microk8s status --wait-ready
Still getting problems with those services (dns,registry,storage) not being ready after that, e.g:
Error: Get "https://10.1.0.4:16443/api/v1/namespaces/default/persistentvolumeclaims/local-mongo-pv-claim": dial tcp 10.1.0.4:16443: connect: connection refused
error when creating "/root/snap/microk8s/1769/tmp/temp.coredns.yaml": Post "https://127.0.0.1:16443/apis/rbac.authorization.k8s.io/v1/clusterroles?fieldManager=kubectl-client-side-apply": read tcp 127.0.0.1:48292->127.0.0.1:16443: read: connection reset by peer
error when retrieving current configuration of:
Resource: "rbac.authorization.k8s.io/v1, Resource=clusterrolebindings", GroupVersionKind: "rbac.authorization.k8s.io/v1, Kind=ClusterRoleBinding"
Name: "coredns", Namespace: ""
from server for: "/root/snap/microk8s/1769/tmp/temp.coredns.yaml": Get "https://127.0.0.1:16443/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/coredns": dial tcp 127.0.0.1:16443: connect: connection refused
Failed to enable dns
Registry not being ready was solved by pinging it until it responds - it does take a good few minutes - machines on ci not that powerful however.
What’s the correct way to do this with microk8s?