Kubernetes Advanced Notes
1. Namespaces
Namespaces are used to logically separate cluster resources. Useful in multi-team or multi-project
environments.
2. ReplicaSet & Scaling
• Ensures specified number of pod replicas are running.
• Works behind Deployment.
• Horizontal Pod Autoscaler (HPA) scales pods based on CPU/metrics.
3. StatefulSet
Used for stateful applications like databases. Provides stable network identity and persistent
storage.
4. DaemonSet
Ensures one pod runs on each node. Commonly used for logging and monitoring agents.
5. Volumes & Persistent Storage
• PersistentVolume (PV) – Cluster storage resource.
• PersistentVolumeClaim (PVC) – Request for storage by a pod.
• StorageClass – Defines storage type (dynamic provisioning).
6. RBAC (Role-Based Access Control)
• Role – Defines permissions inside a namespace.
• ClusterRole – Defines cluster-wide permissions.
• RoleBinding – Grants Role to user/service account.
7. Kubernetes Networking
Each pod gets its own IP address. Services provide stable networking. Ingress manages
HTTP/HTTPS routing.
Summary:
• Namespaces isolate resources.
• ReplicaSet & HPA manage scaling.
• StatefulSet for databases.
• DaemonSet for node-level services.
• PV/PVC manage storage.
• RBAC secures cluster access.