Skip to main content
XenonStack

Enterprise Cloud

XenonStack Insights Kubernetes Deployment: Tools and Best Practices

and | Published | Updated

Kubernetes Deployment: Tools and Best Practices
14:57
Kubernetes Deployment guide: layers from container image to Deployment, controls and safe repeatable releases

Key takeaway

  • Kubernetes Deployment explained: rollout and rollback, production best practices, security controls and which tools are still maintained in 2026.

A Kubernetes Deployment is the object that keeps a stateless application running at the version and replica count you declare, and replaces Pods gradually when you change it. According to the Kubernetes documentation, "a Deployment manages a set of Pods to run an application workload, usually one that doesn't maintain state." For an enterprise team, the Deployment is the unit of release: it decides how a new version rolls out, how fast, and how you go back.

This guide covers how a Deployment works, the practices that matter in production, which tools are still worth using in 2026, and the security and cost questions a CTO or platform lead should settle first. For the cluster internals behind it, see our guide to Kubernetes architecture and components.

What is Kubernetes and what does a Deployment add?

Kubernetes is, in the project's words, "a portable, extensible, open source platform for managing containerized workloads and services". The documentation says Google open sourced the project in 2014. Its feature list includes service discovery and load balancing, storage orchestration, automated rollouts and rollbacks, automatic bin packing, self-healing, secret and configuration management, batch execution and horizontal scaling (source: kubernetes.io overview).

A Deployment sits on top of Pods and ReplicaSets. You describe the desired state in YAML (image, replicas, ports, probes), apply it, and the controllers move the cluster towards that state. This is why a Deployment is the normal choice for web services and APIs, while databases and other stateful workloads usually need different objects.

How does a Kubernetes Deployment roll out and roll back?

The Deployment strategy is either RollingUpdate, which is the default, or Recreate. With Recreate, all existing Pods are killed before new ones are created. With a rolling update, old ReplicaSets scale down while the new one scales up. The documentation gives a default of 25% for both maxSurge and maxUnavailable, and a default revisionHistoryLimit of 10 (source: Deployments).

Two-column diagram pairing four Deployment risks (unpinned image, unready Pod, bad release, broad access) with controls (version tag, readiness probe, rollout undo, RBAC and Pod Security).
DecisionWhat the documentation saysWhat it means for you
Roll backkubectl rollout undo deployment/<name>, optionally with --to-revisionRollback depends on kept revisions, so do not set revisionHistoryLimit to zero by habit
Record the reasonThe kubernetes.io/change-cause annotation is copied to each revision; the --record flag is deprecatedSet the annotation in your pipeline instead of using --record
Canary releaseCreate multiple Deployments, one per release, following the canary patternPlain Deployments give you canary by hand; use a progressive delivery tool if you need automated traffic shifting
SelectorsDo not overlap labels or selectors with other controllersOverlapping selectors can make controllers conflict and behave unexpectedly

For a zero-downtime release pattern with two parallel environments, read our guide to blue-green deployment in Kubernetes.

Which components decide where and how a Deployment runs?

Older write-ups call the control plane the "master". Current documentation uses control plane and nodes. These are the components a deployment touches, in the words of the components page.

ComponentOfficial one-line descriptionRole in a deployment
kube-apiserver"The core component server that exposes the Kubernetes HTTP API."Every kubectl apply and every controller action goes through it
etcd"Consistent and highly-available key value store for all API server data."Holds the desired state your Deployment declares
kube-scheduler"Looks for Pods not yet bound to a node, and assigns each Pod to a suitable node."Uses Pod resource requests to place new Pods
kube-controller-manager"Runs controllers to implement Kubernetes API behavior."Runs the controllers that keep replicas at the declared count
cloud-controller-manager"Integrates with underlying cloud provider(s)."Connects load balancers and nodes to your cloud
kubelet"Ensures that Pods are running, including their containers."Starts, probes and stops containers on each node
kube-proxy"Maintains network rules on nodes to implement Services."Routes Service traffic to Pods

What are the Kubernetes deployment best practices for production?

