What are the 2 Kubernetes roles? - answer1. master
2. worker
What 4 Kubernetes components run on the master node? These are the control pane. -
answer1. etcd - distributed, synchronised data storage for the cluster.
2. kube-apiserver - the primary interface for the cluster
3. kube-controller-manager - operates the cluster controllers (e.gg. node controller,
replication controller, endpoints controller).
4. kube-scheduler - schedules pods to run on nodes
What 2 additional components that run on every node? - answer1. kubelet - agent that
executes containers on each node (runs as a service - sudo systemctl status kubelet)
2. kube-proxy - handles network communication between nodes by adding firewall
routing rules
What do we mean by scheduling? - answerKubernetes schedules pods to run on
servers in the cluster.
What 4 daemons run on a worker node? - answer1. Container technology e.g. Docker
2. Kubadm
3. Kubelet
4. Kubectl
How do you get a list of nodes in the cluster? - answerkubectl get nodes
How to get more detailed information about a specific node - answerkubectl get node
<<name>> -o yaml
How do you get summary information about a specific node - answerkubectl describe
node <<name>>
How do find out the version of Docker that is installed? - answersudo docker version
How do you find which version of Kubernetes is installed? - answerkubeadm version or
kubectl version
,What 4 properties do all Kubernetes objects have? - answer1. API Version including
kind
2. Metadata (name, namespace, labels)
3. Spec = desired state
4. Status = actual state
What is a Kubernetes pod? - answerA group of one or more containers and a set of
resources shared by those containers (e.g. storage and networking).
What kinds of kubernetes objects are there? - answer1. Naked pods
2. Deployments
3. Services
4. Jobs
5. Quota
How do you create a name space imperatively? - answerkubectl create namespace
ckad
How do you run an nginx pod (naked) imperatively in a namespace called chad? -
answerkubectl run nginx --image=nginx --restart=Never -n chad
How do you create a pod using a yaml file? - answerkubectl create -f
<<filename.yaml>>
What 2 ways can you edit a running pod? - answer1. kubectl apply -f
<<filename.yaml>>
2. kubectl edit pod <<pod name>> -n <<namespace>>
How do you stop \ delete a pod? - answerkubetcl delete pod <<pod name>>
Cluster > Node > Pod > Container - answer
Does every pod and every node in the cluster have it's own IP address? - answerYes
By default, what other pods can one pod in a cluster communicate with? - answerAll
other pods in the cluster even if that pod is running on a different node.
How can you find out the IP address of your pods? - answerkubectl get pods -o wide
What is the process for deployment of a container? - answer1. kubectl
2. Master --> API Server
3. Master --> etcd
4. Master --> scheduler
5. Worker --> Kubelet
6. Worker --> Pod
, 7. Worker --> Container (docker)
What are the 5 lifecycle phases of a pod? - answer1. Pending
2. Running
3. Succeeded
4. Failed
5. Unknown
How can you see the pods that run the control pane pods? - answerkubectl get pods -n
kube-system
What do services allow? - answerDynamic access to a group of replica pods so that
external entities have a standard access \ endpoint to access the pods.
It is an abstraction layer on top of a set of replica pods so that external entities interact
with the service while pods may come and go.
What are 3 use cases for running multiple containers in a pod? - answer1. Sidecar
container - enhances functionality of main container e.g. syncing files from git repository
to file system.
2. Ambassador - proxy (representing primary container to outside world). Capturing and
translating input e.g. network traffic.
3. Adapter -Changing output of container e.g. logging \ monitoring
What 3 ways can containers in the same pod communicate with each other? - answer1.
Network
2. Shared storage
3. shareProcessNamespace (add attribute to pod namespace).
How do you switch to a namespace? - answerkubectl ... -n namespace
How do you list all namespaces? - answerkubectl get all - -all-namespaces (dash dash?
How do you create a yaml file file from kubectl run? - answer1. kubectl run nginx --
image=nginx --restart=Never --port=80 --dry-run -o yaml > nginx-pod.yaml
2. kubectl apply -f nginx-pod.yaml
How can you examine the properties of a pod? - answerkubectl describe pods nginx -n
ckad
kubectl describe pods nginx -n ckad -o yaml
How would you grep the status of a pod? - answerkubectl describe pods nginx -n ckad |
grep Status:
kubectl describe pods nginx -n ckad -o yaml | grep phase
How would you control runtime behaviour into a pod without baking it into image? -
answerEnvironment variables
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Dreamer252. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.49. You're not tied to anything after your purchase.