|
| 1 | +What is minikube |
| 2 | +-------- |
| 3 | +For Local Development we use `minikube`. `minikube` is a single-node Kubernetes cluster. |
| 4 | + |
| 5 | +`minikube` has following important commands |
| 6 | +- `minikube start` to bootstrap Kubernetes single node cluster |
| 7 | +- `minikube status` check status of Kubernetes single node cluster status |
| 8 | +- `minikube stop` to stop Kubernetes cluster |
| 9 | +- `minikube ssh` to ssh into minikube |
| 10 | +- `minikube dashboard` to view the dashboard |
| 11 | +- `minikube ip` to view the IP address of minikube node |
| 12 | +- `minikube service ${servcie-name}` open the service in the browser |
| 13 | +- `minikube addons enable ${addon-name}` to enable any addon (such as ingress etc) |
| 14 | + |
| 15 | +What is Kubectl |
| 16 | +--------------- |
| 17 | +The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs |
| 18 | + |
| 19 | +`kubectl` commands |
| 20 | +1. `kubectl config view` to view the kube config file `~/.kube/config` |
| 21 | +2. `kubectl cluster-info` to view cluster info |
| 22 | +3. `kubectl proxy` to access dashboard from `http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/#/overview?namespace=default` |
| 23 | +4. `kubectl create namespace ${name}` to create namespace of name ${name} |
| 24 | +5. `kubectl create -f ${signing-request.yaml}` to create signing request object |
| 25 | +6. `kubectl get csr` to get all certificate signing request |
| 26 | +7. `kubectl certificate approve ${csr-name}` to approve certificate signing request |
| 27 | +8. `kubectl get deployments` to get all deployments in default namespace |
| 28 | +9. `kubectl get replicasets` to get all replicasets in default namespace |
| 29 | +10. `kubectl get pods` to get all pods in default namespace |
| 30 | +11. `kubectl describe pod ${pod-name}` to view the config info of given pod |
| 31 | +12. `kubectl get pods -L ${col1},${col2}` we can add number of columns along `-L` argument |
| 32 | +13. `kubectl get pods -l ${selector}` we can get the pods using the selector |
| 33 | +14. `kubectl delete deployments ${deployment-name}` to delete the deployment |
| 34 | +15. `kubectl create -f ${fileName.yml}` to create any object mentioned in the `.yml` file. |
| 35 | + |
| 36 | +Kubernetes Pod |
| 37 | +-------------- |
| 38 | +A Pod is the smallest and simplest Kubernetes object. It is the unit of deployment in Kubernetes, which represents a single instance of the application. A Pod is a logical collection of one or more containers, which: |
| 39 | + |
| 40 | +1. Are scheduled together on the same host with the Pod |
| 41 | +2. Share the same network namespace, meaning that they share a single IP address originally assigned to the Pod |
| 42 | +3. Have access to mount the same external storage (volumes). |
| 43 | + |
| 44 | +Kubernetes Service |
| 45 | +------------------ |
| 46 | +A Service offers a single DNS entry for a containerized application managed by the Kubernetes cluster, regardless of the number of replicas, by providing a common load balancing access point to a set of pods logically grouped and managed by a controller such as a Deployment, ReplicaSet, or DaemonSet |
| 47 | + |
| 48 | +Kubernetes Probes |
| 49 | +----------------- |
| 50 | +1. Liveness (checking health) |
| 51 | +2. Readiness (waiting for certain condition to meet) |
0 commit comments