Kubernetes Flashcards
explain the entrypoint of the kubernetes
The entrypoint is a server API that the k8s cluster has in the MASTER NODE.
How is the Kubernetes Architecture
The kubernetes cluster is made of at least one MASTER NODE, and connected to it, you have a couple of WORKER NODES (called nodes).
Each node has a kubelet process running on it. KUBELET allows each node to communicate with each other and execute some tasks like running application processes.
The WORKER NODES have the containers on them, where your applications are running.
On the MASTER NODE, you have k8s processes to manage the cluster properly.
what is the etcd?
It is a key value storage that is on the master node, it holds the state of the kubernetes cluster (the data of each node and where each container is).
with this, you can recover the whole cluster state.
what is the scheduler
the scheduler is a process that the MASTER NODE runs, that decides on which worker node the next container will be scheduled (based on the current resources)
what is the controller manager
Process which run in the MASTER NODE, which keeps track of what is happening on the cluster.
It ensures that the desired state, as specified in resource definitions, is continuously maintained by creating, updating, and deleting resources as needed.
This includes controllers for ReplicaSets, Deployments, and more.
what is the Virtual Network
In Kubernetes, a virtual network is a logical network that connects containers and pods across nodes in a cluster. It enables communication between containers and services, abstracting the underlying physical network infrastructure. It is often implemented through Kubernetes’ networking plugins, allowing pods to communicate as if they were on the same local network, even if they’re on different nodes in a cluster.
What is Ingress
In Kubernetes, Ingress is a resource that manages external access to services within the cluster, typically for HTTP and HTTPS traffic. It provides rules and configuration for routing requests to the appropriate services based on hostnames or paths.
Name all the services of the Master Node
- API Server
- Controller manager
- Scheduler
- etcd
Explain Secret and ConfigMap
Secret: Kubernetes resource for storing sensitive information, like passwords and API keys, securely. The encryption depends on who configures K8s
ConfigMap: Kubernetes resource for storing configuration data, environment variables, and other non-sensitive configuration settings.
You can change these variables without having to redeploy
explain volumes
Kubernetes doesn’t manage data persistence.
Docker volumes are a way to persist and share data between containers and the host machine. They allow data to survive container lifecycle, and you can use them for data sharing and data persistence.
it could be in local machine or outside of the k8s cluster.
what are the 3 parts of a K8s file?
- metadata
- specification
- state (added by K8s, comparing current state, from etcd, with desired state, for instance, amount of replicas).
what are deployment and statefulset in K8s?
Deployment: A Kubernetes resource for managing and scaling stateless applications with rolling updates and rollback capabilities.
StatefulSet: A Kubernetes resource for managing stateful applications with stable network identities and ordered pod creation and termination.
what is minikube?
a way to run k8s in a local machine, having all the nodes as virtual in the same machine/node. It is used for development and testing
what is the command to apply a configuration to k8s
kubectl apply -f <nameOfTheFile></nameOfTheFile>