Understanding Kubernetes (K8s) Terminologies

Understanding Kubernetes (K8s) Terminologies

By: Altaf Ahmad

1. Kubernetes (K8s)

  • Kubernetes (also called K8s) is a tool that helps you manage applications by running them in containers (isolated environments).
  • Kubernetes helps deploy, scale, and manage these containers automatically.

Example: Think of Kubernetes as the control room for a large ship. It helps direct, organize, and monitor all activities to keep everything running smoothly.

?

2. Cluster

  • A cluster is a group of computers that Kubernetes uses to run and manage applications. Each cluster consists of multiple computers (called nodes).
  • Kubernetes treats this group as a single unit.

Example: Imagine a team of workers. Each worker has a specific role, but they all work together to accomplish a big task (the cluster).

?

3. Node

  • A node is a single computer (or server) within the cluster that runs the application containers.
  • There are two types of nodes: Master Node (which controls everything) and Worker Nodes (which do the actual work).

Example: If the cluster is a team, then each node is a person on that team, with the master node as the team leader and worker nodes as the workers.

4. Pod

  • A pod is the smallest unit in Kubernetes. It usually runs one application container, but it can run multiple related containers if needed.
  • Each pod has its own unique IP address and shares resources.

Example: Think of a pod like a small box with a single app inside (or a few tightly connected apps). Each box has a label (IP) that makes it easy to find.

5. Service

  • A Service is like a doorway to a set of pods. It provides a consistent way to access pods, even if they come and go.
  • Kubernetes automatically load-balances traffic across all pods linked to a service.

Example: Imagine a restaurant with a service counter. Customers go to the counter (service) without knowing which cook (pod) will handle their order.

6. NodePort

  • NodePort is a way to make a service accessible from outside the cluster.
  • When you set up a NodePort service, Kubernetes assigns a port number to each node, allowing you to access your application by typing <NodeIP>:<NodePort>.

Example: Think of NodePort as giving each node a window through which people can interact with the app from outside the cluster.

7. Network Policies

  • Network Policies are rules that control communication between pods, making it possible to restrict access.
  • These policies are like firewalls for pods. By default, Kubernetes allows all pods to communicate with each other; network policies can limit this.

Example: In a large building, network policies are like doors that only some people can open, ensuring that only specific people have access to certain rooms.

8. Ingress

  • Ingress is a resource that manages external access to services within the cluster, typically HTTP or HTTPS traffic.
  • It provides a way to define rules to route external traffic to specific services within the cluster.

9. Container Network Interface (CNI) Plugins

  • Kubernetes doesn’t handle low-level networking itself. Instead, it uses CNI (Container Network Interface) plugins to manage network connectivity. Popular CNIs include Cisco ACI, Juniper Contrail and Broadcom NSX.

?Examples in Practice

Imagine you have a cluster with several nodes running an e-commerce application. Here’s how Kubernetes concepts work in this setup:

  1. Pods: You have a pod for each part of the app, like the frontend, backend, and database.
  2. Nodes: Each pod runs on a node. One node might handle the frontend pods, and another node might handle backend pods.
  3. NodePort: You use NodePort to make the frontend accessible to users from outside the cluster.
  4. Network Policies: You set up network policies to allow the frontend pods to communicate with backend pods while restricting access to the database pods

Naveed A.

CCDE | CCIEx4 | JNCIE | VCIX-NV | CISSP

1 周

Very informative

Raja Waqar Ahmad

Network & Security Specialist | CCIE, JNCIP, SD-WAN Expert | 12+ Years in Network Infrastructure | I help global enterprises streamline network operations with cutting-edge technologies and strategic planning

1 周

Very informative

Sajid Bashir

Operations Engineer ( Data Center ) PMP? CCNA CCNP-R&S| CCNP Enterprise Core | Cisco SD-WAN Implementation |PCNSA | PCCSA| NSE 1| NSE 2 | MS-Azure Fundamental| Alibaba Cloud Associate| Alibaba Cloud Professional (ACP)

2 周

Excellent

要查看或添加评论,请登录

Altaf Ahmad的更多文章