ACloudGuru - Chapter 2: Kubernetes Fundamentals Flashcards
What is a kubernetes resource?
An object of a certain type in the Kubernetes API.
What is the command to list all available resource types in a cluster?
kubectl api-resources
What resource can be used to create your own custom resource?
CustomResourceDefinition
What is the command to get documentation for a resource type?
kubectl explain <resource_type></resource_type>
What can be used to run tasks before a pod’s main container starts?
init container
Define ReplicaSet resource?
A Kubernetes resource that ensures a given number of Pod replicas are running at any given time. Can be configured with min and max.
Define Deployment resource?
Stateless or Stateful?
What is the default deployment strategy?
A Kubernetes resource that provides a declarative description of ReplicaSets and Pods.
Ideal for scaling stateless applications.
RollingUpdate.
What is the imperative command to create a Deployment resource?
kubectl create deploy <name> --image=<image> --replicas=<replicas></replicas></image></name>
Define StatefulSet resource?
What kind of identity do replica pods have?
What additional step is required for StatefulSet?
A Kubernetes resource, similar to the Deployment resource, that provides a declarative description of ReplicaSets and Pods, but for stateful applications.
Replica Pods have sticky identity.
Must manually create a headless Service to manage Pods’ network identity.
Define DaemonSet resource?
A Kubernetes resource that dynamically runs a replica Pod on each Node, or just some Nodes in a cluster.
Define Job resource?
What subfield controls the retry logic and what is its default?
A Kubernetes resource that runs a containerized task to completion.
spec.backofflimit, default == 6
Define CronJob resource?
A Kubernetes resource that runs Jobs repeatedly according to a schedule.
What are the 2 most abstract components of a kubernetes cluster and what are they responsible for?
Control Plan: Set of components responsible for managing the cluster.
Worker Node(s): Set of components responsible for running container workloads.
What are the components of the Control Plan and what are they responsible for?
API Server: Center of the Control Plane, interface used by other components to communicate and interact with the cluster.
etcd: Distributed object storage used by the API Server.
Scheduler: Assigns new Pods to appropriate Worker Nodes.
Controller Manager: Bundles controllers, each of which provide cluster functionality.
Cloud Controller Manager: Bundles controllers that interact with the cloud provider APIs. (Optional)
What are the components of a Worker Node and what are they responsible for?
kube-proxy: Managed local routing rules on the Node to route network traffic to Pods.
kubelet: Kubernetes agent that works with the container runtime to run containers on the Node.
Container Runtime: Software that runs containers, such as containerd or CRI-O. Not part of core Kubernetes installation.