Kubernetes has become the leader in Container Orchestration and a working knowledge of Kubernetes is essential for every developer.
In this post I am going to cover some very basic concepts of Kubernetes.
Pod is a logical unit containing one or more containers (if you use a side car). It is the smallest execution unit.
Replica Set represents number of instances of pods which are running. Used for scaling of pods.
Stateful Set represents unique pods which retain state while running. We use Stateful Set while working with stateful workloads like a database cluster or a master slave configuration of workload.
Deployment represents abstraction used to represent and update Pods and ReplicaSets. We use deployment as a "kind" in the yaml files while deploying an app in Kubernetes.
Service is used for defining how we expose/access an application within a Pod.
Generally when we expose an application in Kubernetes using Service, there are four options:
- Cluster IP - Apps are exposed internally within the cluster.
- NodePort - Apps are exposed via a static port and the IP of the node.
- External IP - Apps are exposed via an externally assigned static IP.
- Load Balancer - Apps are exposed via cloud provider provided Load balancer.