minikube start --driver=docker
minikube status

- To connect, know the IP and SSH
minikube ip
ssh docker@<ip>
- user=docker
- password=tcuser
minikube ssh
Once connected:
docker ps
From k8s_:
- k8s_kube-proxy_kube-proxy-bvjpp_kube-system
- k8s_kube-apiserver_kube-apiserver-minikube_kube-system
- k8s_kube-controller-manager_kube-controller-manager-minikube_kube-system
- k8s_kube-scheduler_kube-scheduler-minikube_kube-system
- k8s_coredns_coredns-565d847f94-gptzm_kube-system
- k8s_storage-provisioner_storage-provisioner_kube-system
- k8s_etcd_etcd-minikube_kube-system
From k8s_POD:
- k8s_POD_kube-proxy-bvjpp_kube-system
- k8s_POD_mypod_default
- k8s_POD_storage-provisioner_kube-system
- k8s_POD_coredns
- k8s_POD_etcd-minikube_kube-system
- k8s_POD_kube-scheduler-minikube_kube-system
- k8s_POD_kube-apiserver-minikube_kube-system
- k8s_POD_kube-controller-manager-minikube_kube-system
- No kubectl inside the node:

- exit and:
kubectl cluster-info

- list nodes in the cluster
kubectl get nodes

- List pods available in this cluster (default looks at default namespace only!)
kubectl get nodes
kubectl get namespaces

- Check pods from kube-system namespace (master node):
kubectl get pods --namespace=kube-system

- Create nginx pod
kubectl run <podname> --image=nginx

- Check container is running

- Get details about the pod
kubectl describe pod <podname>


- Connect to node again
kubectl ssh
docker ps | grep nginx

It create a paused container k8s_POD for the specific pod (to lock and keep namespace of specific pod)
- Connect to the container running nginx
docker exec -it <containerID> sh
hostname
hostname -i


- Check nginx is up and running
curl 172.17.0.4

- Exit both the container and the K8s node
- Check the pod IP address (same as container IP) – If several containers in pod -> they share the same IP address
kubectl get pods -o wide

- Delete the pod
kubectl delete pod <podname>

- you can use alias to shortcut command
alias k="kubectl"