devops

Add different condition in Dockerfile [5 Methods]

handle different condition in dockerfile such as docker file if else condition, arg conditions, ARG vs ENV comparison with examples

Deepak Prasad7 min read
devops

Tutorial: How to manage docker container with examples ?

Tutorial Manage Docker Container. Download Docker Image from Docker Hub. How to connect and exit from docker container query docker hub and check logs

Deepak Prasad15 min read
devops

Understanding Docker Vs Containerd

Container execution is handled by containerd. You can think of it as a container supervisor that handles container lifecycle operations.

Deepak Prasad6 min read
devops

Debugging Kubernetes Operators: kubectl, Logs, and Webhook Failures

Learn how to debug Kubernetes Operators from the outside in: manager logs and flags, kubectl describe and events, stuck Terminating resources, validating and mutating webhooks (TLS, caBundle, cert-manager), conversion …

Deepak Prasad15 min read
devops

Unit Testing Operator Reconcile Logic with Ginkgo and Gomega

Structure reconciler unit tests with Ginkgo and Gomega: table-driven vs Describe/Context/It, testing pure desired-state builders vs full Reconcile with the fake client, asserting ctrl.Result and errors, when to stop and …

Deepak Prasad9 min read
devops

CI/CD for Kubernetes Operator Projects with GitHub Actions

Create a production-ready GitHub Actions CI/CD workflow for Go Kubernetes Operators: gofmt, go vet, unit tests, envtest, Makefile targets, image builds, GHCR publishing, OLM bundle validation, kind jobs, caching, …

Deepak Prasad16 min read
devops

OLM Bundles Explained: Package, Ship, and List on OperatorHub

Learn OLM bundles for Kubernetes Operators: bundle layout, CSV fields, replaces and skips, operator-sdk bundle generate validate scorecard, catalog images with opm, testing on kind with OLM, and how CSV claims map to …

Deepak Prasad11 min read
devops

OpenTelemetry Tracing for controller-runtime Operators

Add OpenTelemetry tracing to Go operators on controller-runtime: why trace reconcile, wiring TracerProvider and OTLP, propagating context into client-go and outbound HTTP, span naming and log correlation via trace id, …

Deepak Prasad12 min read
devops

Kubernetes Operator Metrics with Prometheus and controller-runtime

Expose Kubernetes Operator metrics from controller-runtime, scrape them with prometheus-operator ServiceMonitor, secure the endpoint, add custom Prometheus metrics, build useful Grafana panels, alert on reconcile errors, …

Deepak Prasad15 min read
devops

Pause and Resume Patterns for Kubernetes Operators

Design pause and resume for Kubernetes Operators: spec.paused vs annotations, what still runs when paused, skipping child updates vs deletes, finalizers and upgrades, Helm operator limits, user-facing docs, and GitOps …

Deepak Prasad9 min read
devops

From Commit to Cluster: End-to-End Operator Release Pipeline

Release a Kubernetes Operator from Git tag to cluster: build the manager image, pin digests, render Helm or Kustomize manifests, validate CRDs and OLM bundles, smoke-test with a sample CustomResource, promote through …

Deepak Prasad12 min read
devops

Configuration for Operators: Flags, Environment Variables, and Live Reload

Configure Kubernetes Operators for real clusters: cmd flags vs env vars, WATCH_NAMESPACE and common conventions, ConfigMap and Secret mounts, live reload with watches, Downward API, secret rotation, and 12-factor style …

Deepak Prasad8 min read
devops

CEL Validation in CRDs: Practical Rules for Operator APIs

Practical CEL rules in CRDs for operator APIs: x-kubernetes-validations basics, immutability with oldSelf and oldObject, when to combine OpenAPI and CEL, replicas bounds and mutual exclusions, user-facing error messages, …

Deepak Prasad9 min read
devops

Kubernetes Operator Hardening Beyond RBAC: Pod Security and Supply Chain

After RBAC, harden Kubernetes operators with non-root pods, read-only root filesystem, dropped capabilities and seccomp, projected ServiceAccount tokens, image digest pinning and signing, NetworkPolicy egress allowlists …

Deepak Prasad6 min read
devops

Migrate a Helm Chart to a Helm-Based Kubernetes Operator

Brownfield guide for teams with a production Helm chart: when plain Helm is enough vs a Helm-based operator, mapping values.yaml into a CRD spec, watches.yaml and overrideValues precedence, chart semver vs operator image …

Deepak Prasad9 min read
devops

Performance Tuning for controller-runtime: Concurrency, Client QPS, and Cache

