$ minikube start

$ minikube status

$ minikube ssh
$ kubectl run hello-minikube --port=8080

$ kubectl expose deployment hello-minikube --type=NodePort

$ kubectl get pod

$ kubectl describe pod name

$ curl $(minikube service hello-minikube --url)

$ minikube stop
$ minikube dashboard

$ minikube ip


apiVersion: v1
kind: PersistentVolume
  name: pv0001
    - ReadWriteOnce
    storage: 5Gi
    path: /data/pv0001/
$ minikube start --docker-env HTTP_PROXY=http://$YOURPROXY:PORT \
                 --docker-env HTTPS_PROXY=https://$YOURPROXY:PORT

create pod

$ kubectl create -f

$ kubectl get --watch pod redis

$ kubectl exec -it redis -- /bin/bash

# docker run:
# start the pod running nginx
$ kubectl run --image=nginx nginx-app --port=80 --env="DOMAIN=cluster"

# expose a port through with a service
$ kubectl expose deployment nginx-app --port=80 --name=nginx-http

# docker ps
$ kubectl get po

# docker attach
$ kubectl attach -it nginx-app-5jyvm

# docker exec
$ kubectl exec nginx-app-5jyvm -- cat /etc/hostname

# docker logs
$ kubectl logs -f nginx-app-zibvs

by default pods will not terminate if their processes exit. Instead it will restart the process. This is similar to the docker run option –restart=always with one major difference. In docker, the output for each invocation of the process is concatenated but for Kubernetes, each invocation is separate.

$ kubectl logs --previous nginx-app-zibvs

# docker stop and docker rm

$ kubectl get deployment nginx-app
$ kubectl get po -l run=nginx-app
$ kubectl delete deployment nginx-app
$ kubectl get po -l run=nginx-app

# docker info
$ kubectl cluster-info
Search Blog: