Category : Kubernetes | Sub Category : Learn Kubernetes | By Prasad Bonam Last updated: 2023-11-22 07:12:19 Viewed : 549
Key components: Master, Node, Pods, Services.
lets delve into the key components of Kubernetes: Master, Node, Pods, and Services.
Master:
The master node is the control plane of the Kubernetes cluster. It manages the overall state and orchestration of the cluster.
Components:
Example:
kubectl
command involves interacting with the API server. For example:bashkubectl create deployment my-deployment --image=my-image
Node (Minion):
A node is a worker machine in Kubernetes, responsible for running containers and providing the runtime environment.
Components:
Example:
yamlapiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- name: my-container
image: my-image
Pods:
The smallest and simplest unit in the Kubernetes object model. A pod represents a single instance of a running process in a cluster.
Characteristics:
Example:
yamlapiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- name: container-1
image: image-1
- name: container-2
image: image-2
Services:
Services define a set of pods and a policy by which to access them, providing a stable endpoint for communication.
Types:
Example:
yamlapiVersion: v1
kind: Service
metadata:
name: my-service
spec:
selector:
app: my-app
ports:
- protocol: TCP
port: 80
targetPort: 8080
Understanding these key components is fundamental to working effectively with Kubernetes. The master controls the cluster, nodes run containers, pods encapsulate containers, and services enable communication between pods.