Understanding ndots in Kubernetes DNS Resolution

Understanding ndots in Kubernetes DNS Resolution The ndots option in DNS configuration plays a subtle but important role in how domain names are resolved inside Kubernetes pods. Incorrectly configured ndots can lead to unnecessary DNS queries, delays, or failed resolutions. What is ndots? ndots is a setting in /etc/resolv.conf that determines whether a DNS query is treated as a fully qualified domain name (FQDN) or a partial name requiring search path resolution. ...

August 25, 2025 · 2 min · 295 words · John Cena

Static Pods in Kubernetes: What, Why, and How

Static Pods in Kubernetes: What, Why, and How In Kubernetes, most pods are managed by the control plane through controllers like Deployments or DaemonSets. However, there’s a special kind of pod called a static pod. These are managed directly by the kubelet on each node, bypassing the Kubernetes API server. Why Use Static Pods? Static pods are useful when: You want to ensure critical system components (like logging or monitoring agents) are always running. You don’t want to rely on the control plane to schedule pods. You’re bootstrapping a Kubernetes cluster and need kubelet to run etcd or control-plane components before the API server is available. Key Characteristics Managed only by the kubelet. Not visible via kubectl get pods unless mirrored by the API server. Defined using simple YAML files placed in a designated directory. How to Create a Static Pod 1. Enable Static Pod Path on Kubelet Make sure the --pod-manifest-path is set in your kubelet config or systemd service file: ...

August 23, 2025 · 2 min · 313 words · John Cena

How to Distribute Load Effectively in Kubernetes

How to Distribute Load Effectively in Kubernetes Managing and distributing load in a Kubernetes cluster is key to ensuring system performance and reliability. Kubernetes offers several native features that help balance traffic and workload across nodes and pods. Why Load Distribution Matters Evenly distributed load improves: System responsiveness Resource utilization Cluster stability Cost-efficiency 1. Horizontal Pod Autoscaler (HPA) HPA automatically scales pods based on CPU/memory or custom metrics. kubectl autoscale deployment myapp --cpu-percent=50 --min=2 --max=10 Ensure metrics-server is installed for HPA to function. ...

August 20, 2025 · 2 min · 231 words · John Cena

Kubectl Tricks: Boost Your Kubernetes Productivity

Kubectl Tricks: Boost Your Kubernetes Productivity kubectl is the primary command-line tool for interacting with Kubernetes clusters. While the basics are widely known, mastering some lesser-known tricks can significantly enhance your daily workflow. 1. Quickly Switch Contexts kubectl config use-context my-cluster kubectl config get-contexts Use kubectx for even faster context switching. 2. View Resources with Custom Columns kubectl get pods -o custom-columns="NAME:.metadata.name,STATUS:.status.phase" 3. Watch Resource Changes in Real-Time kubectl get pods --watch 4. Debug a Running Pod kubectl exec -it my-pod -- /bin/sh 5. Apply YAML from stdin cat pod.yaml | kubectl apply -f - 6. Port Forward a Pod to Localhost kubectl port-forward svc/my-service 8080:80 7. Set a Temporary Alias alias k='kubectl' 8. Output as YAML/JSON kubectl get pod mypod -o yaml kubectl get pod mypod -o json Conclusion These kubectl tricks are just a starting point. Efficient CLI usage can drastically reduce time spent managing Kubernetes clusters. ...

August 20, 2025 · 1 min · 149 words · John Cena

What is Longhorn? How to Install and Use It in Kubernetes

What is Longhorn? Longhorn is a lightweight, distributed block storage system designed for Kubernetes. Created by Rancher Labs, it’s built specifically for cloud-native environments and enables highly available persistent volumes using standard Kubernetes interfaces. Key Features Cloud-native: Designed specifically for Kubernetes. Highly Available: Replicates volumes across nodes. UI and CLI Tools: Easily manage storage through web interface or CLI. Incremental Snapshots and Backups: Built-in support. Easy to Deploy and Use: Helm and YAML options available. Why Use Longhorn? Kubernetes does not manage storage on its own — it needs a CSI (Container Storage Interface) driver. Longhorn is a popular open-source choice that offers: ...

August 20, 2025 · 2 min · 318 words · John Cena