These practices come from the Kubernetes documentation. Treat them as a baseline checklist for every team that ships to your clusters.

PracticeWhy it mattersSource
Pin image versions, avoid :latestThe docs say to avoid the latest tag in production and to use a meaningful tag and/or a digest, so every node runs the same codeImages
Add readiness, liveness and startup probesReadiness decides when a container accepts traffic, liveness decides when to restart it, startup checks that the application has started. The docs warn that incorrect liveness probes can lead to cascading failuresProbes
Set resource requests and limitsThe scheduler uses requests to place Pods; the kubelet and kernel enforce limits. CPU limits are a hard ceilingResource management
Allow Pods to terminate gracefullyThe default terminationGracePeriodSeconds is 30. The kubelet runs any preStop hook, sends SIGTERM, then SIGKILL when the period endsPod lifecycle
Use namespaces and labelsSeparate teams and environments, and give selectors something precise to matchNamespaces
Pull private images with imagePullSecretsThe docs call this the recommended approach for images in private registriesImages
Expose services deliberatelyService types are ClusterIP, NodePort and LoadBalancer. For public access the docs point to an Ingress or a Gateway, and to Gateway API implementations over external IPsService

Sidecar containers are defined as init containers with restartPolicy: Always, which keeps them running for the Pod's lifetime (see sidecar containers). For wider patterns, see our guide to Kubernetes container design patterns.

How do you secure a Kubernetes deployment?

Security belongs in the Deployment manifest and the cluster policy, not in a later review. Three controls from the documentation carry most of the weight.

ControlWhat the documentation saysAction
RBAC least privilege"Ideally, minimal RBAC rights should be assigned to users and service accounts." Avoid wildcard permissions, and do not use cluster-admin except where specifically needed. Get, list and watch on Secrets can all reveal their contentsGrant namespace-level roles, review bindings, restrict Secrets access
Pod Security StandardsThree profiles: Privileged (unrestricted), Baseline (prevents known privilege escalations) and Restricted (follows current Pod hardening best practices)Enforce Baseline as a minimum and Restricted for new workloads, using Pod Security Admission namespace labels
Network policiesNetworkPolicies control traffic at IP and port level, but need a network plugin that implements them; without one they have no effectConfirm your CNI enforces them, then default-deny per namespace

Sources: RBAC good practices, Pod Security Standards and Network Policies. Common practice, such as running as a non-root user and using a read-only root file system, is expressed in the Restricted profile and the Pod securityContext. For automation of these checks, see Kubernetes security automation. Teams running autonomous agents on clusters can also use AgentGRC, which keeps autonomous agent actions inside policy, with the audit trail risk teams need.

Which Kubernetes deployment tools are still worth using?

Several tools named in older articles have changed status. Check each against its own page before standardising.

ToolWhat it doesCurrent status (as read on its own page)
kubectlThe command-line tool for the Kubernetes APICore tool; see the kubectl reference
kubeadmProvides kubeadm init and kubeadm join as best-practice fast paths for creating clustersMaintained by the project; kubeadm docs
HelmDescribes itself as the package manager for Kubernetes; charts define, install and upgrade applicationsActive; helm.sh announces Helm 4. See helm.sh and our Helm guide
KomposeHelps users familiar with docker-compose move to KubernetesActive repository; Kompose. Review its output before use, it is a starting point
KubesprayDeploys a production-ready Kubernetes cluster on AWS, GCE, Azure, OpenStack, vSphere, Oracle Cloud Infrastructure (experimental) or bare metalActive; requires Ansible on the machine that runs it. Kubespray
Kubernetes DashboardWeb UI for clustersArchived by its owner on 21 January 2026; its README suggests Headlamp. Repository
KubeFedFederation of multiple clustersRepository archived and no longer in active development. Repository

The Ingress NGINX controller has also been retired: the Kubernetes project said best-effort maintenance would continue until March 2026, with no further releases or security fixes afterwards, and recommended migrating to Gateway API (source: Kubernetes blog). If you still run it, plan the migration now. For CI/CD on clusters, see Jenkins on Kubernetes and Kubernetes Operators.

