Important Concepts of K8s
- Namespace: In k8s we can create virtual clusters using namespace.
kubectl get namespace
- api-resources: All the different resources available in K8s
kubectl api-resources
Workloads
Pod
-
Refer Here for Pod Lifecycle
-
init-containers: These are containers which will execute before the main containers. Init containers are supposed to executing only for a certain time.
- Lets assume we have a Podspec in which
- init-contiainer-1:
- Here you have written ping -c 4 google.com
- init-container-2
- Here you have written ping -c 4 qt.artifactory.com
- jenkins (main)
- init-contiainer-1:
- Lets assume we have a Podspec in which
Controllers
- In controllers, We control Workload objects
Replication Controller
- In Replication Controller we can set number of pods as the desired state.
Daemon Set
- Creates one pod on every node in K8s cluster