You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Key-value store for all cluster data, acting as Kubernetes' backing store for all cluster state and data.
Scheduler
Description: Watches for newly created Pods with no assigned node and selects a node for them to run on.
Controller Manager
Port: 10252
Description: Runs controller processes such as node controller, endpoints controller, and namespace controller.
Kubelet
Port: 10250
Description: Agent running on each node, ensuring containers are running in a Pod as intended.
Kube-proxy
Description: Manages network rules on nodes to allow network communication to Pods.
Important Kubernetes Directories
~/.kube/config
Path: ~/.kube/config
Description: This is the default location for a user's kubeconfig file, which stores the cluster connection and access information. It allows kubectl and other Kubernetes client tools to communicate with the Kubernetes cluster. The file contains details such as cluster definitions, user credentials, and context for switching between clusters.
Management:
Use kubectl config commands to view, modify, and manage your kubeconfig settings.
Merge multiple kubeconfig files by setting the KUBECONFIG environment variable to a list of file paths to aggregate configuration from those files.
/etc/kubernetes/
Description: The main configuration directory for Kubernetes components.
Key Subdirectories:
/etc/kubernetes/manifests/: Contains static pod manifests for starting control plane components as static pods.
/etc/kubernetes/pki/: Stores the Certificate Authority (CA) and other TLS certificates for securing cluster communication.
/var/lib/kubelet/
Description: The primary directory used by the kubelet.
Key Subdirectories:
/var/lib/kubelet/pods/: Data about pods managed by the kubelet, including volumes and configuration.
/var/lib/kubelet/pki/: Contains the kubelet's private key and certificate.
/var/lib/etcd/
Description: Default directory for etcd data storage.
Key Points: Contains the etcd database with all Kubernetes cluster state.
/var/log/
Description: Contains log files for Kubernetes components and the container runtime.
Key Subdirectories:
/var/log/kube-apiserver.log: Logs from the Kubernetes API server.
/var/log/kube-scheduler.log: Logs from the Kubernetes scheduler.
/var/log/kube-controller-manager.log: Logs from the Kubernetes controller manager.
/var/log/kubelet.log: Logs from the kubelet service.
/var/log/containers/: Logs for containers managed by Kubernetes.
/etc/cni/net.d/
Description: Where CNI plugin configurations are stored.
Kubernetes Important Commands
Resource Management
Command
Description
Example Usage
create
Create a resource from a file or from stdin.
kubectl create -f <config-file>
delete
Delete resources by names, file, or types.
kubectl delete pod <pod-name>
apply
Apply a configuration change to a resource from a file.
Note: In the commands above, <service> can be specified with or without the .service suffix (e.g., kubelet or kubelet.service). Including .service is optional and used for more clarity, especially in scripts or when different unit types with the same name exist.