How do you deploy an application to Kubernetes step by step?

This is the shortest path from source code to a running Deployment. Each step maps to a control you can automate.

  1. Create a cluster. Use a managed service from your cloud provider, or kubeadm or Kubespray for self-managed clusters.
  2. Build and push an image. Write a Dockerfile, build the image, tag it with a version or digest and push it to a registry.
  3. Connect with kubectl. Point kubectl at the cluster with credentials that follow least privilege.
  4. Handle private registries. Create a Secret of type kubernetes.io/dockerconfigjson and reference it with imagePullSecrets.
  5. Write the Deployment manifest. Set replicas, image tag, ports, probes, resource requests and limits, and the change-cause annotation.
  6. Apply and watch the rollout. Run kubectl apply, then kubectl rollout status; use kubectl rollout undo if the new version fails.
  7. Automate it. Put the manifests in version control and let a CI/CD pipeline build, test and apply them, so every release is repeatable.

What are the main Kubernetes adoption challenges?

ChallengeWhat to decideWhere to start
SecurityWho can change what, and which workloads may run privilegedRBAC, Pod Security Standards, default-deny network policy
NetworkingHow traffic enters the cluster and moves between servicesGateway API or Ingress, NetworkPolicies
StorageWhich workloads keep state and where it livesKeep stateless services in Deployments; review persistent storage separately
ObservabilityHow you see failures before users doMetrics, logs and traces per service, plus probes that reflect real health
CostWhether requests and limits match real useSet requests from measured use and review them regularly

What has changed in Kubernetes deployment in 2026?

ItemStatusSource
Supported versionsThe project maintains release branches for the most recent three minor releases; the releases page lists 1.37, 1.36 and 1.35, with roughly one year of patch support per releasekubernetes.io/releases
The --record flagDeprecated; use the change-cause annotationDeployments
Kubernetes DashboardArchived 21 January 2026GitHub
KubeFedArchivedGitHub
Ingress NGINXBest-effort maintenance until March 2026, then no further releasesKubernetes blog

Confirm the current supported versions on the releases page before you plan an upgrade, because they change several times a year.

How should an enterprise sequence Kubernetes adoption, and when is it not the right choice?

Start with one stateless service and a baseline of probes, requests and limits, RBAC and Pod Security. Add a pipeline and a rollback test next. Extend to more teams only when the baseline is enforced by policy and not by review. Kubernetes is a poor fit when a single small application runs on one server, or when the team has no capacity to operate a cluster; a managed container service can be simpler. The trade-off is control and portability against operational effort.

As teams add AI agents that deploy and change workloads, the harder question becomes which agent may take which action, under which policy. ElixirClaw is an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control, and ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents.

To map one deployment decision your agents or pipelines make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.

What should you plan for in 2027?

Kubernetes release branches have fixed end of life dates, so schedule upgrades against them. The project's releases page gives these dates for the supported minor versions.

Clusters on 1.35 or 1.36 need an upgrade path early in the year. Check the page again before you plan, as supported versions change several times a year.

Frequently asked questions

What is a Kubernetes Deployment?

A Deployment manages a set of Pods to run an application workload, usually one that does not maintain state. You declare the desired state and Kubernetes moves the cluster towards it.

How do you roll back a Kubernetes Deployment?

Run kubectl rollout undo deployment/<name>, optionally with --to-revision to pick a specific revision. The default revisionHistoryLimit is 10.

What is the default Kubernetes Deployment strategy?

RollingUpdate. Both maxSurge and maxUnavailable default to 25%. The alternative, Recreate, kills all existing Pods before creating new ones.

Should I use the latest image tag in Kubernetes?

No. The Kubernetes documentation says to avoid the latest tag in production and to use a meaningful version tag or an image digest.

Is the --record flag still used?

No. The flag is deprecated. Set the kubernetes.io/change-cause annotation on the Deployment instead.

Which Kubernetes tools have been archived?

The Kubernetes Dashboard repository was archived on 21 January 2026 and KubeFed is archived. Check each project page for current status.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue