Review questions Flashcards
A pod requires a Replication Controller in order to run.
False
In the manifest, you define a pod and then a Replication Controller creates a template that it then uses to create the replicas.
False
If you scale your replication controller with “–replicas=0”, the current pods will remain but when they crash they will not be revived.
False
What is the difference between a ClusterIP service and a NodePort service?
ClusterIP:
- The default type of service, it creates a virtual IP to enable internal communication between different pods within the cluster.
- It can only be accessed internally at the ClusterIP:Port
NodePort:
- Exposes the node externally at the NodePort (to users that are on the same network as the node)
- It can be accessed at NodeIP:NodePort
What are endpoints?
They track the IP addresses of the Kubernetes objects that the service sends traffic to. In other words, these are the target objects, in our case the pods (cannot be a loopback address or a virtual IP).
How to get more information on the services you have deployed?
kubectl get service -o wide
kubectl describe service
How can you create and run pods?
kubectl run (image, ContainerPort, label...) kubectl create -f
What is the purpose of Labels and Selectors?
Organize and categorize your cluster
Schedule and load balance traffic
What is the difference between a Deployment and Replication Controller?
Deployments use ReplicaSets (the next generation of RC) to keep the pods running
Deployments support rolling updates and rollbacks, rollouts can be paused
What is the difference between a ReplicaSet and a Replication Controller?
ReplicaSet is the next generation of Replication Controller, which implies it has more features.
ReplicaSet uses set-based selectors in addition to equality-based selectors
ReplicaSet is created by deployment by default
Difference between set-based and equality-based selectors
EB Selectors:
- Easy to use
- Less powerful
- 1 key can only have 1 value
- =, ==, !=
SB Selectors:
- Complex
- More powerful
- 1 key can have more than 1 values
- in, notin, exists
What are the use cases of selectors?
Application name
Location
Resources
Similarity between set-based and equality-based selectors
Use to select specific Kubernetes objects
Which of the following best describes the function of the Kubernetes Control Plane?
Controls the cluster and regulates communication with different Kubernetes elements