Kubernetes Flashcards
What is a Pod ?
Applications are deployed as Pods onto a worker node of a cluster. The Pods can contain single or multiple Docker containers
What is a Deployment ?
A Deployment is an object that manages the life cycle of a stateless, replicated application. Each replica is represented by a Pod. The replicas are distributed among the nodes of a cluster for better resilience
What is a Worker Node ?
A worker node can be either a physical or virtual machine on which you can run Pods
What is a Cluster ?
A cluster is an abstraction to manage a group/set of worker nodes together. A cluster has a Control Plane and has one or more Worker Nodes
What is Tilt ?
What is Octant ?
What is a Kubernetes Manifest ?
A Manifest file is a yaml file that describes a Deployment. It usually comprises of four sections
1. apiVersion - this the version of the schema to be used to define this object
2. kind - the kind or type of Kubernetes object that you want to create - e.g. Pod, ReplicaSet, Deployment or Service
3. metadata - details about the Object that you want to create inc. key/value pairs
4. spec - a configuration section
What is a Control Plane ?
A Control Plane is that part of the Cluster that exposes, by way of an API, a means to define, deploy and manage the life cycle of Pods. It comprises all the essential elements that implement orchestration, cluster management, scheduling and health monitoring.
How to start a new minikube cluster ?
$minikube start --cpus 2 --memory 3g --driver docker --profile polar
How do you list all of the Worker Nodes in the cluster ?
$kubectl get nodes
shows a single Worker Node which hosts the Control Plane aswell as acting as a worker node
How do you see the available clusters with which you can interact ?
$kubectl config get-contexts
to show all the clusters available to interact with
How to determine current context ?
$kubectl config current-context
How to switch to specific context ?
kubectl config use-context polar
How to stop a cluster ?
minikube stop --profile polar
What is a ReplicaSet ?
kubectl - imperative
kubectl - declarative