There are multiple types of Controllers in Kubernetes
Follow below commnads and observe how pods are getting created
kubectl create -f kubia-rc.yaml
kubectl get pods
kubectl delete pod kubia-53thy
kubectl get pods
kubectl get rc
kubectl describe rc kubia
kubectl get pods --show-labels
kubectl label pod <podname> app=foo --overwrite
observe the pods with label column [new pod being created]
kubectl scale rc kubia --replicas=10
Delete without deleting pods
kubectl delete rc kubia --cascade=false
kubectl create -f kubia-replicaset.yaml
kubectl get rs
kubectl describe rs
This daemon set is designed to run on all the disks that has ssd disk (disk=ssd )
kubectl create -f ssd-monitor-daemonset.yaml
kubectl get ds
kubectl get po
kubectl get node
kubectl label node <nodename> disk=ssd
kubectl get jobs
kubectl get po
After the two minutes have passed, see the status "completed"
kubectl get po -a
kubectl logs <jobpodname>
Sequential completion and parallelism
kubectl create -f multi-completion-batch-job.yaml
kubectl create -f multi-completion-parallel-batch-job.yaml
You can even change a Job’s parallelism property while the Job is running
kubectl scale job multi-completion-batch-job --replicas 3