Kubernetes Flashcards
What is CNI w.r.t. AWS EKS
Connection Network Interface
Kubernetes can use this plugin for configurable networking setups.
aws-node daemonset running EKS has two components - LIPAM and CNI Plugin
CNI is responsible for wiring the network interfaces to the pods namespace.
What is LIPAM w.r.t. AWS EKS
aws-node is a daemonset running on AWS EKS, that has two components: LIPAM and CNI.
LIPAM is responsible to attach ENI to nodes and maintain warm pool of IPs which can be assigned to Pods. If the pods’ count is more than IPs available, new ENI attachment is triggered, provided the Node Type supports it.
What is ArgoCD
Continuous Deployment tool for Kubernetes that relies on GitOps to receive new manifest files and applies them to Kubernetes.
Each deployment of a pod will create a new revision, that can be used to roll back quickly if needed.
How to list IP addresses of all the pods on lubernetes cluster?
kubectl get pods -A -o jsonpath=’{range .items[*]}{.status.podIP}{“\n”}{end}’
How to check the users/roles that have access to the kubernetes cluster?
kubectl get configmap aws-auth -n kube-system -o yaml
What is a Config Map?
In kubernetes we can add multiple environment variables to a single configuration file, which can then be utilized by a deployment to load variables from.
e.g. apiVersion: v1 kind: ConfigMap metadata: name: sampleconfigmap data: ACCOUNT: "12345" ID: "admin" PASSWORD: "amex1234"
Note: remember to add double quotes or else it will be unsuccessful in creation.
Usage in deployment: env: - name: ACCOUNT valueFrom: configMapKeyRef: name: sampleconfigmap key: ACCOUNT - name: ID valueFrom: configMapKeyRef: name: sampleconfigmap key: ID
Force delete a pod`
kubectl delete pod xyz –force
Run an one of pod
kubectl run -it –rm –image=”ubuntu” -n aqua linuxtools –command “/bin/bash”
How to check the current KUBECONFIG?
kubectl config view
How to get the current context?
kubectl config current-context
What is orchestrator?
- deploy application
- scale it up/down
- self heal.
- zero downtime rolling updates
Cloud native application
- Scale up/down without failure
- self healing
- rolling updates
Container Runtime Interface (CRI)
Abstract layer that standardizes how 3rd party container runtimes interface with Kubernetes.
Runtime Classes
Allows different classes of runtime, Kata, gVisor provide better workload isolation.
Kubernetes = ?
Masters + Nodes
Multi master clusters are recommended, as 3 masters or 5 masters.