Core Concepts Flashcards
What are the Master Node’s responsibilities?
Manage, plan, schedule, and monitor nodes
What are the Worker Node’s responsibilities?
Host application as containers
What are the Master Node’s components known as?
The control plane
What is the primary management component of Kubernetes?
kube-apiserver
What agent runs on each node of the cluster and listens for instructions the kube-apiserver?
kubelet
What service ensures rules are in place on the worker nodes to allow the containers running on them to reach each other?
kube-proxy
What is ETCD?
A distributed reliable key-value store that is simple, secure, and fast
What is the command to list all keys used by K8?
kubectl exec etcd-master –n kube-system etcdctl get / –prefix –keys-only
What are the 6 steps required for a change in K8?
- Authenticate User
- Validate Request
- Retrieve Data
- Update ETCD
- Scheduler
- Kubelet
What is the controller’s responsibilities?
Monitor the state of various components within the system and work towards bringing the whole system to the desired functioning state.
What is the node-monitor-grace-period default value?
40s
What is the node-eviction-rate default value?
5m
What is the node-monitor-period default value?
5s
How does the scheduler assign pods?
The scheduler looks at each pod and tries to find the best node for it in two steps:
1. Filter out the nodes that do not fit the profile for the pod. eg. resource limitations
2. The scheduler then ranks the pods to identify the best fit for the pod by using a priority function to rank the nodes on a scale of 0-10
What are the responsibilities of the Kubelet?
- Register Node
- Create Pods
- Monitor Node and Pods
What is kube-proxy and what is it’s job?
A process that runs on each node in the K8 Cluster. It’s job is to look for new services and every time a new service is created, it creates the appropriate rules on each node to forward traffic to those services to the backend pods.
What is a pod?
A single instance of an application. A pod is the smallest object you can create in K8.
What is the smallest object you can create in K8?
A pod
Can a single pod have multiple containers?
Yes
What is the command to run an image in a pod?
k run <name> --image <image_name></image_name></name>
What is the command to list pods?
k get pods
What are the top level properties that are required for a K8 YAML file?
apiVersion:
kind:
metadata:
spec:
What is the command to get information about a specific pod?
k describe pod <pod_name></pod_name>
What is the command to dry run and output a pod to yaml?
kubectl run <name> --image=<image> --dry-run=client -o yaml > pod.yaml</image></name>
What is the command to edit the YAML for an existing pod?
k edit pod <pod_name></pod_name>
What is the benefit of using a replication set with a single node?
If the pod fails, a new one will automatically be brought up. The replication set will also allow you to load balance and scale.