Kubernetes API Objects and Storage

General Feb 07, 2019

API Objects

This are elements which represent the system state, allowing us to configure the state of the system.

How do we configure the system State

  • we can describe the system state declaratively.
  • we can execute in the command line imperatively.

Kubernetes API Server

This is a restful API over HTTPS using JSON, that solely interacts with your cluster.

Pods

Pod is one or more containers inside a kubernetes cluster. N.B: as discussed containers are made of runtime images of application or services. A pod is described in the manifest which describes the desired deployment. Kubernetes work is to schedule the Pods. Pods are Ephemeral i.e. no state is maintained within an application, kubernetes maintain the state. Pods also have an Atomicity property i.e they are either there or not. Finally, is important to note that Kubernetes does not manage containers but Pods, which as stated above is a collection of one or more containers.

Controllers

Controllers create and manage the Pods for you. They respond to the Pod state and Health. this is done is customized with Replica sets. if we desire to have 3 pods of an application running at all times, it is the replicas job to make sure 3 pods are always running. Deployment replicaset is also a function available to controllers which can be used to rollback between multiple versions of an application.

Services

Pods are ephemeral and that means the state is not maintained in the container. This is achieved using a network abstraction for access to the services that Pods provide. Kubernetes allocates IP and DNS name for the services. when Pods are redeployed by Kubernetes because of a container failure. Kubernetes dynamically updates the IP and DNS name for the new service to always maintain routing. This same techniique is used in scaling by adding or removing Pods based on the demands of the applications and services also provide loadbalancing for the demands.

Where is data stored in Kubernetes? Initially, Kubernetes had the concept of a volume. which was the storage media directly connected to the pod. Pods were deployed with volume tightly coupled together, meaning loss of dynamism in administering both the Pods and Volumes.

Persistent Volume:A pod independent storage defined at the cluster stage. A Pod then has to claim the necessary storage needed from the Persistent Volume.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
#