Ankit ☁︎ ❯ (@ankit_ops2799) header
Ankit ☁︎ ❯ (@ankit_ops2799) profile picture

Cloud & DevOps Engineer 🛠️ | AWS • Azure • Docker • Kubernetes ☸️ Building & Automating Scalable Infrastructure 🏗️

India
Joined September 2011
Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)Photo by Ankit ☁︎ ❯ (@ankit_ops2799)
The world will keep moving, whether we worry or not. So tonight, choose rest over overthinking, gratitude over regret, and hope over uncertainty. Some things become clearer when we stop chasing them. Good night!
2
37
Helm upgrade failed halfway and left your release broken? By default, Helm leaves a failed release as it is. Fix it: 1. `helm upgrade --atomic --timeout 5m`: rolls back automatically if the upgrade fails 2. `helm diff upgrade`: preview changes before you apply them 3. `helm history <release>` then `helm rollback <release> <rev>`: go back to a known good version Bonus: add `--atomic` to your CI pipeline once and forget about it. Let the failed deploy undo itself.
1
4
245
ClusterIP: inside the cluster. NodePort: plus a port on every node. LoadBalancer: plus a cloud load balancer, usually at a cost. Default to ClusterIP. Expose only what you must. Which type are most of your Services using?
2
4
10
271
Your alerts are firing, your P99 latency is climbing, and you're refreshing Grafana hoping it fixes itself. It won't. These checks tell you where to look. promtool check rules validates your alert rule files before Prometheus reloads. One YAML typo can break the whole config, so run it first. amtool alert query lists every firing alert straight from your terminal. Useful when Slack is delayed. amtool silence add mutes a known alert storm during a planned maintenance window, with a comment explaining why. Check for cardinality spikes. If one metric jumps from thousands of series to over a million, someone attached an unbounded label like user_id. That's how Prometheus runs out of memory. Check your 5xx error rate per service. It shows which dependency is burning your error budget right now. Check P99 latency per route. Averages hide the slow requests your highest-value users are hitting. Check whether targets are reachable. up == 0 shows every target Prometheus can't scrape. Zero alerts means nothing if the metrics stopped arriving. Find the fire first. Then check whether your monitoring is still telling you the truth.
38
Your Docker container is running as root. That's the default. If someone escapes the container, they land on the host with root-level access. Fix it: 1. Add `USER 1000` (or a named user) to your Dockerfile 2. In Kubernetes, set `runAsNonRoot: true` 3. Add `readOnlyRootFilesystem: true` so nothing can be written to Bonus: drop all capabilities and add back only what you need. Least privilege starts in the Dockerfile.
2
2
5
266
Good morning. 🌄 The sky doesn't compete with yesterday's sunrise. It simply paints another morning in its own colours. Perhaps there is something to learn from that.
3
1
3
89
Whatever remains unfinished today can wait for another sunrise. You don't have to figure everything out tonight. Give yourself permission to rest, breathe, and begin again tomorrow. Good night!
1
31
Your AWS bill jumped 40 percent and nobody deployed anything new. Something is quietly bleeding money. Check for unattached EBS volumes. They keep billing 24/7 after the instance is gone. Check for idle Elastic IPs. AWS charges for every public IPv4 address, even ones sitting unused. Check for load balancers with zero targets. They cost roughly $18 to $25 a month per AZ while routing nothing. Check NAT Gateway data charges. Route S3 and DynamoDB traffic through free VPC endpoints and skip the per-GB fee. Check stopped instances. Their attached volumes keep charging even while the server sits off. Check old snapshots and CloudWatch logs with no retention policy. Both pile up forever unless you set a limit. Find the bill before the invoice does. Clean up first, then ask why it grew.
5
9
237
Dashboard: CPU at 30%. Users: "the app is slow." Everyone checks the database. Nobody checks throttling. A CPU limit is enforced in short time slices. A container can burn its whole quota early in a slice, then sit frozen until the next one. The average looks calm while requests wait. Check cpu.stat inside the container. If nr_throttled keeps climbing, that is your answer. Does your dashboard show throttle rate, or only CPU average?
2
1
10
257
You create a pod, and a few seconds later it's running on node 7. Nobody told it to go there. The scheduler picked it. It works in two steps. First it filters out nodes that can't run the pod: not enough CPU or memory, a taint the pod doesn't tolerate, a wrong label. Then it scores the nodes that are left and picks the best one. The key detail is that it schedules by your resource requests, not by actual usage. A node that looks idle can still be "full" if the pods on it requested everything. A pod stuck in Pending usually means no node passed the filter. Run `kubectl describe pod` and the events tell you why.
2
4
155
Hardcoded AWS keys in CI are a breach waiting to happen. Short-lived roles and rotation beat long-lived tokens every time. Check which identity your runner is actually using. If it's a stale key instead of a short-lived role, you're leaking access. Need to kill a leaked database login? Revoke its temporary credentials instantly, no PostgreSQL restart needed. Audit your CI secrets. Anything untouched for a year is overdue for rotation. Scan your repo before commits. Stop AWS keys and private keys from reaching Git history. Zero trust starts when static credentials stop existing.
1
4
212
Good morning. 🌤️ Less proving. More improving. Less comparing. More living.
2
5
94
Deleting a file in a later Dockerfile layer does not shrink the image. The earlier layer still holds it. Clean up in the same RUN, or use a multi-stage build.
5
157
Your server feels slow, CPU looks fine, and writes take 5 seconds. The bottleneck is usually disk I/O or the hypervisor. Check I/O wait. If your CPUs are sitting idle waiting on slow storage, that's the problem. Check steal time. If a noisy neighbor on the same host is taking your CPU cycles, you'll see it here. Check disk utilization. If the disk is maxed out and latency keeps climbing, you've hit its IOPS limit. Find the process. Something is hammering the disk, and it's usually a backup job, a log flood, or a debug logger. Check available memory, not free memory. Linux uses spare RAM for caching, so low free memory isn't a problem by itself. Check network throughput. You may be hitting your cloud provider's bandwidth cap. Find the bottleneck before you resize anything.
1
8
217
Good morning. ☕ A peaceful mind is a better status symbol than an expensive lifestyle.
1
2
84
Ran `kubectl delete` on production when you meant staging? Your context decided that, not you. Fix it: 1. `kubectl config current-context` before any destructive command 2. Show the context in your shell prompt (kube-ps1) 3. Use `kubectx` and `kubens` to switch fast and deliberately Bonus: set a different prompt color for prod so you can't miss it. Check the context before you press Enter.
1
2
1
6
254
A node goes NotReady. For the next five minutes, its pods still show Running. Nothing is reachable, but nothing has moved yet. By default, Kubernetes waits about 5 minutes before evicting pods from an unhealthy node. Run kubectl describe node and read the Conditions. Ready: Unknown and Ready: False point to different problems, so check which one it is before touching anything. Did a "Running" pod ever mislead you during a node failure?
1
2
8
216
Your Linux server is acting up, and restarting it won't tell you why. These systemd and journalctl commands will. Think of a server like a building with many staff. Each service is one worker. When one fails quietly, you need to find out who. systemctl --failed lists every service that has crashed. Run it first when you SSH into a broken server. journalctl -u kubelet -p err --since "30 min ago" shows only the error messages from the last 30 minutes. You skip the thousands of routine status lines. journalctl -k -g "oom-killer|segfault" checks the kernel's logs. If the kernel killed your app for using too much memory, this shows it, even when the app logs say nothing. systemctl list-timers shows every scheduled job and when it last ran. Useful for catching backups or certificate renewals that quietly stopped. systemctl edit --full nginx.service lets you change a service's settings without the change getting wiped out by system updates. Find the failed worker. Read the error. Check the kernel. Then fix it.
2
86
Some days you grow. Some days you rest. Both count.
34
Not every question needs an immediate answer. Some thoughts become clearer with time, some decisions need distance, and some things make sense only when we stop trying so hard to understand them. Good Morning. Happy Monday.
32