Friday, September 13, 2019

Kubernetes basic building blocks


Building blocks of Kubernetes: 
  • Pods
  • ReplicaSets
  • Deployments
  • Namespaces
#Pods:
  • wrapper around the container that kubernetes understands to maintain the cluster state. 
  • Can run multiple containers. 
  • Smallest and simplest unit of deployment object. 
  • Pods
    • sheduled on the same host
    • Shares same network namespace
  • Can run different configurations
    • Homogeneous pods: multiple versions of the same deployment
    • Heterogeneous pods: multiple pods of different configurations. 
#ReplicationController
  • pod manager, Makes sure no. Of replicas in a pod is running as required. If less, it creates, if more it kills pods.
#ReplicaSets
  • Next generation Replication controller that manages pod to maintain desired state. 
  • Supports equolity and set based selectors. 
#Namespaces:
  • Are used to group resources and assign privileges based on the namespaces.
#Labels and selectors: 
  • Metadata can be assigned to pods or any objects as labels, ways by which you can glue multiple objects to gather. 
  • These are used by kubernetes to perform operations to the group based on labels. 
#Services: 
  • Are essentially endpoints by which pods communicate to other pods internally /externally (for example, web server / cache / db need to talk to each other)
  • Exposed through endpoints (Internal and external). 
    • Internal: example: don’t have to expose database to outside world, but accessible internally. 
    • External: web UI to be exposed outside. 

1 comment: