Command Umum Docker, Kubernetes dan Minikube

Minikube

  • minikube status
  • minikube start
  • minikube delete --purge (reset ke awal)

Kubectl

  • kubectl apply -f .\plato-pod.yaml
  • kubectl get pod
  • kubectl get deployment
  • kubectl get pv (persistance volume)
  • kubectl get pvc
  • kubectl describe pod xxxx
  • kubectl delete pod[/deployment/...] xxxx
  • kubectl logs plato-db-deployment-7d585dcf6d-zmjv2
  • kubectl exec -it {pod} -- /bin/bash

Error: minikube Unable to resolve the current Docker CLI context "default": context "
Solution: docker context use default

Docker

  • docker build . -t {nama image}
  • docker push {nama image}
  • docker-compose up -d
  • docker-compose down -rmi allĀ  (hapus semua image)
  • docker-compose down -rmi local (hapus image yg dibuild di lokal saja)
  • docker container ls (lihat yg up)
  • docker container ls -a (lihat semua container)
  • docker container logs {id/nama container}
  • docker container exec -it {id/nama container} /bin/bas

You cannot comment on this entry