Pod, service, ingress, deployment, statefulset, volumes, configmap, secrets
- Minikube - Suitable for local setup that has one node containing master and workers in the same node, you can run this on top of
docker runtime or using virtualbox(installation seperate).
- Starting minikube:
minikube start --vm-driver=virtualbox
- Start with docker runtime:
minikube start --vm-driver=none
- Starting minikube:
- Kubectl - command to control the whole k8s cluster. Acts like the main control panel for k8s
- Setup a new deployment:
kubectl apply -f ./app.yaml
- This sets up everything right from pot to container and also launch the cluster with settings mentioned in app.yaml
- Create deployment from public docker image (eg, ngnix)
kubectl create deployment mongdb-server --image=mongo
(check the registry image name)
- See all pods:
kubectl get pods
- Pod details (verbose):
kubectl get pod -o wide
- Checking logs:
kubectl logs <pod-id>
- Delete pod:
kubectl delete pods <pod-id> --force
- Pod details:
kubectl describe pod <pod-id>
- Service details:
kubectl describe service <service-id>
- Delete all pods (caution with force flag):
kubectl delete all --all --all-namespaces --force
- Check services:
kubectl get services
- Check deployment:
kubectl get deployment
- Check all nodes:
kubectl get nodes
- Editing kubectl deployment:
kubectl edit deployment <deployment-name>
- upon editing, old pod gets deleted, new pod gets created. And a new replicaset also gets created
- Just like in docker, it is possible to login to the shell of the pod
kubectl exec -it <pod-id> -- bin/bash
Two types: deployment.yaml; service.yaml
- Info about components
- spec (also contains pod config)
- status (Autogenerated)