docker save my-image:latest > my-image.tar If you want to deploy an image you’ve just built, manually import it to the MicroK8s registry by exporting it as a tar archive. MicroK8s can’t access your local Docker images automatically. For long-term use, add your user account to the microk8s group so you don’t need to use sudo each time: sudo usermod -aG microk8s $USER Accessing Docker Images Most MicroK8s commands require superuser access. This exports the MicroK8s connection information into your Kubernetes configuration file, allowing plain kubectl commands to reach your cluster. If you want to drop the microk8s prefix, you can use a “real” kubectl binary instead: sudo microk8s kubectl config view -raw > $HOME/.kube/config MicroK8s is compatible with all Kubectl commands. It’ll show up when you re-run microk8s kubectl get all. MicroK8s will create a new Pod running the NGINX web server. Apply the manifest to your cluster: sudo microk8s kubectl apply -f.
0 Comments
Leave a Reply. |