Kubernetes Components explained Flashcards
A Node is a simple server it can be a
physical or a virtual machine that has the resources to run containers and pods
Pod is an abstraction over a container it creates
a running environment or a
layer on top of the container, e.g. Docker container. 🐳
Why does Kubernetes abstract away the container runtime or container
technologies?
So you don’t have to work directly with Docker or whatever container technology you use in Kubernetes. can easily replace them if you want to without making
changes to the existing Kubernetes configuration.
How does the virtual network inside of Kubernetes facilitate communication inside the cluster?
Each Pod gets its own IP address. They communicate using that IP address, which is a cluster internal IP address.
Why are Pods considered to be ephemeral?
They die very easily ☠ This can happen when the server runs out of resources, the
application crashes or the server gets restarted.
Why are Pods considered to be ephemeral?
They die very easily ☠ This can happen when the server runs out of resources, the
application crashes or the server gets restarted.
To make your application accessible through a browser you need to create an
External Service
Which is a Service that makes the application accessible from external clients, like a browser.
Ingress is the entry
point to your Kubernetes cluster. So, instead of a Service,
the request goes first to Ingress, which forwards it to the Service.
ConfigMap is an
external configuration for your application.
ConfigMap usually contains configuration data like
URLs of databases or some other Services that your application uses.
You create a ConfigMap _________________ of the pod and then pass it to the pod on
startup
independently
What is the process of changing the name of a service endpoint with and without configMap?
Now, if you change the name of the service endpoint, you just adjust the
ConfigMap, restart the pod and that’s it. 😎 You don’t have to rebuild an image and
go through this whole cycle.
Secret’s is another Kubernetes component just like ConfigMap, but the difference is
that it’s used to store
secret data, like credentials or certificates. It’s stored in base64 encoded format
Secret’s is another Kubernetes component just like ConfigMap, but the difference is
that it’s used to store
secret data, like credentials or certificates. It’s stored in base64 encoded format
You can use the data from ConfigMap or Secret inside your application Pod as
environmental variables or as a properties file.
The Secret component has built-in mechanisms like
encryption, defining authorization policies
Not enabled by default
What happens to data when a pod dies?
Kubernetes doesn’t provide data persistence out of the box. So the data is lost
The Volume component attaches a
physical storage on a hard drive to your Pod
The Volume storage location could be (3)
on a local server on-premises
on the same server Node where the Pod is running
or it could be on a remote cloud server
Kubernetes explicitly doesn’t manage any data persistence a Kubernetes user or an administrator is responsible for (3)
backing up the data
replicating the data
and managing it to ensure it’s kept on proper hardware
If you need to update the docker image for “my-app” what is the most efficient way to get this done without manually updating each pod?
You update it in the deployment, and deployment will then automatically update and restart all running pods.
A pod is a layer of _______________ on top of containers and _______________ is another
abstraction on top of _______,
abstraction
Deployment
Pods
Services are used to communicate
between the Pods