Sunday, November 15, 2020

Kubenetes 101

                                                                 Kubenetes 101 


Architecture :


Master :

- Node has 4 process - API server (Client, command line eg kubectl etc), Scheduler (Decides which worker node pod will be scheduled on), Controller Manager (Detect state changes of Pod and recover) and etcd (state of cluster in form of Kv store)



Worker Nodes (Multiple):

- App Pods where work is done.

- Node has 3 processes on every node :  Contrainer Runtime, Kubelet (Schedules and tracks Pod on local node) and Kube-Proxy(Networking related decisions)


 

Resources in K8S :


Pod - Smallest unit of K8s and each pod has an IP (Non static across restarts)

Service - Perm IP to Pod's (Even if service terminates IP stays)

   Internal Service -  Hostname:Port  (Risk to expose Hostname)  usually ClusterIP

   External Service - LB Service

Ingress : Service which talks to external word and passes traffic internally to services. ( https://your-app.com )




ConfigMap -  To have configs externally. 

Secrets -  To have credentials stored and stored in base64 encoded  (Passwd/Cert).



Volume : Local/External storage to persist data across Pod restart 

Deployments : Blue print for most application deployments.  Abstraction level over Pods .

StatefulSet - For DB app's to make sure writes are synchronized (Avoid corruption).  





No comments:

Post a Comment