Kubernetes Deep Dive

Kubernetes components and responsibility

Controller nodes:
  • kube-apiserver
  • kube-control-manager/cloud-control-manager
  • kube-schduler
  • calico,flannel(deprecated from 1.18),wavenet etc.,
  • coreDNS
  • kubelet
  • kube-proxy
  • Docker Engine/containerd/cri-o etc.
Compute nodes:
  • kubelet
  • kube-proxy
  • Docker Engine/containerd/cri-o etc.,

Deployment of kubernets cluster using microk8s(ubuntu), minikube, kubeadm

  • Three nodes (1 for controller and 2 for compute nodes)

POD object creation using single container and multi-container

  • Understanding common networking and common storage in POD (shared namespaces)
  • Sample application deployment using nginx for single container in POD
  • Multi-container deployment, one for web application and second for data pull
  • POD creation with initContainer advantages for pre-request
  • Static POD deployment
  • Deploying application from Private repository
  • Resource allocation like CPU and MEMORY

ReplicationController object (RC)

  • When to use replication controller?
  • Disadvantages of deploying application with single POD
  • Understanding template and selector parameters

ReplicaSet object (RS)

  • Difference between RreplicationController and ReplicaSet
  • Advantages of adding matchLabels
  • When to use replicaSet?

Deployment object (deploy)

  • Advantages of Deployment over POD, RC and RS
  • Sample application deployment like Jenkins, nginx and capture the advantages over other objects
  • Scaleout and Scalein for Deployment
  • Deployment Stratagies like RollingUpdate and ReCreate difference
  • Rollout, Rollback and RolloutHistory of deployment

StatefulSet object (sts)

  • Difference between stateful and stateless applications
  • StatefulSet application deployment advantages
  • Scaleout and Scalein for Deployment
  • Deployment Stratagies like RollingUpdate and OnDelete difference
  • Rollout, Rollback and RolloutHistory of StatefulSet

Volumes

  • Empheimeral and persistant storage differences
  • Different types of volume plugins like emptyDir, hostPath, NFS etc.
  • Do's and Dont's of using volumes for application deployment

PersistentVolume, PersistantVolumeClaim and StorageClass (PV and PVC)

  • Advanatages of using PV over volume plugins for data dependent applications
  • Static and Dynamic PV creation
  • PVC assignment in POD, Deployment, Daemonset, StatefulSet objects
  • StargaeClass creation for Dynamic provision
  • NFS, Ceph RBD storage as examples

Services (svc)

  • Exposing application running on different object through service
  • Understanding difference between ClusterIP, NodePort, LoadBalancing, ExternalIP and ExternalName
  • When to use these different types of services?

Secrets and configmap (secret, cm)

  • How to pass sensitive data through secret like certs, password, token etc.,
  • How to pass paintext data through configMap like configuration files, scripts etc.,
  • Using secret in POD object through env and volumes
  • Using configMap in POD object through env and volumes

Ingress (ing)

  • Access application deployed with the cluster through IngressController
  • Deploying Nginx IngressController
  • Ingress rules creation secured and non-secure communication

Horizontal POD AutoScalling (HPA):

  • HPA deployment to test auto scaling
  • Deployment of metric server to achieve HPA

Scheduling and probes

  • Different types of scheduling like nodename, nodeSelector, podAffinity, podAntiAffinity, nodeAffinity
  • Advantages of using liveness, readiness and startup probes to verify application availability

Jobs and CronJobs

  • How to achieve auto backup and restore using CronJobs for application like etcd key-value pair storage
  • For kubernetes cluster
  • Jobs responsibility

Calico networking

  • How to migrate from flannel to calico?
  • How to use flannel for POD networking and Calico for network security
  • Calicoctl operations
  • Network policy and global network policy

Authentication and authorization

Authentication:
  • User, group and serviceaccount (token), certs
  • kubeconfig entries and access multiple cluster through kubernetes config file
Authorization:
  • Role Back Access Control (RBAC)
  • Role, rolebinding, clusterrole, clusterrolebinding

Dashboard

  • Deployment of kubernetes dashboard and creating kubernetes object through dashboard
  • How to autheticate to dashboard through token and kubeconfig

Task:

a. WordPress and database application deployment

b. Jenkins deployment with data persistent after upgrading/downgrade

c. Backup and restore of etcd service data using cronjob

d. kubernetes upgrade from one version to another (1.20.1 to 1.20.2)

e. Maintenance task using taint and toleration

f. Automate application deployment with the help of GitOps and ArgoCD

g. Understanding CRD and CR for operators

Helm charts:

1) What is chart and maifest?

2) Helm architecture and components

3) Helm configuration and repo setup

4) Helm application deployment

  • a. Deploy nginx web application with custom values
  • b. Rollout and Rollback application using helm cli
  • c. Test applications deployed through Helm using #helm test

5) Helm custom chart development

  • a. Helm default directory structure
  • b. Update _helper.tpl file for custom methods
  • c. How to call data from Chart.yaml and values.yaml file to templates

6) Deploy monitoring tools using custom helm charts

  • a. EFK deployment
  • b. Prometheus and Grafana deployment
  • c. How to call data from Chart.yaml and values.yaml file to templates

Terraform

1) What is IaC?

2) Difference between Terraform and Ansible(Any Configuration Management Tools like Puppet, Chef etc.,)

3) What is terraform cloud, terraform hub, terraform provider, resource etc.,

4) Understanding Input variables, Output value and Local value

5) Modules: root module and child modules

Contact Us