Perintah/Command pada Minikube Kubernetes

Photo by Anas Alshanti on Unsplash

Inimah catatan pribadi, biar ga lupa perintah-perintah di kubernetes :)

Minikube start

Minikube status

Minikube stop

Kubectl get node


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


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


kubectl annotate pod nginx-with-label description=”ini adalah team finance”

kubectl annotate pod nginx-with-label description=”ini adalah tim finance” — overwrite


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


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


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


Kubectl get all

Kubectl get — namespace namanamespace

Kubectl delete all — all

Kubectl delete all — all — namespace namanamespaces

Android Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store