Tune Go operators on controller-runtime for large clusters: MaxConcurrentReconciles and goroutine-safe reconcile, REST client QPS and burst, cached vs APIReader uncached reads, predicates to cut apiserver load, field …

Deepak Prasad9 min read
devops

Testing Kubernetes Operators with envtest, Fake Client, and kind

Part 3 of 3: test a Go Operator SDK operator with unit tests, fake client, envtest (CRD + status + webhooks), kind smoke tests, Kustomize packaging, safe CRD upgrades, and a troubleshooting lab.

Deepak Prasad19 min read
devops

Controller-Runtime Architecture: Manager, Cache, Informer, Workqueue Explained

controller-runtime is the Go library that powers every Kubebuilder and Operator-SDK project. This guide walks the full architecture - Manager, Cache, Informer, SharedInformerFactory, Workqueue, and the Builder DSL (For / …

Deepak Prasad15 min read
devops

Kubernetes Custom Resource Definitions (CRDs) Explained: A Complete Guide

A Custom Resource Definition (CRD) is a Kubernetes resource that registers a new object type with the API server, so kubectl, RBAC, watches, and Operators can treat your custom kind the same as a built-in Deployment or …

Deepak Prasad16 min read
devops

Operator RBAC Minimum Permissions: ClusterRole, kubebuilder Markers, Audit

A complete guide to designing, generating, and auditing RBAC for Kubernetes operators: how kubebuilder markers generate roles from `+kubebuilder:rbac` comments, the least-privilege principle as it applies to operators, …

Deepak Prasad16 min read
devops

Kubernetes CRD Version Upgrades with Conversion Webhooks

This step-by-step guide shows how to perform a Kubernetes CRD upgrade from v1alpha1 to v1 with a conversion webhook, using a self-created DemoApp operator. It walks through served and storage version contracts in a …

Deepak Prasad18 min read
devops

How to Avoid Reconcile Loop “Explosions” in Kubernetes Operators

Stop Kubernetes Operator reconcile storms: predicates and generation filters, status-only updates, accidental .spec writes, Owns() fan-out on noisy children, jittered RequeueAfter, workqueue tuning, and why event-style …

Deepak Prasad14 min read
devops

Requeue, RequeueAfter, and Error Handling in controller-runtime

Learn how controller-runtime interprets ctrl.Result, Requeue, RequeueAfter, and returned errors inside Reconcile(). Covers exponential backoff on the workqueue, terminal errors, NotFound and Conflict handling, …

Deepak Prasad11 min read
devops

Git Remote Set-URL: Change Remote Repository URL [Examples]

Learn how to use git remote set-url to change a remote repository URL. Change origin from HTTPS to SSH, add or delete push URLs, rename remotes, and fix the "this repository moved" error, with real tested examples and …

Deepak Prasad10 min read
devops

Git Remove Remote: Remove Origin, Upstream or Any Remote

Learn how to remove a Git remote, remove origin, remove upstream, verify remote removal, fix no such remote errors, and understand when to use remote remove, set-url, rename, or prune.

Steve Alila9 min read
devops

Git Remove File from Tracking Without Deleting It

Learn how to remove a file or folder from Git tracking without deleting it locally. Includes example git rm --cached output, .gitignore behavior, commit cleanup, directory removal, and skip-worktree patterns.

Steve Alila11 min read
devops

Git Push Force Explained: --force vs --force-with-lease [Examples]

Learn how to use git push force safely. Understand git push --force vs --force-with-lease, force push to a remote branch, origin master, and after rebase or amend with real examples.

Deepak Prasad8 min read
devops

Kubernetes Operator with controller-runtime: Status, Finalizers, Webhooks, and Drift

Part 2 of 3: extend a DemoApp Operator SDK project with ConfigMap, Service, Deployment, status Conditions, finalizers, drift via Owns/Watches, mutating/validating webhooks, Events, and RBAC markers.

Deepak Prasad21 min read
devops

Go Kubernetes Operator SDK Tutorial: Build a Controller from Scratch

Part 1 of 3: scaffold a Go operator with Operator SDK (go/v4), CRDs from Kubebuilder markers, RBAC, idempotent Reconcile with CreateOrUpdate, owner references, and deploy to kind.

Deepak Prasad18 min read
devops

Server-Side Apply (SSA) in Kubernetes Operators

Server-Side Apply (SSA) is the modern way for operators to express ownership of fields in a Kubernetes object. Instead of doing a full Update with a stale copy of the object, the operator sends only the fields it cares …

Deepak Prasad27 min read