Knowledge Check: Kubernetes Basics Flashcards
Pod
a group of one or more containers (such as Docker containers), the shared storage for those containers, and options about how to run the containers.
What provides load balancing across a set of pods
Services
What are some reasons you would prefer to use Deployments rather than unmanaged pods?
- Deployments are compatible with Horizontal Pod Autoscalers
- Deployments can reschedule pods that fail
- Deployments support rolling updates and rollbacks
True or False: Deployments support rolling updates and rollbacks?
True
True or False: Deployments are unable to reschedule pods that fail?
False. Deployments can reschedule failed pods.
True or false: Deployments are compatible with horizontal pod autoscalers?
True
True or false: Deployments support a variety of restart policies
False
True or False: A Service provides a mechanism for accessing a logical set of pods?
True
What are the the Kubernetes Service types?
NodePort
LoadBlancer
ClusterIP
ExternalName
What is a ClusterIP Service?
Exposes a service which is only accessible from within the cluster.
What is a NodePort Service?
Exposes a service via a static port on each node’s IP.
What is a LoadBalancer Service?
Exposes the service via the cloud provider’s load balancer.
What is an ExternalName Service?
Maps a service to a predefined externalName field by returning a value for the CNAME record.
How does an ExternalName service map a service to a predefined External field?
By returning a value for the CNAME record.
What is PersistentVolume
a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.
True or False PersistentVolume lifecycle is tied to the pod which claimed it?
False, a PersistentVolume is independent of the pod that uses the PV.
What field of PersistentVolume controls the number of nodes that can mount the PersistentVolume for reading and writing?
accessMode
What are the supported values of the accessMode field?
ReadWriteOnce
ReadOnlyMany
ReadWriteMany
What is a Deployment
a higher-level controller that automates rolling updates of applications declaratively.
What controls the automated updates of applications declaratively?
Deployments
True or False: Replication Controllers are the prefered mechanism for deploying applications in Kubernetes?
False. Deployments are the prefered mechanism as they are a higher-level controller that automates rolling updates.
True or False: Volumes must be explicitly claimed by pods?
False. Volumes do not require the use of claims. Simply including a volume in a Pod spec is enough to create and access the volume in the pod.
True or False: Volumes, like persistent volumes, use claims to create?
False. Volumes can be created in a pod spec, however, the volume lifecycle ends with the pod.
True or False: PersistentVolumes must be explicitly claimed by pods
True: PersistentVolumes must be claimed by pods using PersistentVolumeClaims.
True or False: Both Volumes and PersistentVolumes can be accessed by all of the containers in the pod enclosing them.
True
Two kubectl commands for collecting information about any active resource
get
describe
True or False: Containers are a type of Kubernetes resource?
False
Rolling update
Updates a service without an outage
How do rolling updates work?
updates one pod at a time, rather than taking down the entire service at the same time.