6/22/2021
Docker Command | microk8s Command | Notes |
docker ps -a | microk8s kubectl get pods | |
docker attach b55f695d4c06 | microk8s kubectl attach -it b55f695d4c06 | |
docker logs -f b55f695d4c06 | microk8s kubectl logs -f mycontainer | |
docker stop b55f695d4c06 && docker rm b55f695d4c06 | microk8s kubectl delete deployment mycontainer | must delete the deployment before the pod. otherwise pod is recreated |
docker run -d –restart=always -e DOMAIN=mycluster –name mycontainer -p 443:443 mycontainer | microk8s kubectl create deployment –image=mycontainer mycontainer | |
docker exec b55f695d4c06 cat /etc/hosts | microk8s kubectl exec b55f695d4c06 — cat /etc/hosts | |
docker info | microk8s kubectl cluster-info and microk8s inspect |