Welcome to the Kubernetes Glossary! Kubernetes is a powerful platform for automating deployment, scaling, and management of containerized applications. Understanding its terminology is crucial for effectively using Kubernetes. This section will provide you with a comprehensive list of key terms and concepts used in Kubernetes.
A Pod is the smallest deployable unit in Kubernetes. A Pod encapsulates one or more containers that share storage, network, and IPC (Inter-Process Communication) resources. Pods are designed to run closely together and share dependencies.
Example:
apiVersion: v1
kind: Pod
metadata:
name: example-pod
spec:
containers:
- name: nginx
image: nginx:latest
A Deployment is a higher-level abstraction that manages the lifecycle of Pods. It ensures that a specified number of identical Pods are running at any given time.
Example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
A Service is an abstraction that defines a logical set of Pods and a policy by which to access them. Services enable communication between different components within the cluster.
Example:
apiVersion: v1
kind: Service
metadata:
name: example-service
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 80
targetPort: 80
A Namespace is a virtual cluster that provides a way to divide cluster resources between multiple users or teams. Each Namespace operates independently of others.
Example:
apiVersion: v1
kind: Namespace
metadata:
name: development
A ConfigMap is an API object used to store non-confidential data in key-value pairs. Pods can consume ConfigMaps as environment variables, command-line arguments, or configuration files.
Example:
apiVersion: v1
kind: ConfigMap
metadata:
name: example-config
data:
database_url: "http://database.example.com"
A Secret is an API object that stores sensitive information such as passwords, OAuth tokens, and SSH keys. Secrets are designed to be more secure than ConfigMaps.
Example:
apiVersion: v1
kind: Secret
metadata:
name: example-secret
type: Opaque
data:
password: cGFzc3dvcmQ=
An Ingress is an API object that manages external access to the services in a cluster, typically HTTP and HTTPS. It provides load balancing, SSL termination, and name-based virtual hosting.
Example:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
spec:
rules:
- host: www.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
An HPA automatically adjusts the number of Pods in a Deployment, ReplicaSet, or Replication Controller based on observed CPU utilization or other select metrics.
Example:
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: example-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: example-deployment
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
For a deeper understanding of Kubernetes API Reference, you can explore the official Kubernetes API documentation. This resource provides detailed information about all the available resources and their APIs.
By mastering these terms and concepts, you'll be well-equipped to navigate and utilize Kubernetes effectively for your containerized applications.