Kubernetes Basics Flashcards
May a pod be made up of / contain several apps?
Yes
Why would you use a service?
To expose one or more pod(s) as a coherent unit outside the cluster
Are pods accessible by default from the outside of the cluster by default?
No. Use / define a service in order to expose them
Are pods to be considered mortal / ephemeral?
Yes! If they die and you should not care.
How is the lifecycle of an app tied to the lifecycle of the pod containing the app?
They’re born and killed / die together
How are pods tied to nodes?
A single pod lives on a single node.
How are pods lifecycle tied to the lifecycle of its containing node?
If the node dies so does the pod(s) within it. The node may outlive the pods within the node, since the node may restart the pods within the node.
Within a Kubernetes cluster,
- Does an app have a unique IP-address ?
- Does a pod have a unique IP-address?
Pods have unique IP-adresses within the cluster and among pods on the same node.
Describe a Kubernetes service
A Kubernetes service define a logical group of pods
What selector is used for defining what pods go in a service?
The labelSelector
What is a kubernetes deployment?
A “blueprint” of your desired stack.
What is kubectl command for listing pods?
kubectl get pods
What is the kubectl command for listing services?
kubectl get services
Using kubectl, how does one proxy through to a Kubernetes cluster?
kubectl proxy
Say you’re experiencing more and more load and want to scale up. How would you go about increasing the number of replicas?
Change the “desired state” that is the deployment and apply the deployment to the Kubernetes Cluster - and let Kubernetes manage the matching to the new, desired state.