Kubernetes Flashcards

1
Q

What is CNI w.r.t. AWS EKS

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is LIPAM w.r.t. AWS EKS

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is ArgoCD

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to list IP addresses of all the pods on lubernetes cluster?

A

kubectl get pods -A -o jsonpath=’{range .items[*]}{.status.podIP}{“\n”}{end}’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to check the users/roles that have access to the kubernetes cluster?

A

kubectl get configmap aws-auth -n kube-system -o yaml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Config Map?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Force delete a pod`

A

kubectl delete pod xyz –force

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Run an one of pod

A

kubectl run -it –rm –image=”ubuntu” -n aqua linuxtools –command “/bin/bash”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to check the current KUBECONFIG?

A

kubectl config view

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to get the current context?

A

kubectl config current-context

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is orchestrator?

A
  1. deploy application
  2. scale it up/down
  3. self heal.
  4. zero downtime rolling updates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Cloud native application

A
  1. Scale up/down without failure
  2. self healing
  3. rolling updates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Container Runtime Interface (CRI)

A

Abstract layer that standardizes how 3rd party container runtimes interface with Kubernetes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Runtime Classes

A

Allows different classes of runtime, Kata, gVisor provide better workload isolation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Kubernetes = ?

A

Masters + Nodes

Multi master clusters are recommended, as 3 masters or 5 masters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Control Plane/Master = ?

A

API server + Cluster store (etcd) + Controller Manager + Scheduler + Cloud Controller Manager

etcd - follows consistency over availability.

17
Q

Node = ?

A

Kubelet + CRI + Network Proxy (kube-proxy)

Kubelet does the node registration on cluster. Watches API server for new work assignments.

18
Q

If there are multiple contianer in a pod how can they call each other?

A

They can communicate using localhost. all containers in a pod share the same IP.

19
Q

How is rolling deployment handled

A

A Deployment creates a replicaSet for each new manifest applied and then for the replicaSet a pod is created. In case the new pod doesn’t work, then the previous replicaSet is used to create another pod, or retain the older pod which was known to be working.

For statefulsets, controllerrevision is created that generates the pods thereafter.

20
Q

Initialize a new cluster

A

kubeadm init –apiserver-advertise-address $(hostname -i) –pod-network-cidr

21
Q

Pod ?

A

Pause container - special type of container, all containres running inside of it will inherit the Network namespace, Hostname, Unix domain sockets.

22
Q

Control groups

A

Linux kernel tech to limit consumption of individual containers

23
Q

Create secret from command line

A

kubectl create secret generic mysecret –dry-run=client -o yaml -n cbiswal –from-literal=MYNAME=cbiswal

24
Q

Check if all pods are ready

A

kubectl wait –for=condition=Ready pods –all -n cbiswal