Kubernetes is an open-source container orchestration system for automating software deployment, scaling, and management. Google originally designed Kubernetes, but the Cloud Native Computing Foundation now maintains the project.
Get Started with Kubernetes Cluster from $70/month.
What are Kubernetes clusters?
A Kubernetes cluster is a collection of nodes that are designed to run containerized applications. Containerization of applications involves packages of an app plus all its dependencies and critical services. Containers are more agile and lightweight than virtual machines.
What is Kubernetes architecture?
Kubernetes refers to cloud architecture characterized by a loosely coupled mechanism for service discovery across a cluster. A Kubernetes cluster consists of one or more control planes, and one or more compute nodes.
Why do we need Kubernetes?
Kubernetes provides agility, scalability, and portability in cloud applications. When an application receives high traffic, the Kubernetes load balancer distributes the traffic across the network to the different instances and nodes in the deployment.
- Storage orchestration: Kubernetes allow automatic mounting of different storage systems from private cloud, public cloud, local storage e.t.c
- Portability: Migration of cloud apps has never been easier, with Kubernetes you can migrate your app across public cloud, private cloud, hybrid cloud e.t.c easily.
What are the two types of Kubernetes nodes?
There are two types of nodes: The master node runs the Kubernetes control plane which controls the entire cluster, managing the state of the cluster and distributing the workloads. A cluster can have one or more master nodes for redundancy. Worker nodes are usually the powerful nodes within a cluster that runs the containerized workloads, (pods usually run on the worker nodes).
What is the difference between the master node and worker node?
Master node is the most important node that manages the state of the cluster and also distributes workloads across the cluster.
Worker nodes are usually the powerful nodes within a cluster that runs the containerized workloads (pods usually run on the worker nodes).
What is a Kubernetes pod vs cluster?
A Kubernetes pod refers to an application instance or the smallest unit of a cluster, typically a running process in a cluster. A Kubernetes cluster is a collection of nodes that are designed to run containerized applications. Containerized applications run as pods in the nodes. A cluster consists of one master node or machine and multiple worker nodes or machines. The master node manages the state of the cluster and distributes workload across the worker nodes.
What is the difference between a pod and a node?
In Kubernetes, Pods are simply the smallest unit of replication or execution in a Kubernetes cluster, usually consisting of one or more containers, each with one or more applications and its dependencies services or binaries. Nodes on the other hand refer to the physical servers or Virtual Machines (VM) that make up the Kubernetes Cluster.
What is a container vs VM?
There is one major difference between a container and a VM. While a container only virtualizes software layers above the operating system, VM goes deeper to virtualize the entire server to hardware layers.
Is a node a container?
No. Containers refer to a collection of one or more applications and their dependent services or binaries. Pods on the other hand refer to a collection of one or more closely-related and tightly coupled containers. In summary, a node is the computing resource that runs pods to execute workloads (containers).
What is Kubernetes Namespace?
Namespaces may refer to virtual sub-clusters designed to help organize the cluster. It’s important when a cluster is shared by different projects or teams. Namespaces are logically separated from each other but with the ability to communicate with each other.
What relationship between Pod and Namespace?
A pod is the smallest unit of replication on a Kubernetes cluster; A Kubernetes cluster usually contains many pods, related or unrelated grouped under the logical borders or virtual sub-clusters called namespaces.
How many types of POD are there in Kubernetes?
There are two types of pods in a Kubernetes Cluster:
Pods that run a single container, also known as “one-container-per-Pod”. This is the most common Kubernetes Pod, the Pod acts as a wrapper around a single container. In this case, Kubernetes, therefore, manages Pods and NOT the containers directly.
Pods that run multiple containers that need to work together. A Pod can also run multiple tightly coupled, co-located containers that share. The co-located containers, therefore, forms a single cohesive unit of service. In this case, the Pod wraps the containers, their storage resources, and an ephemeral network identity together as a single cohesive unit.
Does pod IP change?
The Pod IP cannot change while the Pod is running, but it’s important to note that the pod can stop running. Only Statefulset provides a stable network through the provision of a consistent pod name and consistent DNS name in kubedns/coredns.
How do two containers in the same pod communicate?
It’s important to note that the Multiple containers in the same Pod usually share the same IP address. These containers communicate with each other anytime by addressing the localhost.
What is cluster IP address?
A cluster IP in Kubernetes is the Single IP address for the cluster. It’s the proxy that provides the load balancing to all the IP addresses within the internal network of the cluster.
How many nodes can run in a Kubernetes Cluster?
Kubernetes cluster can support up to 5000 nodes, no more than 150,000 pods, and not more than 300000 total containers.
What is the difference between NodePort and ClusterIP?
ClusterIP: This is the default service type. It is used to expose the Service on a cluster-internal IP. Therefore, a service with ClusterIP is only reachable from within the cluster.
NodePort: A service can be configured to use NodePort when exposing the service on the Node’s IP at a specific static port -the NodePort.
How many pods are in a cluster?
There are 110 Pods per node – maximum by default. Each node further has /24 IP range for its Pods and thus a Maximum of 256 Pod IPs per node.
What are Secrets in Kubernetes?
For better application security, sensitive and confidential information such as passwords, tokens, and keys is not included within the application code or in a pod specification. This sensitive information is stored within the secrets.
A Secret is, therefore, an object within the Kubernetes cluster that stores sensitive data such as passwords, tokens, and keys.
What is ingress?
Ingress in Kubernetes refers to a collection of rules that define inbound connections to the services. Ingress is a consolidated inbound routing rules resource that allows access to Kubernetes Service from outside the Kubernetes cluster.
What is a load balancer in Kubernetes?
The Kubernetes load balancer is an algorithm that distributes traffic on the network. Connections are usually directed to the first server or node to its optimum capacity after which subsequent traffic is directed to the second or next server in the pool of servers.
What is the helm in Kubernetes?
Helm is a third-party Kubernetes deployment tool used for automating the creation, packaging, configuration, and deployment of applications and services on a Kubernetes Cluster.
What is a helm chart?
Helm chart refers to a packaging format used by Helm to package all files that describe related Kubernetes resources. A chart can be used to deploy simple objects like pods, to complex deployments such as a production web app with proxy servers, databases, caches, failover options e.t.c.
What is PV and PVC in Kubernetes?
PVs refer to volume plugins or API objects for example Volumes that have an independent lifecycle to the Pods using it. PVs capture storage implementation details such as NFS, iSCSI, public cloud storage system e.t.c
A PersistentVolumeClaim (PVC) on the other side is simply a storage request by a user.
Is Kubernetes the same as Docker?
No. Docker refers to software used in packaging containerized applications into containers while Kubernetes is the software that runs the containers across a cluster.
Kubernetes and Docker are different and can be used separately.
Can Kubernetes run without Docker?
Yes and No
Kubernetes is the software platform that runs (Docker) containers. Therefore, Kubernetes requires containers to function. However, containers can be produced without Docker- Docker is just one way to package the container.
What’s Docker – it’s a software platform that since 2013 has been simplifying the process of building, running, managing, and distributing applications through containers.
Is Docker a framework?
Yes, it is right to say Docker is a framework, Docker can be defined as a subset of the Moby project, a software framework for building, running, and managing containers on servers and the cloud.
How many containers can run in Docker?
It can run (8) Eight Containers per Host.
Is Docker only container software?
No, Docker is known for allowing developers to build, run, pull, push, and inspect container images. Of course, there are alternative tools to do either of the tasks.
Why is Docker so popular?
One of the reasons is that Docker was one of the first software in space. The growth of micro services in cloud computing has made Docker even more popular. This is because Docker is used to build, run, pull, push, and inspect container images.
Can I learn Kubernetes without Docker?
Yes, and No. Docker is the technology used to build, run, pull, push, and inspect container images to deploy in the Kubernetes cluster. Therefore, even if you set up the Kubernetes cluster, you will need Docker to deploy the containers to the cluster.
Why Docker is faster than VM?
Yes, Docker is faster than VM because Docker is a container virtualized at the software level and not at the hardware level like VM.
Docker shares a host kernel and therefore it’s more agile and lightweight compared to virtual machines.
How do I put two images in a Dockerfile?
It’s easy to put two images in a Dockerfile since the command FROM can appear twice or more in a single Dockerfile, FROM is used in images. Ensure you note down the last image ID output by the commit before calling a new FROM command
What is multi-stage Docker?
Multi-stage Docker build allows defining of multiple images in a single Dockerfile using multiple FROM commands, and therefore it allows the build of multiple images in the final product.