Perintah/Command pada Minikube Kubernetes

Inimah catatan pribadi, biar ga lupa perintah-perintah di kubernetes :)
Minikube start
Minikube status
Minikube stop
Kubectl get node
Pod
Kubectl create -f nginx.yaml
Kubectl get pod
kubectl get pod -o wide
kubectl describe pod nginx
kubectl port-forward nginx 8888:80
kubectl delete pod nginx
Label
kubectl get pod — show-labels
kubectl label pod nginx env=development
kubectl label pod nginx env=productions — overwrite
kubectl get pods -l env
kubectl get pods -l “!team”
kubectl get pods -l “env in (productions)”
kubectl get pods -l team,env
kubectl get pods -l team,env=productions
kubectl delete pod -l env=development
Annotations
kubectl annotate pod nginx-with-label description=”ini adalah team finance”
kubectl annotate pod nginx-with-label description=”ini adalah tim finance” — overwrite
Namespace
kubectl get namespaces
kubectl get pod — namespace default
kubectl get pod — namespace kube-system
Kubectl create -f namanamespace.yaml
kubectl create -f nginx.yaml — namespace finance
kubectl delete namespace finance
Kubectl delete pod — all — namespace default
Probe
kubectl describe pod nginx-with-probe
Replication Controller
Kubect get rc
kubectl delete rc nginx-rc
kubectl delete rc nginx-rc — cascade=false
Replica Set
Kubect get rs
kubectl delete rs nginx-rs
kubectl delete rs nginx-rs — cascade=false
Minikube Upgrade
minikube update-check
Minikube stop
Minikube delete
Daemon Set
kubectl create -f daemon-nginx.yam
Kubectl get daemonset
Kubectl delete daemonset daemon-nginx
Job
kubectl create -f job-nodejs.yaml
Kubectl get job
kubectl get all
kubectl describe job nodejs-job
kubectl delete job nodejs-job
Node Selector
kubectl label node minikube gpu=true
Kubectl describe node minikube
kubectl create -f nginx-node-selector.yaml
All
Kubectl get all
Kubectl get — namespace namanamespace
Kubectl delete all — all
Kubectl delete all — all — namespace namanamespaces