<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Michael Zion</title>
    <description>The latest articles on DEV Community by Michael Zion (@michaelzion).</description>
    <link>https://dev.to/michaelzion</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1190304%2F718d0fd6-e684-47a6-8457-813673cdb806.jpeg</url>
      <title>DEV Community: Michael Zion</title>
      <link>https://dev.to/michaelzion</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michaelzion"/>
    <language>en</language>
    <item>
      <title>Kubernetes Secrets: What They Protect and What They Don't</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Fri, 27 Nov 2026 15:30:12 +0000</pubDate>
      <link>https://dev.to/meteorops/kubernetes-secrets-what-they-protect-and-what-they-dont-5ego</link>
      <guid>https://dev.to/meteorops/kubernetes-secrets-what-they-protect-and-what-they-dont-5ego</guid>
      <description>&lt;p&gt;A Kubernetes Secret is encoded in base64, and base64 is undone by 1 command that ships with every laptop:&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Secret = a small object for a password, a token or a key.&lt;/strong&gt; The Kubernetes docs: base64 "provides no additional confidentiality over plain text"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It protects less than the name says.&lt;/strong&gt; By default Secrets are "stored unencrypted" in etcd, the cluster's database&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your cloud covers part of that.&lt;/strong&gt; EKS, GKE and AKS encrypt the storage under etcd by default. EKS (Kubernetes 1.28 and higher) also encrypts every Secret with KMS by default&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whoever can create a Pod can read the Secret.&lt;/strong&gt; In the same namespace, with no permission on Secrets at all&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The real value lives outside Git.&lt;/strong&gt; In a secrets manager, synced into the cluster by a tool&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What to do, by where you are today:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your situation&lt;/th&gt;
&lt;th&gt;What I would do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Secret manifests are committed to Git as plain YAML&lt;/td&gt;
&lt;td&gt;Rotate those values (deleting the file leaves them in the history), then move to 1 of the 4 tools below&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You run on EKS, GKE or AKS&lt;/td&gt;
&lt;td&gt;Keep the value in the cloud's secrets manager and sync it with External Secrets Operator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You run your own control plane&lt;/td&gt;
&lt;td&gt;Turn on encryption at rest with a KMS v2 provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Developers have "edit" on a namespace&lt;/td&gt;
&lt;td&gt;They can read every Secret in it. The built-in edit role allows it directly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;An app still uses the old password after a rotation&lt;/td&gt;
&lt;td&gt;Restart it. Environment variables do not update&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Create a Secret, and read it back:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create secret generic db-credentials \
  --namespace shop \
  --from-literal=username=shop \
  --from-literal=password='S!B\*d$zDsb='

kubectl get secret db-credentials --namespace shop \
  -o jsonpath='{.data.password}' | base64 --decode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second command is the whole "security" of base64.&lt;/p&gt;

&lt;p&gt;Every version, default and quote in this guide comes from the Kubernetes documentation, the AWS, Google and Microsoft docs, the Flux, Argo CD and HashiCorp docs and the tools' own repositories, as read on November 25, 2026 (Kubernetes is at v1.37).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Not sure who can read the Secrets in your production cluster?&lt;/strong&gt; In a &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;free assessment&lt;/a&gt;, a senior engineer reviews your CI/CD, infra, Kubernetes, cloud cost and on-call setup, the secrets handling included.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Find your situation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You are new to Secrets:&lt;/strong&gt; start at &lt;a href="https://meteorops.com/blog/kubernetes-secrets#a-secret-is-a-base64-object-in-the-cluster-database" rel="noopener noreferrer"&gt;a Secret is a base64 object&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You need the commands:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-secrets#create-a-secret-with-kubectl-and-read-it-back" rel="noopener noreferrer"&gt;create a Secret with kubectl&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You rotated a value and the app did not notice:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-secrets#an-updated-secret-reaches-a-pod-in-3-different-ways" rel="noopener noreferrer"&gt;how updates reach a Pod&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You are reviewing access:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-secrets#know-who-can-read-a-secret" rel="noopener noreferrer"&gt;who can read a Secret&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You were asked "are our Secrets encrypted?":&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-secrets#encryption-at-rest-has-2-layers-and-your-cloud-did-the-first" rel="noopener noreferrer"&gt;encryption at rest&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You use GitOps and Secrets are the exception:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-secrets#keep-secrets-out-of-git-with-1-of-4-tools" rel="noopener noreferrer"&gt;the 4 tools&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Pod will not start:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-secrets#fix-a-pod-that-cannot-get-its-secret" rel="noopener noreferrer"&gt;fix a Pod that cannot get its Secret&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Secret is a base64 object in the cluster database
&lt;/h2&gt;

&lt;p&gt;The docs' definition: "A Secret is an object that contains a small amount of sensitive data such as a password, a token, or a key."&lt;/p&gt;

&lt;p&gt;It exists so that the password does not sit in the container image or in the Pod spec.&lt;/p&gt;

&lt;p&gt;That is the whole promise. Separation, with a few handling rules on top.&lt;/p&gt;

&lt;p&gt;The same Secret as a manifest:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v1
kind: Secret
metadata:
  name: db-credentials
  namespace: shop
type: Opaque
stringData:
  username: shop
  password: "S!B\\*d$zDsb="
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are 2 fields for the values:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;You write&lt;/th&gt;
&lt;th&gt;Good to know&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;data&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;base64 strings&lt;/td&gt;
&lt;td&gt;What the API returns when you read the Secret&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;stringData&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Plain strings&lt;/td&gt;
&lt;td&gt;Write-only. Merged into &lt;code&gt;data&lt;/code&gt;, and it wins when a key is in both&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;base64 = a way to carry binary data in a text field. Encoding, with no key and no confidentiality.&lt;/p&gt;

&lt;p&gt;(A Secret in base64 is a password written backwards on a sticky note.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ljc8gq10uk3kztyd41g.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ljc8gq10uk3kztyd41g.webp" alt="A Kubernetes Secret is base64 and base64 is encoding: the word password becomes cGFzc3dvcmQ=, is stored in etcd unencrypted by default, and base64 --decode turns it back" width="799" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Encoding goes both ways, with no key.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;3 details that save an hour each:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Size:&lt;/strong&gt; "Individual Secrets are limited to 1MiB in size." A Secret is for credentials, a file store is for files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Newlines:&lt;/strong&gt; &lt;code&gt;echo "value" | base64&lt;/code&gt; encodes a trailing newline into the password. Use &lt;code&gt;echo -n&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server-side apply:&lt;/strong&gt; the docs warn that &lt;code&gt;stringData&lt;/code&gt; "does not work well with server-side apply". Use &lt;code&gt;data&lt;/code&gt; there&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Secret looks like a &lt;a href="https://meteorops.com/glossary/kubernetes-configmap" rel="noopener noreferrer"&gt;ConfigMap&lt;/a&gt; on purpose. The docs: "Secrets are similar to ConfigMaps but are specifically intended to hold confidential data."&lt;/p&gt;

&lt;p&gt;The difference is in the handling. A Secret is only sent to a node when a Pod on that node needs it, and the kubelet keeps it in memory (tmpfs) "so that the confidential data is not written to durable storage".&lt;/p&gt;
&lt;h2&gt;
  
  
  Pick the Secret type by what will read it
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;type&lt;/code&gt; field tells Kubernetes which keys to expect.&lt;/p&gt;

&lt;p&gt;There are 8 built-in types:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Holds&lt;/th&gt;
&lt;th&gt;Keys&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Opaque&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Anything. The default&lt;/td&gt;
&lt;td&gt;Yours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubernetes.io/tls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A certificate and its key&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;tls.crt&lt;/code&gt;, &lt;code&gt;tls.key&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubernetes.io/dockerconfigjson&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Registry credentials&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.dockerconfigjson&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubernetes.io/dockercfg&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Registry credentials, legacy format&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.dockercfg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubernetes.io/basic-auth&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A user name and a password&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;username&lt;/code&gt;, &lt;code&gt;password&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubernetes.io/ssh-auth&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;An SSH private key&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ssh-privatekey&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubernetes.io/service-account-token&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A long-lived ServiceAccount token (legacy)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;token&lt;/code&gt;, filled in by a controller&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bootstrap.kubernetes.io/token&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A node bootstrap token&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;token-id&lt;/code&gt;, &lt;code&gt;token-secret&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The rule I use: if another component reads the Secret, use that component's type. Otherwise Opaque.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;An Ingress or a Gateway reads it:&lt;/strong&gt; &lt;code&gt;kubernetes.io/tls&lt;/code&gt; (how that Secret is used is in &lt;a href="https://meteorops.com/blog/kubernetes-ingress" rel="noopener noreferrer"&gt;the Kubernetes Ingress guide&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The kubelet reads it to pull an image:&lt;/strong&gt; &lt;code&gt;kubernetes.io/dockerconfigjson&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your application reads it:&lt;/strong&gt; Opaque&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The type is a shape check and nothing more.&lt;/p&gt;

&lt;p&gt;For a TLS Secret the docs say the API server "doesn't actually validate the values for each key". An expired certificate is accepted like a valid one.&lt;/p&gt;
&lt;h2&gt;
  
  
  Create a Secret with kubectl and read it back
&lt;/h2&gt;

&lt;p&gt;4 commands cover almost every case:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# From values on the command line
kubectl create secret generic db-credentials \
  --from-literal=username=shop \
  --from-literal=password='S!B\*d$zDsb='

# From files (the key is the file name, or key=path)
kubectl create secret generic app-keys \
  --from-file=ssh-privatekey=./id_ed25519

# From a .env file of key=val lines
kubectl create secret generic app-env --from-env-file=./prod.env

# TLS and registry credentials
kubectl create secret tls shop-tls --cert=./tls.crt --key=./tls.key
kubectl create secret docker-registry regcred \
  --docker-server=registry.example.com \
  --docker-username=ci --docker-password='...'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Single quotes matter. The docs: "You must use single quotes '' to escape special characters such as $, \, *, =, and ! in your strings."&lt;/p&gt;

&lt;p&gt;Without them your shell rewrites the password before kubectl sees it.&lt;/p&gt;

&lt;p&gt;Reading is where people get surprised.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Shows&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl get secret db-credentials&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Name, type, number of keys, age&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl describe secret db-credentials&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Key names and sizes (&lt;code&gt;password: 12 bytes&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl get secret db-credentials -o yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Every value, in base64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;`kubectl get secret db-credentials -o jsonpath='{.data.password}' \&lt;/td&gt;
&lt;td&gt;base64 --decode`&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Decode in 1 piped command, as above.&lt;/p&gt;

&lt;p&gt;Why? Because pasting the encoded value into a second command puts it in your shell history, where "anyone with access to your computer could find the command and decode the secret" (the docs again).&lt;/p&gt;

&lt;p&gt;For manifests kept in Git with Kustomize, &lt;code&gt;secretGenerator&lt;/code&gt; builds the Secret from files or literals and appends a hash of the data to its name (&lt;code&gt;database-creds-5hdh7hhgfk&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;A changed value = a new name = a rollout of every workload in that kustomization that references it.&lt;/p&gt;

&lt;p&gt;That solves the update problem two sections below. It does not solve where the plain value is stored.&lt;/p&gt;

&lt;p&gt;(More everyday commands are in the &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet" rel="noopener noreferrer"&gt;kubectl cheat sheet&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Give a Secret to a Pod in 4 ways
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Way&lt;/th&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Use it for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1 environment variable per key&lt;/td&gt;
&lt;td&gt;&lt;code&gt;env[].valueFrom.secretKeyRef&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Apps that read config from the environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every key as a variable&lt;/td&gt;
&lt;td&gt;&lt;code&gt;envFrom[].secretRef&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A Secret made from a .env file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Files in a directory&lt;/td&gt;
&lt;td&gt;&lt;code&gt;volumes[].secret&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Certificates, key files, anything that rotates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Registry login&lt;/td&gt;
&lt;td&gt;&lt;code&gt;imagePullSecrets&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Private images. Read by the kubelet, never by your app&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first and the third in one Pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v1
kind: Pod
metadata:
  name: api
  namespace: shop
spec:
  containers:
  - name: api
    image: registry.example.com/shop/api:1.4.2
    env:
    - name: DB_PASSWORD
      valueFrom:
        secretKeyRef:
          name: db-credentials
          key: password
    volumeMounts:
    - name: tls
      mountPath: /etc/tls
      readOnly: true
  volumes:
  - name: tls
    secret:
      secretName: shop-tls
      defaultMode: 0400
  imagePullSecrets:
  - name: regcred
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Files from a Secret volume get mode 0644 unless you set &lt;code&gt;defaultMode&lt;/code&gt;. A private key deserves 0400 when the container runs as root, and 0440 with an &lt;code&gt;fsGroup&lt;/code&gt; when it does not (or the app cannot read its own key).&lt;/p&gt;

&lt;p&gt;The Secret has to be in the Pod's namespace. There is no cross-namespace reference.&lt;/p&gt;

&lt;p&gt;And Secrets are required by default: "None of a Pod's containers will start until all non-optional Secrets are available."&lt;/p&gt;

&lt;p&gt;Add &lt;code&gt;optional: true&lt;/code&gt; to a reference only when the app runs correctly without it.&lt;/p&gt;

&lt;p&gt;One trap with &lt;code&gt;envFrom&lt;/code&gt;: a key that is not a valid variable name is skipped, and "the Pod is allowed to start". No error. Just a Warning event (&lt;code&gt;InvalidEnvironmentVariableNames&lt;/code&gt;) and a missing variable.&lt;/p&gt;

&lt;p&gt;My default: a volume for anything that rotates, an environment variable for the rest.&lt;/p&gt;

&lt;h2&gt;
  
  
  An updated Secret reaches a Pod in 3 different ways
&lt;/h2&gt;

&lt;p&gt;You rotated the database password and updated the Secret.&lt;/p&gt;

&lt;p&gt;What the running Pod sees depends on how it consumes it:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Consumed as&lt;/th&gt;
&lt;th&gt;After the Secret changes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Volume mount&lt;/td&gt;
&lt;td&gt;Updated, eventually. Up to "the kubelet sync period + cache propagation delay"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Volume mount with &lt;code&gt;subPath&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Never updated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Environment variable&lt;/td&gt;
&lt;td&gt;Not updated "unless it is restarted"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F13ux0qbju2ef2zfx2j2v.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F13ux0qbju2ef2zfx2j2v.webp" alt="After a Kubernetes Secret changes: a volume mount is updated eventually, a volume mount with subPath is never updated, an environment variable is not updated until restart" width="799" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The same new password, 3 different outcomes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So "Secrets update automatically" is true for 1 row out of 3.&lt;/p&gt;

&lt;p&gt;And even in that row, the file changes while the process keeps the old value in memory until it reads the file again.&lt;/p&gt;

&lt;p&gt;The fix is a restart:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl rollout restart deployment/api --namespace shop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or make the restart automatic. Reloader (v1.4.25 today, with a v2 in beta) is a controller that "automatically triggers rollouts of workloads" when a Secret or ConfigMap they reference is updated.&lt;/p&gt;

&lt;p&gt;1 annotation on the Deployment turns it on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;metadata:
  annotations:
    reloader.stakater.com/auto: "true"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The opposite choice is to forbid updates.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;immutable: true&lt;/code&gt; (stable since Kubernetes v1.21) makes a Secret read-only. The docs: it "protects you from accidental (or unwanted) updates that could cause applications outages".&lt;/p&gt;

&lt;p&gt;It is a one-way door: "it is not possible to revert this change nor to mutate the contents of the data field. You can only delete and recreate the Secret."&lt;/p&gt;

&lt;p&gt;The performance benefit people quote applies to clusters with "at least tens of thousands of unique Secret to Pod mounts". For everyone else, immutable is a safety setting.&lt;/p&gt;

&lt;p&gt;Immutable Secrets pair well with the Kustomize name hash: every change is a new Secret and a normal rollout (rollouts themselves are in &lt;a href="https://meteorops.com/blog/deployment-strategies" rel="noopener noreferrer"&gt;the deployment strategies guide&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Know who can read a Secret
&lt;/h2&gt;

&lt;p&gt;More people than the &lt;a href="https://meteorops.com/glossary/kubernetes-rbac" rel="noopener noreferrer"&gt;RBAC&lt;/a&gt; (role-based access control) rules suggest.&lt;/p&gt;

&lt;p&gt;The docs list most of them. I added what each one needs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Who&lt;/th&gt;
&lt;th&gt;How&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Anyone with &lt;code&gt;get&lt;/code&gt; on Secrets&lt;/td&gt;
&lt;td&gt;Reads the Secret by name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anyone with &lt;code&gt;list&lt;/code&gt; or &lt;code&gt;watch&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;A list "response includes the contents of all Secrets"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anyone who can create a Pod in the namespace&lt;/td&gt;
&lt;td&gt;Mounts the Secret in a Pod and prints it. A Deployment or a Job works too&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anyone who can exec into a Pod that uses it&lt;/td&gt;
&lt;td&gt;Reads the file or the variable from inside the container&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A container running with &lt;code&gt;privileged: true&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;It "can access all Secrets used on that node"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anyone with access to etcd or its backups&lt;/td&gt;
&lt;td&gt;Reads the database directly. This is what encryption at rest is for&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjx0ttj5gyglnwfjqs6uv.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjx0ttj5gyglnwfjqs6uv.webp" alt="Who can read a Kubernetes Secret: get, list or watch, create a Pod in the namespace, privileged: true, access to etcd or its backups" width="799" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The pink one needs no permission on Secrets.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The third row is the one teams miss.&lt;/p&gt;

&lt;p&gt;The docs say it twice: anyone "authorized to create a Pod in a namespace can use that access to read any Secret in that namespace", and "even if cluster policies do not allow a user to read the Secret directly".&lt;/p&gt;

&lt;p&gt;Create workloads = read Secrets.&lt;/p&gt;

&lt;p&gt;So the unit of isolation is the namespace. Two teams that must not see each other's credentials get two namespaces.&lt;/p&gt;

&lt;p&gt;Count your controllers too. External Secrets Operator, Sealed Secrets and Reloader all read Secrets across the cluster.&lt;/p&gt;

&lt;p&gt;Check what an identity can do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl auth can-i list secrets --namespace shop \
  --as system:serviceaccount:shop:api

kubectl auth can-i create pods --namespace shop --as jane@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And a Role that gives 1 workload 1 Secret, with &lt;code&gt;get&lt;/code&gt; only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: read-db-credentials
  namespace: shop
rules:
- apiGroups: [""]
  resources: ["secrets"]
  resourceNames: ["db-credentials"]
  verbs: ["get"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Bind it to the workload's ServiceAccount with a RoleBinding.)&lt;/p&gt;

&lt;p&gt;Most applications need no Role at all. The kubelet delivers the Secret to the Pod, and the app never calls the API.&lt;/p&gt;

&lt;p&gt;The docs' rule for the rest: keep &lt;code&gt;watch&lt;/code&gt; and &lt;code&gt;list&lt;/code&gt; for "the most privileged, system-level components".&lt;/p&gt;

&lt;h2&gt;
  
  
  Encryption at rest has 2 layers, and your cloud did the first
&lt;/h2&gt;

&lt;p&gt;"Are our Secrets encrypted at rest?" has 2 answers, because there are 2 layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Storage layer&lt;/strong&gt; = the disk under etcd is encrypted. It protects against a stolen disk or snapshot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kubernetes layer&lt;/strong&gt; = the API server encrypts each Secret before it writes it to etcd. It also protects against someone who reads etcd itself, or an etcd backup file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither changes anything for &lt;code&gt;kubectl get secret&lt;/code&gt;. The API server decrypts for everyone RBAC allows.&lt;/p&gt;

&lt;p&gt;The common advice is "you must enable it". On a managed cluster, check first which layer is already on:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cluster&lt;/th&gt;
&lt;th&gt;Storage layer&lt;/th&gt;
&lt;th&gt;Kubernetes layer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Amazon EKS&lt;/td&gt;
&lt;td&gt;On for every cluster: etcd data is "encrypted at the disk level"&lt;/td&gt;
&lt;td&gt;On by default from Kubernetes 1.28: "default envelope encryption for all Kubernetes API data", with an AWS owned key or your own KMS key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google GKE&lt;/td&gt;
&lt;td&gt;On by default: GKE "encrypts customer content stored at rest, including Secrets"&lt;/td&gt;
&lt;td&gt;Opt-in: application-layer secrets encryption with your key in Cloud KMS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Azure AKS&lt;/td&gt;
&lt;td&gt;On by default: Azure Storage encryption, "always enabled"&lt;/td&gt;
&lt;td&gt;Opt-in: a KMS layer with keys in Azure Key Vault&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Your own control plane&lt;/td&gt;
&lt;td&gt;Yours to set up&lt;/td&gt;
&lt;td&gt;Off: the API server stores "plain-text representations of resources" until you add an &lt;code&gt;EncryptionConfiguration&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On AKS, the newer KMS experience (platform-managed or customer-managed keys) needs Kubernetes 1.33 or later, and its how-to page is still marked Preview.&lt;/p&gt;

&lt;p&gt;On your own control plane, you pick a provider. The Kubernetes docs grade them:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Strength in the docs&lt;/th&gt;
&lt;th&gt;The docs' note&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;identity&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;The default. No encryption&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aescbc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Weak&lt;/td&gt;
&lt;td&gt;"Not recommended due to CBC's vulnerability to padding oracle attacks"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aesgcm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Must be rotated every 200,000 writes&lt;/td&gt;
&lt;td&gt;Not recommended without automated key rotation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;secretbox&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;The key still sits on the control plane host&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;kms&lt;/code&gt; v1&lt;/td&gt;
&lt;td&gt;Strongest&lt;/td&gt;
&lt;td&gt;Deprecated since v1.28, disabled by default since v1.29&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;kms&lt;/code&gt; v2&lt;/td&gt;
&lt;td&gt;Strongest&lt;/td&gt;
&lt;td&gt;"A good choice if using a third party tool for key management". Stable from v1.29&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Many tutorials still show &lt;code&gt;aescbc&lt;/code&gt; with a key pasted into the file.&lt;/p&gt;

&lt;p&gt;The docs on that setup: it "only moderately improves your security posture, compared to no encryption", because the key lies next to the data it protects.&lt;/p&gt;

&lt;p&gt;Use KMS v2, so the key lives outside the cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: apiserver.config.k8s.io/v1
kind: EncryptionConfiguration
resources:
  - resources:
      - secrets
    providers:
      - kms:
          apiVersion: v2
          name: my-kms-plugin
          endpoint: unix:///var/run/kms/plugin.sock
      - identity: {}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3 rules for this file:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The first provider encrypts.&lt;/strong&gt; All of them are tried for reading. With &lt;code&gt;identity&lt;/code&gt; first, nothing is encrypted&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The API server loads it&lt;/strong&gt; from the path in &lt;code&gt;--encryption-provider-config&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Old Secrets stay as they were&lt;/strong&gt; until they are written again&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The docs' command for the third rule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get secrets --all-namespaces -o json | kubectl replace -f -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The order matters:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A KMS plugin listens on that socket on every control plane node&lt;/li&gt;
&lt;li&gt;Every API server gets the file and a restart&lt;/li&gt;
&lt;li&gt;You run the command as an administrator who can read and write every Secret. On a conflict error, run it again: the docs call it "safe to run that command more than once"&lt;/li&gt;
&lt;li&gt;You confirm it finished with no errors. Only then remove &lt;code&gt;identity&lt;/code&gt;, and restart each API server in turn&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remove &lt;code&gt;identity&lt;/code&gt; too early, and every Secret that was never rewritten becomes unreadable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep Secrets out of Git with 1 of 4 tools
&lt;/h2&gt;

&lt;p&gt;You keep everything in Git. Deployments, Services, the lot (that is &lt;a href="https://meteorops.com/blog/why-when-to-use-gitops-use-cases-principles" rel="noopener noreferrer"&gt;GitOps&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Then comes the Secret, and a manifest with base64 in it is a manifest with the password in it.&lt;/p&gt;

&lt;p&gt;The Flux docs put it plainly: "Storing Secrets in Git repositories in plain text or base64 is unsafe, regardless of the visibility or access restrictions of the repository."&lt;/p&gt;

&lt;p&gt;There are 2 families of answers. Encrypt the file, or keep the value somewhere else and fetch it.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;In Git&lt;/th&gt;
&lt;th&gt;In the cluster&lt;/th&gt;
&lt;th&gt;Status today&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;External Secrets Operator&lt;/td&gt;
&lt;td&gt;A pointer (&lt;code&gt;ExternalSecret&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;A Secret, synced from your secrets manager&lt;/td&gt;
&lt;td&gt;v2.15.0. CNCF Sandbox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secrets Store CSI Driver&lt;/td&gt;
&lt;td&gt;A pointer (&lt;code&gt;SecretProviderClass&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Files in the Pod, with no Secret object&lt;/td&gt;
&lt;td&gt;v1.6.2. Sync to a Secret and rotation are alpha&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sealed Secrets&lt;/td&gt;
&lt;td&gt;The encrypted value (&lt;code&gt;SealedSecret&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;A Secret, decrypted by the controller&lt;/td&gt;
&lt;td&gt;v0.41.2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SOPS&lt;/td&gt;
&lt;td&gt;The encrypted file&lt;/td&gt;
&lt;td&gt;A Secret, decrypted at deploy time&lt;/td&gt;
&lt;td&gt;v3.13.3. CNCF Sandbox&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvw694wy8xdsckpb74qha.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvw694wy8xdsckpb74qha.webp" alt="Keep Kubernetes Secrets out of Git with External Secrets Operator (a pointer in Git, a Secret in the cluster), Secrets Store CSI Driver (a pointer in Git, files in the Pod), Sealed Secrets (the encrypted value in Git) or SOPS (the encrypted file in Git)" width="799" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;What Git holds, and what the cluster ends up with.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  External Secrets Operator: the value stays in your secrets manager
&lt;/h3&gt;

&lt;p&gt;It "reads information from external APIs and automatically injects the values into a Kubernetes Secret".&lt;/p&gt;

&lt;p&gt;External APIs = AWS Secrets Manager, Google Secret Manager, Azure Key Vault, HashiCorp Vault and many more.&lt;/p&gt;

&lt;p&gt;A SecretStore says how to reach the store. An ExternalSecret says what to fetch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
  name: db-credentials
  namespace: shop
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: aws-secrets-manager
    kind: ClusterSecretStore
  target:
    name: db-credentials
  data:
  - secretKey: password
    remoteRef:
      key: prod/shop/db
      property: password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the first line of any example you copy. &lt;code&gt;external-secrets.io/v1beta1&lt;/code&gt; stopped being served in v0.17.0 (May 2025), and tutorials that were "updated" in 2026 still carry it.&lt;/p&gt;

&lt;p&gt;Two things to know before you depend on it.&lt;/p&gt;

&lt;p&gt;In August 2025 the maintainers stopped releases until more maintainers joined. They resumed in September 2025 and have shipped every few weeks since.&lt;/p&gt;

&lt;p&gt;And only the current minor version is supported, so plan to upgrade it often.&lt;/p&gt;

&lt;h3&gt;
  
  
  Secrets Store CSI Driver: no Secret object at all
&lt;/h3&gt;

&lt;p&gt;It mounts "secrets, keys, and certs stored in enterprise-grade external secrets stores into their pods as a volume".&lt;/p&gt;

&lt;p&gt;The value goes from the store to a file in the Pod. Nothing lands in etcd, as long as the sync feature below stays off.&lt;/p&gt;

&lt;p&gt;That is the reason to choose it, and it is also the cost: no Secret object means no &lt;code&gt;secretKeyRef&lt;/code&gt;, so no environment variables.&lt;/p&gt;

&lt;p&gt;The feature that brings them back ("Sync with Kubernetes Secrets") is listed under alpha functionality on the project's own page. So is rotation, which is off by default.&lt;/p&gt;

&lt;p&gt;On EKS the AWS provider for it is an EKS add-on (&lt;code&gt;aws-secrets-store-csi-driver-provider&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Sealed Secrets: the encrypted value lives in Git
&lt;/h3&gt;

&lt;p&gt;The project states its problem in 1 line: "I can manage all my K8s config in git, except Secrets."&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kubeseal&lt;/code&gt; encrypts a Secret with the controller's public key. Only the controller in that cluster can decrypt it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create secret generic db-credentials --namespace shop \
  --from-literal=password='S!B\*d$zDsb=' \
  --dry-run=client -o yaml | kubeseal --format yaml &amp;gt; sealed-db-credentials.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(kubeseal expects the controller under its default name in &lt;code&gt;kube-system&lt;/code&gt;. Installed elsewhere, pass &lt;code&gt;--controller-name&lt;/code&gt; and &lt;code&gt;--controller-namespace&lt;/code&gt;.)&lt;/p&gt;

&lt;p&gt;The output is safe to commit. By default it is "strict": it only unseals with the same name in the same namespace.&lt;/p&gt;

&lt;p&gt;The controller adds a new sealing key every 30 days and keeps the old ones. A rebuilt cluster without those keys cannot read a single SealedSecret.&lt;/p&gt;

&lt;p&gt;So back them up after every renewal (last month's backup cannot open what was sealed this month), and guard the backup like the most sensitive secret you have: it opens every SealedSecret in your Git history.&lt;/p&gt;

&lt;h3&gt;
  
  
  SOPS: an encrypted file and a key
&lt;/h3&gt;

&lt;p&gt;SOPS is "an editor of encrypted files" that encrypts with AWS KMS, GCP KMS, Azure Key Vault, age or PGP.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sops --age=age1example... --encrypt \
  --encrypted-regex '^(data|stringData)$' --in-place secret.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keys stay readable, values are encrypted, and a pull request shows which key changed.&lt;/p&gt;

&lt;p&gt;Flux decrypts SOPS files "by itself, without the need of additional controllers".&lt;/p&gt;

&lt;p&gt;Argo CD takes the other side. Its docs "strongly recommend" tools that fill in the Secret on the destination cluster (it names Sealed Secrets, External Secrets Operator and the CSI driver) and "strongly caution against" decrypting during manifest generation, because generated manifests sit "in plaintext in its Redis cache".&lt;/p&gt;

&lt;h3&gt;
  
  
  How I would pick
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You are on a cloud:&lt;/strong&gt; the cloud's secrets manager + External Secrets Operator. This is my default&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A rule says the value must never be in etcd:&lt;/strong&gt; Secrets Store CSI Driver, files only&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You have no secrets manager and use Flux:&lt;/strong&gt; SOPS with age or a KMS key&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You have no secrets manager and use Argo CD:&lt;/strong&gt; Sealed Secrets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You already run Vault:&lt;/strong&gt; the Vault Secrets Operator (v1.6.2), which "synchronizes secrets from Vault to native Kubernetes Secrets"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;HashiCorp documents 3 integrations for Vault: that operator, a CSI provider, and the Agent Injector, which runs a sidecar and renders secrets "to a shared memory volume".&lt;/p&gt;

&lt;p&gt;One rule covers all of them: 1 place holds the real value, and everything else is a copy that can be rebuilt.&lt;/p&gt;

&lt;p&gt;(The wider topic has its own page: &lt;a href="https://meteorops.com/glossary/secrets-management" rel="noopener noreferrer"&gt;secrets management&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  ServiceAccount tokens stopped being Secrets
&lt;/h2&gt;

&lt;p&gt;If you learned Kubernetes before 2022, you remember a &lt;code&gt;default-token-xxxxx&lt;/code&gt; Secret in every namespace.&lt;/p&gt;

&lt;p&gt;Before v1.24, Kubernetes generated a token Secret for every ServiceAccount. Those tokens never expired.&lt;/p&gt;

&lt;p&gt;The docs now call that "a legacy mechanism".&lt;/p&gt;

&lt;p&gt;What a Pod gets today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;→ A token from the TokenRequest API, mounted through a projected volume&lt;/li&gt;
&lt;li&gt;→ Requested for 1 hour, and refreshed by the kubelet before it expires&lt;/li&gt;
&lt;li&gt;→ Bound to the Pod: it stops working when the Pod is deleted&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before you promise an auditor "1 hour", decode a token from your own cluster. The API server can extend the expiry of these tokens (the &lt;code&gt;--service-account-extend-token-expiration&lt;/code&gt; flag, on by default).&lt;/p&gt;

&lt;p&gt;Old auto-generated tokens that stay unused for a year are marked invalid (from v1.29), and later removed.&lt;/p&gt;

&lt;p&gt;You can still create a &lt;code&gt;kubernetes.io/service-account-token&lt;/code&gt; Secret by hand. The docs allow it only when "the security exposure of persisting a non-expiring token credential in a readable API object is acceptable to you".&lt;/p&gt;

&lt;p&gt;For a CI system that needs a token, &lt;code&gt;kubectl create token&lt;/code&gt; gives a short-lived one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix a Pod that cannot get its Secret
&lt;/h2&gt;

&lt;p&gt;Start with the events at the bottom of &lt;code&gt;kubectl describe pod&lt;/code&gt;. The kubelet "reports an Event for that Pod, including details of the problem fetching the Secret".&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you see&lt;/th&gt;
&lt;th&gt;Usual cause&lt;/th&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pod stuck in &lt;code&gt;CreateContainerConfigError&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;An environment variable points at a Secret or a key that does not exist&lt;/td&gt;
&lt;td&gt;The name, the namespace and the key in &lt;code&gt;secretKeyRef&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pod stuck in &lt;code&gt;ContainerCreating&lt;/code&gt; with a &lt;code&gt;FailedMount&lt;/code&gt; event&lt;/td&gt;
&lt;td&gt;A volume points at a Secret that does not exist&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;secretName&lt;/code&gt;, and that the Secret is in the Pod's namespace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;ImagePullBackOff&lt;/code&gt; on a private image&lt;/td&gt;
&lt;td&gt;A pull "from a private registry without imagePullSecret", or with a wrong one&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;imagePullSecrets&lt;/code&gt; on the Pod or on its ServiceAccount&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The app gets "access denied" with the right password&lt;/td&gt;
&lt;td&gt;A trailing newline was encoded with it&lt;/td&gt;
&lt;td&gt;Decode and pipe to &lt;code&gt;wc -c&lt;/code&gt;. Recreate with &lt;code&gt;echo -n&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The app still uses the old value&lt;/td&gt;
&lt;td&gt;Environment variable or &lt;code&gt;subPath&lt;/code&gt; mount&lt;/td&gt;
&lt;td&gt;Restart the workload&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 variable is missing and the Pod runs&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;envFrom&lt;/code&gt; skipped a key that is not a valid variable name&lt;/td&gt;
&lt;td&gt;The Pod's events, then the key names in the Secret&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;illegal base64 data&lt;/code&gt; on apply&lt;/td&gt;
&lt;td&gt;A plain value under &lt;code&gt;data&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Move it to &lt;code&gt;stringData&lt;/code&gt; or encode it. A plain value that happens to be valid base64 is accepted, and decoded into garbage&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;(What that first status means is in the glossary: &lt;a href="https://meteorops.com/glossary/createcontainerconfigerror" rel="noopener noreferrer"&gt;CreateContainerConfigError&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  The Secrets checklist
&lt;/h2&gt;

&lt;p&gt;Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The real value lives in 1 place outside Git&lt;/li&gt;
&lt;li&gt;No Secret manifest with &lt;code&gt;data&lt;/code&gt; or &lt;code&gt;stringData&lt;/code&gt; is committed unencrypted&lt;/li&gt;
&lt;li&gt;You know at which layer your cluster encrypts Secrets at rest, and with whose key&lt;/li&gt;
&lt;li&gt;1 namespace per trust boundary&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;list&lt;/code&gt; and &lt;code&gt;watch&lt;/code&gt; on Secrets belong to system components and cluster admins, never to a team role&lt;/li&gt;
&lt;li&gt;Anything that rotates is mounted as a volume, without &lt;code&gt;subPath&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A rotation ends with a restart, by hand or by Reloader&lt;/li&gt;
&lt;li&gt;Private keys are mounted with a tight &lt;code&gt;defaultMode&lt;/code&gt; (0400 or 0440), never the default 0644&lt;/li&gt;
&lt;li&gt;Every value was created with &lt;code&gt;echo -n&lt;/code&gt; or &lt;code&gt;--from-literal&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The application never logs the value&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Kubernetes Secrets FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Are Kubernetes Secrets encrypted?
&lt;/h3&gt;

&lt;p&gt;Not by default. The values are base64 encoded, and Kubernetes stores them unencrypted in etcd unless encryption at rest is configured. EKS, GKE and AKS encrypt the storage under etcd, EKS (Kubernetes 1.28 and higher) also encrypts each Secret with KMS by default, and on your own control plane you turn it on with an EncryptionConfiguration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are Kubernetes Secrets secure?
&lt;/h3&gt;

&lt;p&gt;They are as secure as your RBAC and your etcd. A Secret keeps a password out of the image and the Pod spec, and that is all. Anyone who can create a Pod in the namespace can read it.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between a ConfigMap and a Secret?
&lt;/h3&gt;

&lt;p&gt;Both hold key and value pairs for Pods. A Secret is meant for confidential data: it is only sent to nodes that need it, it is kept in memory on the node, kubectl hides its values by default, and it can be encrypted at rest and locked down with RBAC separately.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the maximum size of a Kubernetes Secret?
&lt;/h3&gt;

&lt;p&gt;1MiB per Secret. The limit exists "to discourage creation of very large Secrets that could exhaust the API server and kubelet memory". A namespace can also be limited in the number of Secrets with a resource quota.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I decode a Kubernetes Secret?
&lt;/h3&gt;

&lt;p&gt;With &lt;code&gt;kubectl get secret NAME -o jsonpath='{.data.KEY}' | base64 --decode&lt;/code&gt;. Keep it as 1 piped command so the encoded value does not land in your shell history.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I list the Secrets in Kubernetes?
&lt;/h3&gt;

&lt;p&gt;With &lt;code&gt;kubectl get secrets&lt;/code&gt; for the current namespace, or &lt;code&gt;kubectl get secrets --all-namespaces&lt;/code&gt;. The output shows names, types and key counts, never the values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do Pods pick up a changed Secret without a restart?
&lt;/h3&gt;

&lt;p&gt;Only when the Secret is mounted as a volume without &lt;code&gt;subPath&lt;/code&gt;, and then after a delay. Environment variables keep the old value until the container restarts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I use External Secrets Operator or Sealed Secrets?
&lt;/h3&gt;

&lt;p&gt;External Secrets Operator when you have a secrets manager, which on a cloud you do. Sealed Secrets when you have none and want the encrypted value in Git next to everything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Recap!
&lt;/h2&gt;

&lt;p&gt;If you take away 1 thing from this guide, let it be this:&lt;/p&gt;

&lt;p&gt;A Secret separates the password from the code. Protecting it is your job.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;base64 = encoding. Anyone who can read the object can read the value&lt;/li&gt;
&lt;li&gt;Create a Pod = read the Secrets of that namespace&lt;/li&gt;
&lt;li&gt;Encryption at rest has 2 layers. Check which one your cloud gives you before you build anything&lt;/li&gt;
&lt;li&gt;A volume updates eventually. An environment variable needs a restart&lt;/li&gt;
&lt;li&gt;Git gets a pointer or an encrypted file. Never the value&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You don't NEED anyone for this. The checklist above is the whole job, and the 4 tools are all open source.&lt;/p&gt;

&lt;p&gt;If you would rather have someone who has done it look at your setup first (yes, I sell DevOps engineers), start with the &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;free assessment&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>cloud</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Kubernetes Ingress: How It Works After ingress-nginx</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Thu, 26 Nov 2026 15:30:34 +0000</pubDate>
      <link>https://dev.to/meteorops/kubernetes-ingress-how-it-works-after-ingress-nginx-8fc</link>
      <guid>https://dev.to/meteorops/kubernetes-ingress-how-it-works-after-ingress-nginx-8fc</guid>
      <description>&lt;p&gt;Kubernetes Ingress still works on every cluster, but the controller that about half of cloud native environments ran it on (the Kubernetes committees' figure) got its last release in March 2026:&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ingress = routing rules.&lt;/strong&gt; An API object that maps a host and a path to a Service, for HTTP and HTTPS only&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A controller does the work.&lt;/strong&gt; The Kubernetes docs: "Only creating an Ingress resource has no effect"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The API is frozen, and it stays.&lt;/strong&gt; No new features, and "no plans to remove Ingress from Kubernetes"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ingress-nginx is retired.&lt;/strong&gt; Last release on March 19, 2026, repository archived on March 24, 2026&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New work goes to Gateway API.&lt;/strong&gt; That is the Kubernetes project's own recommendation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What to do, by where you are today:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your situation&lt;/th&gt;
&lt;th&gt;What I would do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;New cluster, nothing exposed yet&lt;/td&gt;
&lt;td&gt;Start on Gateway API with your cloud's controller&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ingress objects on a maintained controller (AWS, Traefik, F5 NGINX, HAProxy, Cilium)&lt;/td&gt;
&lt;td&gt;Keep them. Write new routes as HTTPRoutes when the controller supports both&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ingress objects on ingress-nginx&lt;/td&gt;
&lt;td&gt;Migrate now. It has had no patches for 8 months&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AKS with the managed NGINX add-on&lt;/td&gt;
&lt;td&gt;Migrate this month. Microsoft's support ends in November 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GKE Ingress&lt;/td&gt;
&lt;td&gt;Plan the move to GKE Gateway. Google put GKE Ingress in maintenance mode&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The object itself, in its smallest valid form (from the Kubernetes docs):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress
spec:
  ingressClassName: nginx-example
  rules:
  - http:
      paths:
      - path: /testpath
        pathType: Prefix
        backend:
          service:
            name: test
            port:
              number: 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the command from the retirement announcement, to check whether a cluster runs ingress-nginx (run it with cluster administrator permissions):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods --all-namespaces --selector app.kubernetes.io/name=ingress-nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every version, date and quote in this guide comes from the Kubernetes documentation and blog, the Gateway API site, the projects' own repositories and the AWS, Google and Microsoft docs, as read on November 24, 2026.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Still running ingress-nginx in production?&lt;/strong&gt; In a &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;free assessment&lt;/a&gt;, a senior engineer reviews your CI/CD, infra, Kubernetes, cloud cost and on-call setup, the ingress layer included.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Find your situation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You are new to Ingress:&lt;/strong&gt; start at &lt;a href="https://meteorops.com/blog/kubernetes-ingress#an-ingress-is-a-list-of-rules-and-a-controller-does-the-work" rel="noopener noreferrer"&gt;an Ingress is a list of rules&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A path does not match:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-ingress#pathtype-decides-which-requests-match" rel="noopener noreferrer"&gt;pathType decides which requests match&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You run ingress-nginx:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-ingress#ingress-nginx-is-retired-the-timeline" rel="noopener noreferrer"&gt;the timeline&lt;/a&gt;, then &lt;a href="https://meteorops.com/blog/kubernetes-ingress#migrate-off-ingress-nginx-in-8-steps" rel="noopener noreferrer"&gt;the 8 steps&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You are choosing a controller:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-ingress#what-to-run-in-place-of-ingress-nginx" rel="noopener noreferrer"&gt;what to run in its place&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An Ingress returns 404 or 503:&lt;/strong&gt; go to &lt;a href="https://meteorops.com/blog/kubernetes-ingress#fix-an-ingress-that-does-not-route" rel="noopener noreferrer"&gt;fix an Ingress that does not route&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  An Ingress is a list of rules, and a controller does the work
&lt;/h2&gt;

&lt;p&gt;A Service of type ClusterIP is only reachable inside the cluster.&lt;/p&gt;

&lt;p&gt;An Ingress is the object that says which outside requests reach which Service.&lt;/p&gt;

&lt;p&gt;In the docs' words: an Ingress "exposes HTTP and HTTPS routes from outside the cluster to services within the cluster".&lt;/p&gt;

&lt;p&gt;The object stores rules. It moves no traffic.&lt;/p&gt;

&lt;p&gt;An Ingress controller reads the rules and configures a proxy or a cloud load balancer to follow them.&lt;/p&gt;

&lt;p&gt;What happens to one request:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A user opens shop.example.com/api&lt;/li&gt;
&lt;li&gt;→ DNS points to the load balancer in front of the controller&lt;/li&gt;
&lt;li&gt;→ The controller compares the host and the path to every Ingress rule it owns&lt;/li&gt;
&lt;li&gt;→ The matching rule names a Service and a port&lt;/li&gt;
&lt;li&gt;→ The request goes to a Pod behind that Service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1jznagmu0u6msxi46fae.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1jznagmu0u6msxi46fae.webp" alt="How a request reaches a Pod through a Kubernetes Ingress: user, DNS, load balancer, Ingress controller, Service, Pods. The Ingress holds the rules and the Ingress controller reads them" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The Ingress is the rules. The controller is the thing that routes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An Ingress with no controller does NOTHING. kubectl accepts it, and then: no error, no event, no address.&lt;/p&gt;

&lt;p&gt;Ingress next to the Service types, in the docs' own words:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Object&lt;/th&gt;
&lt;th&gt;What it exposes&lt;/th&gt;
&lt;th&gt;Use it for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Service, ClusterIP&lt;/td&gt;
&lt;td&gt;"a cluster-internal IP", the default&lt;/td&gt;
&lt;td&gt;Everything that sits behind an Ingress or a Gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Service, NodePort&lt;/td&gt;
&lt;td&gt;"each Node's IP at a static port", 30000 to 32767 by default&lt;/td&gt;
&lt;td&gt;The plumbing under a load balancer, rarely more&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Service, LoadBalancer&lt;/td&gt;
&lt;td&gt;1 Service through "an external load balancer"&lt;/td&gt;
&lt;td&gt;TCP or UDP, or a single public Service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ingress&lt;/td&gt;
&lt;td&gt;Many Services "behind a single listener", HTTP and HTTPS only&lt;/td&gt;
&lt;td&gt;Websites and APIs that share 1 entry point&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The reason Ingress exists is in 1 line of the docs: "An Ingress allows you to keep the number of load balancers down to a minimum."&lt;/p&gt;

&lt;p&gt;20 Services with 20 load balancers = 20 bills and 20 DNS records. 20 Services behind 1 Ingress = 1.&lt;/p&gt;
&lt;h2&gt;
  
  
  Read an Ingress manifest field by field
&lt;/h2&gt;

&lt;p&gt;A realistic Ingress: 1 host, TLS, 2 paths to 2 Services.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: shop
  namespace: shop
spec:
  ingressClassName: public
  tls:
  - hosts:
    - shop.example.com
    secretName: shop-tls
  rules:
  - host: shop.example.com
    http:
      paths:
      - path: /api
        pathType: Prefix
        backend:
          service:
            name: api
            port:
              number: 8080
      - path: /
        pathType: Prefix
        backend:
          service:
            name: web
            port:
              number: 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;The rule to remember&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ingressClassName&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Names the IngressClass, which names the controller&lt;/td&gt;
&lt;td&gt;Always set it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rules[].host&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The hostname to match. Optional&lt;/td&gt;
&lt;td&gt;No host = the rule applies to all inbound HTTP traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;paths[].path&lt;/code&gt; and &lt;code&gt;pathType&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;The path to match and how to match it&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;pathType&lt;/code&gt; is required. Without it the object fails validation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend.service&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The Service name and port that gets the request&lt;/td&gt;
&lt;td&gt;"Both the host and path must match" before traffic is sent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Hosts and the Secret that holds the certificate&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;tls.hosts&lt;/code&gt; has to match &lt;code&gt;rules.host&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;defaultBackend&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Where requests go when no rule matches&lt;/td&gt;
&lt;td&gt;Usually set on the controller. Without it, the controller decides&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Everything else you have seen on an Ingress (rewrites, rate limits, CORS, canary weights, timeouts) is an annotation.&lt;/p&gt;

&lt;p&gt;Annotations belong to the controller. Change the controller and they stop meaning anything.&lt;/p&gt;

&lt;p&gt;Annotation = a feature you rent from 1 controller.&lt;/p&gt;

&lt;p&gt;The docs admit the gap: "Ideally, all Ingress controllers should fit the reference specification. In reality, the various Ingress controllers operate slightly differently."&lt;/p&gt;

&lt;h2&gt;
  
  
  pathType decides which requests match
&lt;/h2&gt;

&lt;p&gt;There are 3 path types, and the difference between them is where most routing bugs live.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exact:&lt;/strong&gt; "Matches the URL path exactly and with case sensitivity"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prefix:&lt;/strong&gt; matches "a URL path prefix split by /", one path element at a time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ImplementationSpecific:&lt;/strong&gt; "matching is up to the IngressClass". Each controller picks its own behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rows from the official examples table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;pathType&lt;/th&gt;
&lt;th&gt;Path in the rule&lt;/th&gt;
&lt;th&gt;Request path&lt;/th&gt;
&lt;th&gt;Match&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Exact&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/foo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/foo/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exact&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/foo/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/foo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prefix&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/foo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/foo&lt;/code&gt;, &lt;code&gt;/foo/&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prefix&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/aaa/bbb&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/aaa/bbb/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes, matches trailing slash&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prefix&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/aaa/bbb&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/aaa/bbbxyz&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No, does not match string prefix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prefix&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/aaa&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/ccc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No, uses default backend&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mixed&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/foo&lt;/code&gt; (Prefix), &lt;code&gt;/foo&lt;/code&gt; (Exact)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/foo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes, prefers Exact&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;3 rules cover the table:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Exact cares about the trailing slash.&lt;/strong&gt; Prefix ignores it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prefix matches whole elements.&lt;/strong&gt; &lt;code&gt;/foo/bar&lt;/code&gt; matches &lt;code&gt;/foo/bar/baz&lt;/code&gt; and does not match &lt;code&gt;/foo/barbaz&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The longest matching path wins.&lt;/strong&gt; On a tie, Exact beats Prefix&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F04lj2b7tlt48o4azpruv.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F04lj2b7tlt48o4azpruv.webp" alt="Kubernetes Ingress pathType matching: Exact /foo matches /foo and not /foo/. Prefix /foo/bar matches /foo/bar/ and /foo/bar/baz and not /foo/barbaz. Longest path wins, on a tie Exact beats Prefix" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Exact and Prefix on the same paths.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Hosts have 1 rule of their own: a wildcard covers exactly 1 DNS label.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;*.foo.com&lt;/code&gt; matches &lt;code&gt;bar.foo.com&lt;/code&gt;. It does not match &lt;code&gt;baz.bar.foo.com&lt;/code&gt;, and it does not match &lt;code&gt;foo.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;My default: Prefix for applications, Exact for single endpoints such as a health check or a webhook, and ImplementationSpecific never.&lt;/p&gt;

&lt;p&gt;Why never? Because it is the 1 value that changes meaning on the day you change controllers. Cilium, for example, documents it as a regex.&lt;/p&gt;
&lt;h2&gt;
  
  
  IngressClass picks the controller
&lt;/h2&gt;

&lt;p&gt;A cluster can run several Ingress controllers. IngressClass tells each one which Ingresses are its own.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  name: public
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"
spec:
  controller: example.com/ingress-controller
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;controller&lt;/code&gt; string comes from your controller's docs. On EKS Auto Mode, for example, it is &lt;code&gt;eks.amazonaws.com/alb&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;List what a cluster has:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get ingressclass
kubectl get ingress --all-namespaces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4 facts that save an afternoon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The default class:&lt;/strong&gt; the &lt;code&gt;ingressclass.kubernetes.io/is-default-class&lt;/code&gt; annotation set to &lt;code&gt;true&lt;/code&gt; assigns that class to new Ingresses that name none&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 defaults:&lt;/strong&gt; with more than 1 default class, the admission controller blocks every new Ingress that has no &lt;code&gt;ingressClassName&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The old annotation:&lt;/strong&gt; &lt;code&gt;kubernetes.io/ingress.class&lt;/code&gt; is deprecated since v1.18 and "was never formally defined". The AWS docs still show it as &lt;code&gt;kubernetes.io/ingress.class: alb&lt;/code&gt;, and many charts still ship it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The scope:&lt;/strong&gt; IngressClass is cluster-scoped. One name, one meaning, in every namespace&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Migration uses this directly: 2 controllers, 2 classes.&lt;/p&gt;

&lt;p&gt;Copy each Ingress under a new name with the new class, test it on the new controller's IP, switch DNS, then delete the old copy.&lt;/p&gt;

&lt;p&gt;Do not edit &lt;code&gt;ingressClassName&lt;/code&gt; on the live object: the old controller drops the host the moment you do.&lt;/p&gt;

&lt;h2&gt;
  
  
  TLS on an Ingress is port 443 and 1 Secret
&lt;/h2&gt;

&lt;p&gt;The TLS part of the API is short, and so is its list of limits.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1 port:&lt;/strong&gt; "The Ingress resource only supports a single TLS port, 443"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Termination at the edge:&lt;/strong&gt; the API "assumes TLS termination at the ingress point (traffic to the Service and its Pods is in plaintext)"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Secret:&lt;/strong&gt; "must contain keys named tls.crt and tls.key"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The namespace:&lt;/strong&gt; &lt;code&gt;secretName&lt;/code&gt; is a bare name with no namespace field, so the Secret sits in the namespace of the Ingress&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Several hosts:&lt;/strong&gt; multiplexed on the same port by Server Name Indication (SNI), "provided the Ingress controller supports SNI"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No TLS on the catch-all rule:&lt;/strong&gt; "hosts in the tls section need to explicitly match the host in the rules section"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create the Secret from a certificate and a key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create secret tls shop-tls --cert=tls.crt --key=tls.key --namespace shop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In practice cert-manager creates and renews that Secret for you.&lt;/p&gt;

&lt;p&gt;On a cloud load balancer the certificate usually lives in the cloud (AWS Certificate Manager on an ALB) and the Secret is not used.&lt;/p&gt;

&lt;p&gt;cert-manager (v1.21.3 today) watches Ingresses through annotations. Its Gateway support is still marked beta, since version 1.15.&lt;/p&gt;

&lt;p&gt;Redirects from HTTP to HTTPS, TLS versions, ciphers, mutual TLS, passthrough: all annotations, all different per controller.&lt;/p&gt;

&lt;p&gt;The docs say so in 1 line: "There is a gap between TLS features supported by various ingress controllers."&lt;/p&gt;

&lt;h2&gt;
  
  
  The Ingress API is frozen, not deprecated
&lt;/h2&gt;

&lt;p&gt;These 2 words get mixed up in every thread about Ingress, so here is the official text.&lt;/p&gt;

&lt;p&gt;From the Ingress page of the Kubernetes docs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"The Kubernetes project recommends using Gateway instead of Ingress. The Ingress API has been frozen."&lt;/li&gt;
&lt;li&gt;"The Ingress API is no longer being developed, and will have no further changes or updates made to it."&lt;/li&gt;
&lt;li&gt;"The Kubernetes project has no plans to remove Ingress from Kubernetes."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the Gateway API FAQ, under "Will Gateway API replace the Ingress API?":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"No. The Ingress API is GA since Kubernetes 1.19. There are no plans to deprecate this API and we expect most Ingress controllers to support it indefinitely."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Frozen = it will never do more than it does today.&lt;/p&gt;

&lt;p&gt;Deprecated = officially marked for removal, with a warning every time you use it. Ingress carries no such mark.&lt;/p&gt;

&lt;p&gt;(Frozen is one of the nicer things that can happen to an API you depend on.)&lt;/p&gt;

&lt;p&gt;So your Ingress manifests are safe. The question is only what runs them.&lt;/p&gt;

&lt;p&gt;One old version did go away: &lt;code&gt;networking.k8s.io/v1beta1&lt;/code&gt; Ingress has not been served since Kubernetes v1.22.&lt;/p&gt;

&lt;p&gt;A tutorial that shows &lt;code&gt;serviceName:&lt;/code&gt; and &lt;code&gt;servicePort:&lt;/code&gt; under &lt;code&gt;backend&lt;/code&gt; is written for that removed version. Its manifest fails on every supported cluster.&lt;/p&gt;

&lt;h2&gt;
  
  
  ingress-nginx is retired: the timeline
&lt;/h2&gt;

&lt;p&gt;ingress-nginx was the community controller, the one most tutorials install.&lt;/p&gt;

&lt;p&gt;The number the Kubernetes Steering and Security Response Committees cite: "about 50% of cloud native environments currently rely on this tool" (internal Datadog research, January 2026).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;What happened&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;March 24, 2025&lt;/td&gt;
&lt;td&gt;CVE-2025-1974 disclosed, rated 9.8 CVSS. Fixed in v1.12.1 and v1.11.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;November 11, 2025&lt;/td&gt;
&lt;td&gt;Retirement announced. "Best-effort maintenance will continue until March 2026"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;January 29, 2026&lt;/td&gt;
&lt;td&gt;Statement from the Steering and Security Response Committees: staying "leaves you and your users vulnerable to attack"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;February 27, 2026&lt;/td&gt;
&lt;td&gt;The Kubernetes blog lists 5 surprising ingress-nginx behaviors to know before migrating&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;March 19, 2026&lt;/td&gt;
&lt;td&gt;Last releases: controller v1.15.1, v1.14.5 and v1.13.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;March 20, 2026&lt;/td&gt;
&lt;td&gt;ingress2gateway 1.0, the conversion tool, is released&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;March 24, 2026&lt;/td&gt;
&lt;td&gt;The repository is archived and read-only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;June 30, 2026&lt;/td&gt;
&lt;td&gt;InGate, the planned successor, is archived too&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;November 2026&lt;/td&gt;
&lt;td&gt;Microsoft ends support for the AKS managed NGINX add-on&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy31nbe5n8lbk851md1u7.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy31nbe5n8lbk851md1u7.webp" alt="ingress-nginx retirement timeline: November 11, 2025 retirement announced, January 29, 2026 committees' statement, March 19, 2026 last release v1.15.1, March 24, 2026 repository archived, November 2026 AKS add-on support ends" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;From the announcement to the archive in 4 months.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What "retired" means
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No fixes:&lt;/strong&gt; "no further releases, no bugfixes, and no updates to resolve any security vulnerabilities that may be discovered"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing breaks:&lt;/strong&gt; "Existing deployments of Ingress NGINX will continue to function and installation artifacts will remain available"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No comeback:&lt;/strong&gt; "it is no longer reasonable or even possible to continue maintaining the tool even if resources did materialize"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second point is the dangerous one.&lt;/p&gt;

&lt;p&gt;The committees wrote it themselves: "Existing deployments will continue to work, so unless you proactively check, you may not know you are affected until you are compromised."&lt;/p&gt;
&lt;h3&gt;
  
  
  Why it matters for this controller in particular
&lt;/h3&gt;

&lt;p&gt;CVE-2025-1974 is the example of what an ingress-nginx bug looks like.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"anything on the Pod network has a good chance of taking over your Kubernetes cluster, with no credentials or administrative access required"&lt;/li&gt;
&lt;li&gt;"By default, ingress-nginx has access to all Secrets cluster-wide"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That one shipped with its patch on the day it was disclosed, because maintainers existed.&lt;/p&gt;

&lt;p&gt;The next one has nobody to patch it.&lt;/p&gt;

&lt;p&gt;There is a second clock. The last release, v1.15.1, lists Kubernetes 1.31 to 1.35 as its supported versions. Kubernetes is at v1.37, with v1.38 in beta.&lt;/p&gt;
&lt;h3&gt;
  
  
  ingress-nginx and NGINX Ingress Controller are 2 projects
&lt;/h3&gt;

&lt;p&gt;The names are a trap, and the Kubernetes blog spells it out: "Ingress-NGINX and NGINX Ingress are two separate Ingress controllers."&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;ingress-nginx&lt;/th&gt;
&lt;th&gt;NGINX Ingress Controller&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Repository&lt;/td&gt;
&lt;td&gt;kubernetes/ingress-nginx&lt;/td&gt;
&lt;td&gt;nginx/kubernetes-ingress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maintained by&lt;/td&gt;
&lt;td&gt;The Kubernetes community&lt;/td&gt;
&lt;td&gt;F5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Status&lt;/td&gt;
&lt;td&gt;Retired, archived&lt;/td&gt;
&lt;td&gt;Maintained, v5.8.1 in November 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Annotation prefix&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nginx.ingress.kubernetes.io/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nginx.org/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;"Both use NGINX as the dataplane, but are otherwise unrelated."&lt;/p&gt;

&lt;p&gt;So moving from one to the other is a migration, with its own guide from F5, and the annotations do not carry over as they are.&lt;/p&gt;
&lt;h2&gt;
  
  
  What to run in place of ingress-nginx
&lt;/h2&gt;

&lt;p&gt;The official recommendation has 2 branches: "begin migration to Gateway API or another Ingress controller immediately."&lt;/p&gt;

&lt;p&gt;And 1 warning: "None of the available alternatives are direct drop-in replacements."&lt;/p&gt;
&lt;h3&gt;
  
  
  On a managed cloud, start with the cloud's controller
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cloud&lt;/th&gt;
&lt;th&gt;Ingress today&lt;/th&gt;
&lt;th&gt;Gateway API today&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AWS EKS&lt;/td&gt;
&lt;td&gt;AWS Load Balancer Controller creates an Application Load Balancer for an Ingress (one each, unless you group them with IngressGroups). EKS Auto Mode has it built in&lt;/td&gt;
&lt;td&gt;The same controller creates an ALB for a Gateway from v2.14.0. Current release v3.6.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google GKE&lt;/td&gt;
&lt;td&gt;"GKE Ingress is in maintenance mode"&lt;/td&gt;
&lt;td&gt;"We recommend that you use GKE Gateway API." Both GKE Gateway controllers are generally available&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Azure AKS&lt;/td&gt;
&lt;td&gt;The application routing add-on is managed ingress-nginx, supported "through November 2026" for critical security patches only&lt;/td&gt;
&lt;td&gt;The add-on's Gateway API mode (built on Istio), or Application Gateway for Containers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you run AKS with the managed NGINX add-on, the date in that table is this month.&lt;/p&gt;

&lt;p&gt;Microsoft's wording: "you must migrate to the application routing Gateway API implementation, or another supported implementation, by November 2026."&lt;/p&gt;

&lt;p&gt;(Picking the cluster itself? See &lt;a href="https://meteorops.com/blog/how-to-choose-kubernetes-hosting-for-production" rel="noopener noreferrer"&gt;how to choose Kubernetes hosting for production&lt;/a&gt; and &lt;a href="https://meteorops.com/blog/ecs-vs-eks" rel="noopener noreferrer"&gt;ECS vs EKS&lt;/a&gt;.)&lt;/p&gt;
&lt;h3&gt;
  
  
  In-cluster controllers that are maintained
&lt;/h3&gt;

&lt;p&gt;Versions are the latest releases on November 24, 2026.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Controller&lt;/th&gt;
&lt;th&gt;Ingress&lt;/th&gt;
&lt;th&gt;Gateway API&lt;/th&gt;
&lt;th&gt;Worth knowing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Traefik v3.8.0&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes, Standard v1.7.0&lt;/td&gt;
&lt;td&gt;Has a provider that reads "many of the ingress-nginx annotations" on existing Ingresses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F5 NGINX Ingress Controller v5.8.1&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No (see NGINX Gateway Fabric)&lt;/td&gt;
&lt;td&gt;Same proxy, different annotations. F5 publishes a migration guide&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HAProxy Kubernetes Ingress Controller v3.4.1&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No (see HAProxy Unified Gateway)&lt;/td&gt;
&lt;td&gt;Its docs: version 3.4 and newer "don't support Gateway API"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kong Ingress Controller v3.5.15&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;"All new development of Kong products on Kubernetes will land in the Kong Operator"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cilium 1.20.5&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No separate controller to install when Cilium is already your network plugin: you switch it on in Cilium (needs kube-proxy replacement)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Contour v1.33.8&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Envoy underneath. No minor release since v1.33.0 in September 2025, patch releases only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Istio 1.32.0&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Can run "purely as Gateway API controller with no other service mesh features" (Kubernetes blog)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Envoy Gateway v1.10.0&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Gateway API only, by design&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NGINX Gateway Fabric v2.9.1&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;F5's Gateway API controller, with NGINX as the data plane&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;kgateway v2.5.2&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;A Gateway API control plane for Envoy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  How I would pick
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;You are on EKS, GKE or AKS and the cloud load balancer does what you need:&lt;/strong&gt; use the cloud's controller. One component fewer to patch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You need to be off ingress-nginx this week:&lt;/strong&gt; a controller that keeps your Ingress objects (Traefik's ingress-nginx provider, or F5 NGINX with its migration guide). Test every annotation, because "many" is the vendor's word&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You have a month:&lt;/strong&gt; go to Gateway API directly, with the controller your platform already runs (Cilium, Istio) or a Gateway-only one (Envoy Gateway, NGINX Gateway Fabric)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You run multi-tenant clusters:&lt;/strong&gt; Gateway API, no debate. ingress-nginx's own FAQ said "Do not use in multi-tenant Kubernetes production installations"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Option 2 buys time. Option 3 is where everybody ends up.&lt;/p&gt;
&lt;h2&gt;
  
  
  Gateway API is Ingress split into 3 objects
&lt;/h2&gt;

&lt;p&gt;Gateway API is "the successor to the Ingress API", in the words of both kubernetes.io and its own site.&lt;/p&gt;

&lt;p&gt;The idea: the one Ingress object becomes 3, and each has an owner.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Object&lt;/th&gt;
&lt;th&gt;What it holds&lt;/th&gt;
&lt;th&gt;Who owns it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GatewayClass&lt;/td&gt;
&lt;td&gt;Which controller, with which settings&lt;/td&gt;
&lt;td&gt;The infrastructure provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gateway&lt;/td&gt;
&lt;td&gt;Listeners: ports, protocols, hostnames, certificates&lt;/td&gt;
&lt;td&gt;The cluster operator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTPRoute&lt;/td&gt;
&lt;td&gt;Hosts, paths, headers, weights, backends&lt;/td&gt;
&lt;td&gt;The application developer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fatzzaqmw2pt001x62ikq.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fatzzaqmw2pt001x62ikq.webp" alt="Gateway API splits the Ingress object into 3: GatewayClass for the infrastructure provider, Gateway for the cluster operator, HTTPRoute for the application developer" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;One object with one owner becomes 3 objects with 3 owners.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The HTTPS side of the shop Ingress from above, as a Gateway and an HTTPRoute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: public
  namespace: infra
spec:
  gatewayClassName: example
  listeners:
  - name: https
    protocol: HTTPS
    port: 443
    hostname: shop.example.com
    tls:
      mode: Terminate
      certificateRefs:
      - name: shop-tls
    allowedRoutes:
      namespaces:
        from: All
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: shop
  namespace: shop
spec:
  parentRefs:
  - name: public
    namespace: infra
  hostnames:
  - shop.example.com
  rules:
  - matches:
    - path:
        type: PathPrefix
        value: /api
    backendRefs:
    - name: api
      port: 8080
  - matches:
    - path:
        type: PathPrefix
        value: /
    backendRefs:
    - name: web
      port: 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2 things moved.&lt;/p&gt;

&lt;p&gt;The certificate now sits with the Gateway, in the platform team's namespace. The application team never touches it.&lt;/p&gt;

&lt;p&gt;So the &lt;code&gt;shop-tls&lt;/code&gt; Secret has to exist in &lt;code&gt;infra&lt;/code&gt; now, or be shared with a ReferenceGrant.&lt;/p&gt;

&lt;p&gt;And the entry point is explicit. An Ingress has "two implicit entry points", HTTP and HTTPS. A Gateway lists its listeners.&lt;/p&gt;

&lt;p&gt;This Gateway listens on 443 only. Port 80 is a second listener you add yourself, and the redirect to HTTPS is an HTTPRoute with a &lt;code&gt;RequestRedirect&lt;/code&gt; filter.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;from: All&lt;/code&gt; is the shortest form. In production use &lt;code&gt;from: Selector&lt;/code&gt; with a namespace label, so that only the namespaces you choose can attach routes.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it adds over Ingress
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Need&lt;/th&gt;
&lt;th&gt;Ingress&lt;/th&gt;
&lt;th&gt;Gateway API&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Route on host and path&lt;/td&gt;
&lt;td&gt;In the API&lt;/td&gt;
&lt;td&gt;In the API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Route on header, query parameter or method&lt;/td&gt;
&lt;td&gt;Annotation, if the controller has one&lt;/td&gt;
&lt;td&gt;In HTTPRoute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Split traffic by weight&lt;/td&gt;
&lt;td&gt;Annotation, if the controller has one&lt;/td&gt;
&lt;td&gt;In HTTPRoute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Redirects, including HTTP to HTTPS&lt;/td&gt;
&lt;td&gt;Annotation&lt;/td&gt;
&lt;td&gt;In HTTPRoute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retries&lt;/td&gt;
&lt;td&gt;Annotation&lt;/td&gt;
&lt;td&gt;In HTTPRoute, Standard since v1.7.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gRPC, TLS passthrough, TCP, UDP&lt;/td&gt;
&lt;td&gt;Outside the API&lt;/td&gt;
&lt;td&gt;GRPCRoute, TLSRoute, TCPRoute, UDPRoute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A route to a Service in another namespace&lt;/td&gt;
&lt;td&gt;Outside the API&lt;/td&gt;
&lt;td&gt;Allowed with a ReferenceGrant from the owner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Separate permissions for platform and app teams&lt;/td&gt;
&lt;td&gt;One object for both&lt;/td&gt;
&lt;td&gt;Gateway and HTTPRoute, with &lt;code&gt;allowedRoutes&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A canary in Gateway API is 4 extra lines in the route, with no annotation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    backendRefs:
    - name: web
      port: 80
      weight: 90
    - name: web-v2
      port: 80
      weight: 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the API does not mean in your controller. Query parameter and method matching and retries are Extended features: check your controller's conformance report.&lt;/p&gt;

&lt;p&gt;(When to use a canary at all is in &lt;a href="https://meteorops.com/blog/deployment-strategies" rel="noopener noreferrer"&gt;deployment strategies: 6 types and how to pick one&lt;/a&gt;.)&lt;/p&gt;

&lt;h3&gt;
  
  
  What is stable today
&lt;/h3&gt;

&lt;p&gt;The current release is Gateway API v1.7.0, published on October 29, 2026.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GatewayClass, Gateway, HTTPRoute:&lt;/strong&gt; stable, in the Standard channel since v0.5.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GRPCRoute:&lt;/strong&gt; Standard since v1.1.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLSRoute and ListenerSet:&lt;/strong&gt; Standard since v1.5.0 (February 27, 2026)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TCPRoute and UDPRoute:&lt;/strong&gt; Standard since v1.6.0 (June 2026)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTPRoute retries:&lt;/strong&gt; Standard since v1.7.0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2 things to know before you start:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gateway API "does not include the Ingress kind". Existing Ingresses need "a one-time conversion"&lt;/li&gt;
&lt;li&gt;Annotations are gone on purpose: using them as an extension point "is strongly discouraged"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use the Standard channel. The project recommends it "by default", and a controller's docs tell you which version it supports.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migrate off ingress-nginx in 8 steps
&lt;/h2&gt;

&lt;p&gt;The steps are the same whether the target is another Ingress controller or Gateway API.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Find it.&lt;/strong&gt; Run the command from the top of this guide on every cluster, then &lt;code&gt;kubectl get ingress --all-namespaces&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;List the annotations in use.&lt;/strong&gt; Every &lt;code&gt;nginx.ingress.kubernetes.io/&lt;/code&gt; annotation is a feature the new controller has to provide. Count the "snippets" first: arbitrary NGINX configuration has no equivalent anywhere&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick the target&lt;/strong&gt; with the 4 rules above&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install the new controller next to the old one.&lt;/strong&gt; The Gateway API guide: "They will each get a different external IP address, allowing you to test and validate your new configuration in isolation without affecting production traffic"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Convert.&lt;/strong&gt; For Gateway API, ingress2gateway reads your Ingresses and prints Gateways and HTTPRoutes. For another Ingress controller, copy each Ingress with the new class and the new controller's annotations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test against the new IP&lt;/strong&gt; with the real hostnames (&lt;code&gt;curl --resolve&lt;/code&gt;), path by path, including the paths with a trailing slash&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch DNS&lt;/strong&gt; per hostname, with a low TTL, least important hostname first&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delete the ingress-nginx release&lt;/strong&gt; when its access log has been quiet for a week. Keeping it "just in case" keeps the risk&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What ingress2gateway does
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ingress2gateway print --providers=ingress-nginx --all-namespaces &amp;gt; gwapi.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without &lt;code&gt;--all-namespaces&lt;/code&gt; it reads the current namespace only.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Version:&lt;/strong&gt; v1.2.0 (July 7, 2026). Version 1.0 came out on March 20, 2026&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Annotations:&lt;/strong&gt; before 1.0 it translated 3 ingress-nginx annotations. Since 1.0, "over 30 common annotations (CORS, backend TLS, regex matching, path rewrite, etc.)"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inputs:&lt;/strong&gt; apisix, cilium, ingress-nginx, istio, gce, kong, nginx, openapi, traefik&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honesty:&lt;/strong&gt; it warns "about untranslatable configuration", and its authors call it "a migration assistant, not a one-shot replacement"&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The 5 behaviors that break a "correct" translation
&lt;/h3&gt;

&lt;p&gt;The Kubernetes blog published these in February 2026. Each one is something ingress-nginx did that the Ingress API never promised.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;"Regex matches are prefix-based and case insensitive"&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;use-regex&lt;/code&gt; annotation "applies to all paths of a host across all (Ingress-NGINX) Ingresses"&lt;/li&gt;
&lt;li&gt;"Rewrite target implies regex"&lt;/li&gt;
&lt;li&gt;"Requests missing a trailing slash are redirected to the same path with a trailing slash"&lt;/li&gt;
&lt;li&gt;"Ingress-NGINX normalizes URLs"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Their summary is the reason step 6 exists: "a seemingly correct translation can still cause outages if it does not consider Ingress-NGINX's quirks."&lt;/p&gt;

&lt;p&gt;Your application may depend on any of the 5 without anybody knowing. Test the paths, do not read the YAML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix an Ingress that does not route
&lt;/h2&gt;

&lt;p&gt;Start with 2 commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get ingress --all-namespaces
kubectl describe ingress shop --namespace shop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The describe output shows the address, the default backend, every rule with the Pod IPs behind its Service, the annotations and the events.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Usual cause&lt;/th&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ADDRESS stays empty&lt;/td&gt;
&lt;td&gt;No controller owns the Ingress, or the controller cannot get a load balancer. A minute or two of `` is normal, 10 minutes is not&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ingressClassName&lt;/code&gt; against &lt;code&gt;kubectl get ingressclass&lt;/code&gt;, then the events, the controller's Pods and its logs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;404 from the controller&lt;/td&gt;
&lt;td&gt;No rule matched, so the controller's default backend or built-in 404 answered&lt;/td&gt;
&lt;td&gt;The Host header you send, the &lt;code&gt;pathType&lt;/code&gt;, the trailing slash&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;503&lt;/td&gt;
&lt;td&gt;Usually: the Service has no ready Pods behind it. On ingress-nginx, also its rate and connection limits&lt;/td&gt;
&lt;td&gt;The backend line in the describe output. A Service with no endpoints shows as &lt;code&gt;api:8080 ()&lt;/code&gt;. Then the Service selector and the readiness probe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser warns about the certificate&lt;/td&gt;
&lt;td&gt;The Secret is missing, in another namespace, or &lt;code&gt;tls.hosts&lt;/code&gt; does not match the host. ingress-nginx then serves a self-signed certificate&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl get secret&lt;/code&gt; in the namespace of the Ingress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A new Ingress is rejected&lt;/td&gt;
&lt;td&gt;2 IngressClasses are marked default and the Ingress names none&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl get ingressclass&lt;/code&gt;, and set &lt;code&gt;ingressClassName&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Works on one controller, breaks on the next&lt;/td&gt;
&lt;td&gt;An annotation, or &lt;code&gt;ImplementationSpecific&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;The annotation list from step 2 of the migration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 503 row has a Gateway API twin, written into the spec: a route to a Service with no ready endpoints should return 503, and an invalid backend reference returns 500.&lt;/p&gt;

&lt;p&gt;(The commands for the next level down, endpoints, logs and events, are in the &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet" rel="noopener noreferrer"&gt;kubectl cheat sheet&lt;/a&gt;. Readiness itself is in the &lt;a href="https://meteorops.com/blog/how-to-configure-kubernetes-liveness-probes-without-causing-restart-loops" rel="noopener noreferrer"&gt;liveness probes guide&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  The Ingress checklist
&lt;/h2&gt;

&lt;p&gt;Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Know which controller serves every Ingress, and that it still gets releases&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;ingressClassName&lt;/code&gt; on every Ingress&lt;/li&gt;
&lt;li&gt;Have exactly 1 default IngressClass, or none&lt;/li&gt;
&lt;li&gt;Write &lt;code&gt;pathType: Prefix&lt;/code&gt; or &lt;code&gt;Exact&lt;/code&gt;, never &lt;code&gt;ImplementationSpecific&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Give every rule a &lt;code&gt;host&lt;/code&gt;, and match it in &lt;code&gt;tls.hosts&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Keep the TLS Secret in the namespace of the Ingress, renewed by cert-manager&lt;/li&gt;
&lt;li&gt;Keep a list of the annotations you depend on, per controller&lt;/li&gt;
&lt;li&gt;Write new routes as HTTPRoutes when your controller supports both APIs&lt;/li&gt;
&lt;li&gt;Run 0 retired controllers on a public IP&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Kubernetes Ingress FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is Kubernetes Ingress deprecated?
&lt;/h3&gt;

&lt;p&gt;No. The Ingress API is frozen: it gets no new features, it is still generally available, and the Kubernetes project says it has "no plans to remove Ingress from Kubernetes". What was retired in March 2026 is ingress-nginx, one controller for that API.&lt;/p&gt;

&lt;h3&gt;
  
  
  What replaces ingress-nginx?
&lt;/h3&gt;

&lt;p&gt;Nothing replaces it one for one. The official recommendation is Gateway API or another Ingress controller: on a managed cloud that is the cloud's own controller, and in the cluster the maintained options include Traefik, F5 NGINX Ingress Controller, HAProxy, Cilium, Istio, Envoy Gateway and NGINX Gateway Fabric.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between an Ingress and a LoadBalancer Service?
&lt;/h3&gt;

&lt;p&gt;A LoadBalancer Service exposes 1 Service through 1 external load balancer, on any TCP or UDP port. An Ingress puts many HTTP and HTTPS Services behind 1 entry point and routes by host and path.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between Ingress and Gateway API?
&lt;/h3&gt;

&lt;p&gt;Ingress is 1 object with host and path routing, and annotations for everything else. Gateway API splits the job into GatewayClass, Gateway and HTTPRoute, and puts header matching, traffic weights, redirects, retries, gRPC, TCP and UDP into the API itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is NGINX Ingress Controller the same as ingress-nginx?
&lt;/h3&gt;

&lt;p&gt;No. ingress-nginx was the Kubernetes community project and is retired. NGINX Ingress Controller is F5's product, lives in the nginx/kubernetes-ingress repository, uses &lt;code&gt;nginx.org/&lt;/code&gt; annotations and is still released.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can an Ingress route TCP or UDP traffic?
&lt;/h3&gt;

&lt;p&gt;No. The docs: "An Ingress does not expose arbitrary ports or protocols." Use a Service of type LoadBalancer, or a TCPRoute or UDPRoute in Gateway API, both stable since v1.6.0.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need an Ingress controller on EKS, GKE or AKS?
&lt;/h3&gt;

&lt;p&gt;Yes, but the cloud usually provides it. EKS has the AWS Load Balancer Controller (built into EKS Auto Mode), GKE has GKE Ingress and GKE Gateway, and AKS has the application routing add-on and Application Gateway for Containers.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between ingress and egress in Kubernetes?
&lt;/h3&gt;

&lt;p&gt;Ingress is traffic coming into the cluster or into a Pod, egress is traffic leaving it. The Ingress object only covers inbound HTTP and HTTPS. Which Pods may send or receive what is a NetworkPolicy, which has both ingress and egress rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Recap!
&lt;/h2&gt;

&lt;p&gt;If you take away 1 thing from this guide, let it be this:&lt;/p&gt;

&lt;p&gt;Your Ingress objects are fine. Check what is running them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ingress = rules. The controller = the thing that can be out of date&lt;/li&gt;
&lt;li&gt;The API is frozen and stays. ingress-nginx is retired and stays retired&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pathType&lt;/code&gt;, &lt;code&gt;ingressClassName&lt;/code&gt; and the TLS Secret's namespace explain most broken Ingresses&lt;/li&gt;
&lt;li&gt;New routes go to Gateway API. Old ones move with ingress2gateway and a second IP&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You don't NEED anyone for this. The 8 steps above are the whole job: an afternoon for a cluster with a handful of plain Ingresses, weeks for one with snippets and regex paths.&lt;/p&gt;

&lt;p&gt;If you would rather have someone who has done it look at your setup first (yes, I sell DevOps engineers), start with the &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;free assessment&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>cloud</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Cloud Migration Strategy: The 7 Rs, Waves, Cutover and Exit</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Wed, 25 Nov 2026 15:30:53 +0000</pubDate>
      <link>https://dev.to/meteorops/cloud-migration-strategy-the-7-rs-waves-cutover-and-exit-82m</link>
      <guid>https://dev.to/meteorops/cloud-migration-strategy-the-7-rs-waves-cutover-and-exit-82m</guid>
      <description>&lt;p&gt;A cloud migration strategy is 4 decisions, and most guides stop after the first one:&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A strategy per workload:&lt;/strong&gt; which "R" each one gets (retire, retain, rehost, relocate, repurchase, replatform, refactor)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An order:&lt;/strong&gt; which workloads move first, and how many at a time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A cutover and a way back:&lt;/strong&gt; written per workload, before the move&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An exit:&lt;/strong&gt; what it costs and how long it takes to leave the cloud you are moving to&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The short version of each, with the numbers the cloud vendors publish:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;th&gt;My default&lt;/th&gt;
&lt;th&gt;The number to remember&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Strategy per workload&lt;/td&gt;
&lt;td&gt;Retire what nobody uses, rehost what works, replatform the database&lt;/td&gt;
&lt;td&gt;Under 5% average CPU and memory = a candidate to switch off (AWS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rewrite during the move&lt;/td&gt;
&lt;td&gt;No. Move first, change later&lt;/td&gt;
&lt;td&gt;Rehost only what stays as it is for 2 years (Microsoft)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First workload&lt;/td&gt;
&lt;td&gt;Boring, used every day, 0 to 3 dependencies&lt;/td&gt;
&lt;td&gt;Fewer than 10 servers in each of the first 5 waves (AWS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cutover&lt;/td&gt;
&lt;td&gt;Freeze, replicate, pause writes, switch DNS, watch&lt;/td&gt;
&lt;td&gt;24 to 48 hours of close watching after the switch (Microsoft)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rollback&lt;/td&gt;
&lt;td&gt;Triggers and a time limit written before the cutover&lt;/td&gt;
&lt;td&gt;1 maximum execution time per step, then roll back (Google)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exit&lt;/td&gt;
&lt;td&gt;Read the contract end dates before you sign&lt;/td&gt;
&lt;td&gt;2 months of notice for free egress out of AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every vendor number and quote in this article comes from the AWS, Microsoft and Google Cloud documentation and price lists, Gartner's 2011 press release (archived copy), the European Commission, or the companies' own posts, as read on November 19, 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  A cloud migration strategy is one decision per workload
&lt;/h2&gt;

&lt;p&gt;You do not pick 1 strategy for the company.&lt;/p&gt;

&lt;p&gt;You pick 1 per workload, and the list of picks is the strategy.&lt;/p&gt;

&lt;p&gt;Workload = an application plus everything it needs to run: servers, database, queues, cron jobs, DNS records.&lt;/p&gt;

&lt;p&gt;Microsoft says it in 1 line: "Each workload can be Retired, Retained, Rehosted, Replatformed, Refactored, Rearchitected, Rebuilt, or Replaced."&lt;/p&gt;

&lt;p&gt;So the first deliverable of a migration is a spreadsheet: 1 row per workload, 1 column for the R, 1 for the owner, 1 for what it depends on.&lt;/p&gt;

&lt;p&gt;The rest of this guide fills that spreadsheet in, then puts the rows in order.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 7 Rs are 5 different lists
&lt;/h2&gt;

&lt;p&gt;"The 7 Rs" sounds like a standard. It is the AWS version of a list that every vendor wrote differently.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you do&lt;/th&gt;
&lt;th&gt;Gartner, 2011 (5)&lt;/th&gt;
&lt;th&gt;AWS, 2016 (6)&lt;/th&gt;
&lt;th&gt;AWS today (7)&lt;/th&gt;
&lt;th&gt;Microsoft today (8)&lt;/th&gt;
&lt;th&gt;Google Cloud today (6)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Move it as it is&lt;/td&gt;
&lt;td&gt;Rehost&lt;/td&gt;
&lt;td&gt;Rehost&lt;/td&gt;
&lt;td&gt;Rehost&lt;/td&gt;
&lt;td&gt;Rehost&lt;/td&gt;
&lt;td&gt;Rehost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Move a whole platform as it is&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Relocate&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small changes, same architecture&lt;/td&gt;
&lt;td&gt;Refactor (run it on a platform service)&lt;/td&gt;
&lt;td&gt;Replatform&lt;/td&gt;
&lt;td&gt;Replatform&lt;/td&gt;
&lt;td&gt;Replatform&lt;/td&gt;
&lt;td&gt;Replatform&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Change the code&lt;/td&gt;
&lt;td&gt;Revise&lt;/td&gt;
&lt;td&gt;Refactor / re-architect&lt;/td&gt;
&lt;td&gt;Refactor or re-architect&lt;/td&gt;
&lt;td&gt;Refactor&lt;/td&gt;
&lt;td&gt;Refactor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Change the architecture&lt;/td&gt;
&lt;td&gt;Rebuild&lt;/td&gt;
&lt;td&gt;(same R)&lt;/td&gt;
&lt;td&gt;(same R)&lt;/td&gt;
&lt;td&gt;Rearchitect&lt;/td&gt;
&lt;td&gt;Re-architect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rewrite it&lt;/td&gt;
&lt;td&gt;Rebuild&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Rebuild&lt;/td&gt;
&lt;td&gt;Rebuild&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Buy SaaS (software as a service)&lt;/td&gt;
&lt;td&gt;Replace&lt;/td&gt;
&lt;td&gt;Repurchase&lt;/td&gt;
&lt;td&gt;Repurchase&lt;/td&gt;
&lt;td&gt;Replace&lt;/td&gt;
&lt;td&gt;Repurchase&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Switch it off&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Retire&lt;/td&gt;
&lt;td&gt;Retire&lt;/td&gt;
&lt;td&gt;Retire&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Leave it where it is&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Retain&lt;/td&gt;
&lt;td&gt;Retain&lt;/td&gt;
&lt;td&gt;Retain&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkv6mf15sr7ezx9gmair.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkv6mf15sr7ezx9gmair.webp" alt="The number of cloud migration strategies in each list: Gartner 2011 has 5, AWS 2016 has 6, AWS today has 7, Microsoft today has 8, Google Cloud today has 6" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;5 lists, 5 different counts.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;3 things to take from the table:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Refactor" has 3 meanings.&lt;/strong&gt; Gartner in 2011: run the application on a provider's platform service. AWS: "modify its architecture by taking full advantage of cloud-native features". Microsoft: improve "the internal structure of code without adding new features"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google has no retire and no retain.&lt;/strong&gt; Its 6 types only describe workloads that move&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relocate exists only at AWS.&lt;/strong&gt; It means moving many servers at once to "a cloud version of the platform", or between accounts and Regions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rule I use: when somebody in the room says "refactor", ask which one they mean before you estimate anything.&lt;/p&gt;

&lt;p&gt;The history is also told wrong on pages that rank for this search today.&lt;/p&gt;

&lt;p&gt;One says AWS added Retire in 2016 and Retain in 2017. The AWS post from November 1, 2016 already lists both: "5. Retire" and "6. Retain". The R that came later is Relocate.&lt;/p&gt;

&lt;p&gt;Another says the "original four Rs" came from Gartner. Gartner's press release from May 16, 2011 lists 5 options: "rehost", "refactor", "revise", "rebuild" and "replace".&lt;/p&gt;

&lt;p&gt;(Even an AWS documentation page credits Gartner with "the 7 Rs" in 2019. Nobody remembers who wrote the list, which tells you how much to worry about the list.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick the R for each workload with 5 questions
&lt;/h2&gt;

&lt;p&gt;Ask them in this order. Stop at the first yes, with 1 exception: a yes to question 4 covers only that part, so ask question 5 for the rest.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Is nobody using it?&lt;/strong&gt; Retire it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does something tie it to where it is?&lt;/strong&gt; Retain it, and write down the date you look again&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does a SaaS product do the same job with little customization?&lt;/strong&gt; Repurchase it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can a managed service take over a part of it with no code change?&lt;/strong&gt; Replatform that part (the database is the usual one)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Will the rest stay as it is for the next 2 years?&lt;/strong&gt; Rehost it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5 times no = refactor, and only when the business asks for something the current architecture cannot give.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc2kxcm8ah71l9agjiiuk.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc2kxcm8ah71l9agjiiuk.webp" alt="Five questions to pick a cloud migration strategy per workload: nobody using it, retire. Something ties it to where it is, retain. A SaaS product does the same job, repurchase. A managed service can take over a part, replatform. The rest will stay as it is for 2 years, rehost. 5 times no, refactor" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The 5 questions, in order.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;(Relocate is rehost for a whole platform, such as a VMware estate, moved at once.)&lt;/p&gt;

&lt;p&gt;Each question has a vendor test behind it:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;R&lt;/th&gt;
&lt;th&gt;What changes&lt;/th&gt;
&lt;th&gt;The test&lt;/th&gt;
&lt;th&gt;The warning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Retire&lt;/td&gt;
&lt;td&gt;Nothing moves. You switch it off&lt;/td&gt;
&lt;td&gt;AWS: average CPU and memory below 5% ("zombie"), or 5% to 20% over 90 days ("idle"), or no inbound connection for 90 days&lt;/td&gt;
&lt;td&gt;Check for month-end and year-end jobs before you believe 90 days of silence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retain&lt;/td&gt;
&lt;td&gt;Nothing, for now&lt;/td&gt;
&lt;td&gt;AWS: data residency, a recent upgrade, hardware with no cloud equivalent. A license that does not allow running in a cloud is another reason&lt;/td&gt;
&lt;td&gt;Retained workloads keep the old data center bill alive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Repurchase&lt;/td&gt;
&lt;td&gt;The product. Your data moves into it&lt;/td&gt;
&lt;td&gt;Microsoft: a mature SaaS alternative exists and you need little customization&lt;/td&gt;
&lt;td&gt;Google: it "might be a lot more expensive" and you control less&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rehost&lt;/td&gt;
&lt;td&gt;The address&lt;/td&gt;
&lt;td&gt;Microsoft: "the workload remains in its current state for at least two years"&lt;/td&gt;
&lt;td&gt;Microsoft: "Rehosting doesn't resolve existing performance, reliability, or architectural issues"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relocate&lt;/td&gt;
&lt;td&gt;The address of a whole platform&lt;/td&gt;
&lt;td&gt;AWS: you run a platform that has a cloud version, and you move many servers at once&lt;/td&gt;
&lt;td&gt;Only AWS has this R&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Replatform&lt;/td&gt;
&lt;td&gt;1 layer under the application&lt;/td&gt;
&lt;td&gt;AWS examples: SQL Server to Amazon RDS, or virtual machines into containers "without making any code changes"&lt;/td&gt;
&lt;td&gt;Google: "several rounds of testing"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Refactor&lt;/td&gt;
&lt;td&gt;The architecture&lt;/td&gt;
&lt;td&gt;AWS: "strong business demand to scale, accelerate product and feature releases, and to reduce costs"&lt;/td&gt;
&lt;td&gt;AWS: "the most complex and costly of the migration strategies"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A workload you retire is the cheapest migration you will ever run.&lt;/p&gt;

&lt;p&gt;Stephen Orban wrote in that 2016 AWS post that "as much as 10% (I've seen 20%) of an enterprise IT portfolio is no longer useful, and can simply be turned off".&lt;/p&gt;

&lt;p&gt;So question 1 comes first. Every workload you switch off leaves every later list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Move first, modernize later (the vendors disagree)
&lt;/h2&gt;

&lt;p&gt;This is the argument inside every migration: lift and shift now and improve later, or improve on the way?&lt;/p&gt;

&lt;p&gt;The 3 vendors give 3 answers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS&lt;/strong&gt; (in its guide for large migrations): "We recommend that you first migrate to the AWS Cloud and then modernize the workload." Refactor "only when the other migration strategies are not an acceptable option"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Microsoft:&lt;/strong&gt; rehost only when the workload needs no modernization for 2 years. "If modernization is likely, consider refactoring or rearchitecting instead to avoid duplicate effort". It adds a condition: only when your team has the skills and the time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google:&lt;/strong&gt; "Successful migrations change the workload to migrate as little as possible during the migration operations"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I side with AWS and Google.&lt;/p&gt;

&lt;p&gt;Why? Because a move and a rewrite at the same time is 2 changes in 1 release, and when it breaks you do not know which one did it.&lt;/p&gt;

&lt;p&gt;Move = new network, new identity system, new disks, new DNS. That is enough change for 1 cutover.&lt;/p&gt;

&lt;p&gt;There are 2 exceptions I accept:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The database.&lt;/strong&gt; Moving a self-managed database to a managed one is a replatform with a well-known path, and it removes the part of operations that hurts most&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The broken workload.&lt;/strong&gt; If it falls over every week in the data center, it will fall over every week in the cloud. Fix it or leave it for the last wave&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Microsoft's page makes one honest point for the other side: a migration project is often what gets the funding and the support of the people who decide.&lt;/p&gt;

&lt;p&gt;That is true, and "we will modernize after" is the first line cut when the migration ends.&lt;/p&gt;

&lt;p&gt;My answer: put the modernization of the 2 or 3 workloads that need it in the same plan, with dates, as the waves after the move.&lt;/p&gt;

&lt;p&gt;Netflix shows what the other choice costs in time. Its move began in August 2008 and finished in January 2016, with most systems in the cloud before 2015. Its own explanation: "we chose the cloud-native approach, rebuilding virtually all of our technology". 7 years.&lt;/p&gt;

&lt;p&gt;Netflix had a reason. Most companies moving 40 servers do not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a boring workload that people use
&lt;/h2&gt;

&lt;p&gt;The first workload teaches your team the path: accounts, network, deploy, monitoring, cutover.&lt;/p&gt;

&lt;p&gt;So pick it for what it teaches. The 3 vendors overlap on most of it, and they differ on 1 point, how much the workload should be used:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Vendor&lt;/th&gt;
&lt;th&gt;First workloads&lt;/th&gt;
&lt;th&gt;What they add&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AWS&lt;/td&gt;
&lt;td&gt;0 to 3 dependencies, ready to rehost as it is, in a development or test environment&lt;/td&gt;
&lt;td&gt;Business-critical applications "are typically low priority for the migration" because they carry more risk&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Microsoft&lt;/td&gt;
&lt;td&gt;"internal tools, development environments, or low-usage applications with standalone architectures"&lt;/td&gt;
&lt;td&gt;"Add one or two complex workloads to each early wave" to find the hard problems early&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;Not business critical, few dependencies, little refactoring, can afford a cutover window&lt;/td&gt;
&lt;td&gt;"You should avoid rarely used workloads". A workload used a few times a year teaches nothing and hides its problems&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;AWS and Microsoft point at applications with few users. Google warns about the extreme of that, and its line is the one teams miss.&lt;/p&gt;

&lt;p&gt;The safest first candidate is the internal tool nobody opens. It is also useless as a test: nobody notices when it breaks.&lt;/p&gt;

&lt;p&gt;First workload = low risk + used every day + looks like the others.&lt;/p&gt;

&lt;p&gt;Google adds a people rule that I like: the team that owns the first workload "should be highly motivated". A team that did not want the migration will prove it does not work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Size the waves with AWS's numbers
&lt;/h2&gt;

&lt;p&gt;A wave = a group of workloads that move in the same window.&lt;/p&gt;

&lt;p&gt;AWS is the only vendor of the 3 that publishes numbers for the size of a wave. They come from its guides for large migrations, and they work as upper limits for small ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Waves 1 to 5:&lt;/strong&gt; "fewer servers (less than 10), low-complexity applications", in development or test environments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Later waves:&lt;/strong&gt; an example cap of 50 servers per wave&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team capacity:&lt;/strong&gt; "a migration team of four architects can migrate up to 50 servers in a week for rehost patterns"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Planning horizon:&lt;/strong&gt; at least 4 to 5 waves in advance, and never all waves at once&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Order inside the plan:&lt;/strong&gt; 3 servers before 20, 100 GB before 2 TB, 10 users before 10,000&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpshnj6kpi9b6axxcp14y.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpshnj6kpi9b6axxcp14y.webp" alt="Migration wave sizing from the AWS guidance: waves 1 to 5 have fewer than 10 servers each, later waves up to 50 servers, plan 4 to 5 waves ahead, a team of 4 moves up to 50 servers a week" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Wave sizes from the AWS guides for large migrations.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What goes into the same wave is decided by dependencies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Applications with a shared database must migrate together"&lt;/li&gt;
&lt;li&gt;A dependency that everything shares (AWS uses Active Directory as the example) does not count. Build it in the cloud first, before any application moves&lt;/li&gt;
&lt;li&gt;Microsoft's tie-breaker: "When uncertainty exists about dependency criticality, group the components together"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plan the calendar with the vendor's durations too, since nobody budgets for them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Discovery tooling:&lt;/strong&gt; 4 to 8 weeks to install, then 4 to 12 weeks of collecting data before its scores mean anything&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preparation:&lt;/strong&gt; AWS calls this phase mobilize, builds the landing zone in it, and runs it as 8 sprints of 2 weeks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runbooks and automation for a large migration:&lt;/strong&gt; 1 to 3 months before the first wave at scale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(A landing zone is the base you build once: accounts, network, identity, logging, guardrails. Workloads land in it.)&lt;/p&gt;

&lt;p&gt;Write that base as code. And when a migration tool creates resources for you, bring them under code afterwards: &lt;a href="https://meteorops.com/blog/terraform-import" rel="noopener noreferrer"&gt;Terraform import&lt;/a&gt; does that.&lt;/p&gt;

&lt;p&gt;With 30 servers you will not need 16 weeks of preparation. You will still need the 3 steps: know what you have, build the base, write the runbook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Move the data by the downtime you can afford
&lt;/h2&gt;

&lt;p&gt;Servers are the easy part. Data decides how long the cutover takes.&lt;/p&gt;

&lt;p&gt;Google's guide asks 4 questions: how much data, how often it changes, whether you can afford a cutover window, and what consistency model you run today.&lt;/p&gt;

&lt;p&gt;Google lists 4 approaches. 3 of them cover almost every migration (the fourth, a data-access microservice, is for teams already on microservices):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Downtime&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Pick it when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Scheduled maintenance (big bang)&lt;/td&gt;
&lt;td&gt;The final sync, or the whole copy if you stop writes first&lt;/td&gt;
&lt;td&gt;Copy while live, stop writes, copy what changed, switch. The simpler version: stop writes, copy everything, switch&lt;/td&gt;
&lt;td&gt;The workload can afford a window: internal tools, test environments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Continuous replication&lt;/td&gt;
&lt;td&gt;Short. AWS quotes "cutover windows of minutes" for its server tool&lt;/td&gt;
&lt;td&gt;Copy everything once, then replicate changes until the switch&lt;/td&gt;
&lt;td&gt;Production databases and servers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dual write ("Y")&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;The application writes and reads in both places during the move&lt;/td&gt;
&lt;td&gt;You cannot afford any window, and you can afford changing the application&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Microsoft says a migration with downtime is "simpler and faster because it doesn't require real-time synchronization". Use it wherever a window is acceptable.&lt;/p&gt;

&lt;p&gt;The tools for the second approach, with the names they carry today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS servers:&lt;/strong&gt; AWS Transform MGN (the service known as AWS Application Migration Service). It does "continuous block-level replication" of the source servers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS databases:&lt;/strong&gt; AWS Database Migration Service. A full load, a full load plus change data capture (CDC) that keeps replicating changes until the cutover, or CDC only&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Azure:&lt;/strong&gt; Azure Catalyst, which the documentation describes as "formerly Azure Migrate", and Azure Database Migration Service&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Cloud:&lt;/strong&gt; Migration Center, Migrate to Virtual Machines and Database Migration Service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then do the transfer arithmetic before you promise a date.&lt;/p&gt;

&lt;p&gt;Google's numbers: 1 GB takes 8 seconds on a 1 Gbps line in the ideal case, and 100 TB takes 12 days. On 100 Mbps, 300 TB takes about 9 months.&lt;/p&gt;

&lt;p&gt;If the line is too slow, the old answer was a storage device shipped by truck. Check it still exists:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Snowball:&lt;/strong&gt; closed to new customers since November 7, 2025. Support ends on December 31, 2026&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Azure Data Box:&lt;/strong&gt; available in 120 TB and 525 TB (an older 80 TB device is being retired region by region). Microsoft suggests it above 40 TB with limited connectivity. Data Box Heavy is retired&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Transfer Appliance:&lt;/strong&gt; still documented. 300 TB captured "in under 25 days", plus about 10 business days until the data is in Cloud Storage&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Script the cutover and the way back
&lt;/h2&gt;

&lt;p&gt;A cutover is a script, written and rehearsed before the night it runs.&lt;/p&gt;

&lt;p&gt;Microsoft's migration guide gives the steps for a near-zero downtime cutover. This is the order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Freeze changes.&lt;/strong&gt; Block releases to the source in the CI/CD (continuous integration and delivery) pipeline for the migration window&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replicate.&lt;/strong&gt; "Don't proceed to the next step until replication lag is zero" (it stays at zero only once writes are paused, in step 3)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pause writes.&lt;/strong&gt; Read-only mode on the source for the final sync. "If you don't pause write operations, you increase the risk of data loss"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validate the data.&lt;/strong&gt; Row counts are a quick check, and "checksums and hash functions are preferred"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch traffic.&lt;/strong&gt; "Update DNS records and load balancer configurations"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch.&lt;/strong&gt; Performance, error rates and user access "for the first 24-48 hours after cutover"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the source.&lt;/strong&gt; "Retain the source environment as a fallback option", with the ability to revert DNS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Announce.&lt;/strong&gt; "Announce migration success only after thorough validation"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fokxoa4xcj7gy1cb5mofg.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fokxoa4xcj7gy1cb5mofg.webp" alt="The cutover in 8 steps: freeze changes, replicate until lag is zero, pause writes, validate with checksums, switch DNS and load balancer, watch for 24 to 48 hours, keep the source as fallback, announce. Rollback triggers and a time limit are written before step 1" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The cutover in order, with the way back written first.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The way back is written before step 1:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Triggers:&lt;/strong&gt; Microsoft asks for "specific conditions that trigger a rollback", such as CPU usage, response time or error rate. A number, decided in daylight. If the workload has a service level objective, start from it: &lt;a href="https://meteorops.com/blog/slo-vs-sla" rel="noopener noreferrer"&gt;SLO vs SLA vs SLI&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A time limit:&lt;/strong&gt; Google's rule is my favorite line in all 3 guides. "Set a maximum-allowed execution time for each migration step. After this allowed execution time expires, your teams start rolling back the migration step"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A rehearsal:&lt;/strong&gt; both tell you to test the rollback before you need it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The steps with no way back:&lt;/strong&gt; Google warns that some steps lose data even when rolled back. Mark them in the script&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rollback = a decision you made last week, executed by whoever is on call tonight.&lt;/p&gt;

&lt;p&gt;Know where the point of no return is. The first one is the first write that lands only on the new side: from then on, going back means copying data back. Your tool has a second one. In AWS Transform MGN it is the action called "Finalize cutover": it "stops data replication, discards all replicated data" and removes the agent from the source.&lt;/p&gt;

&lt;p&gt;About DNS: none of the 3 migration guides gives a number for the TTL (time to live). Google's comes closest: it asks whether you can set the TTL "to its minimum value in seconds before you perform the migration", and whether your clients respect it at all (some applications cache DNS and ignore the TTL).&lt;/p&gt;

&lt;p&gt;The closest number is in the Amazon Route 53 best practices, which call 60 or 120 seconds a common choice for records changed during a fast failover. Lower the TTL at least 1 full old TTL before the cutover: resolvers keep the old value until the old TTL runs out.&lt;/p&gt;

&lt;p&gt;If the workload has recovery targets, the cutover has to fit inside them. I wrote about setting those in &lt;a href="https://meteorops.com/blog/rto-vs-rpo" rel="noopener noreferrer"&gt;RTO vs RPO&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And if you can send a small share of traffic to the new environment first, do that. The patterns are in &lt;a href="https://meteorops.com/blog/deployment-strategies" rel="noopener noreferrer"&gt;deployment strategies&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decide when the old environment dies
&lt;/h2&gt;

&lt;p&gt;For a while after each cutover you pay for 2 environments.&lt;/p&gt;

&lt;p&gt;No vendor publishes what that costs. Google names the risk: "the cost of running two environments indefinitely".&lt;/p&gt;

&lt;p&gt;So write the conditions for switching the source off before the first wave:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No traffic:&lt;/strong&gt; monitoring shows nothing still reaching the old environment that should reach the new one&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A soak period you chose:&lt;/strong&gt; Microsoft's example is "all performance benchmarks met for 30 days"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A named approver:&lt;/strong&gt; somebody signs the decommission&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data under retention rules:&lt;/strong&gt; an inventory of what did not move and has to be kept by law&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Licenses:&lt;/strong&gt; what you can reuse in the cloud and what you can stop paying for&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then compare the first cloud invoices to what the workload cost before. Microsoft puts it in its checklist: "Compare current costs to premigration baselines."&lt;/p&gt;

&lt;p&gt;A migration without a decommission date is a second data center.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put the exit in the plan on day 1
&lt;/h2&gt;

&lt;p&gt;You are choosing a provider you may leave. Plan it while you have negotiating power, which is before you sign.&lt;/p&gt;

&lt;h3&gt;
  
  
  What data transfer out costs today
&lt;/h3&gt;

&lt;p&gt;List prices for data transfer out to the internet, first paid tier, read on November 19, 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Free each month&lt;/th&gt;
&lt;th&gt;First paid tier&lt;/th&gt;
&lt;th&gt;Applies to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AWS&lt;/td&gt;
&lt;td&gt;100 GB&lt;/td&gt;
&lt;td&gt;$0.09 per GB, up to 10 TB&lt;/td&gt;
&lt;td&gt;US East (N. Virginia)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Azure&lt;/td&gt;
&lt;td&gt;100 GB&lt;/td&gt;
&lt;td&gt;$0.087 per GB, next 10 TB&lt;/td&gt;
&lt;td&gt;From North America or Europe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud, Premium Tier&lt;/td&gt;
&lt;td&gt;1 GiB&lt;/td&gt;
&lt;td&gt;$0.12 per GiB, up to 1 TiB&lt;/td&gt;
&lt;td&gt;From Iowa to North America&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud, Standard Tier&lt;/td&gt;
&lt;td&gt;200 GiB&lt;/td&gt;
&lt;td&gt;$0.085 per GiB, up to 10,240 GiB&lt;/td&gt;
&lt;td&gt;From Iowa&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A worked example at AWS list prices, for 100 TB (102,400 GB) leaving US East in 1 month, ignoring the 100 GB free tier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First 10,240 GB at $0.09 = $921.60&lt;/li&gt;
&lt;li&gt;Next 40,960 GB at $0.085 = $3,481.60&lt;/li&gt;
&lt;li&gt;Last 51,200 GB at $0.07 = $3,584.00&lt;/li&gt;
&lt;li&gt;Total = $7,987.20&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;About $8,000 for 100 TB. It is a real cost and a small one next to the engineering time of the move.&lt;/p&gt;

&lt;h3&gt;
  
  
  Leaving for free has rules and dates
&lt;/h3&gt;

&lt;p&gt;All 3 providers now waive egress charges for customers who leave. Each has conditions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;What you must do&lt;/th&gt;
&lt;th&gt;Timeline&lt;/th&gt;
&lt;th&gt;The catch&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AWS&lt;/td&gt;
&lt;td&gt;Ask support, and wait for approval before you start&lt;/td&gt;
&lt;td&gt;Request "at least two months prior" to the start. 180 days to finish for customers outside the EU&lt;/td&gt;
&lt;td&gt;You must move all your data off AWS, or all of it off 1 service. CloudFront and Direct Connect transfer is excluded&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud&lt;/td&gt;
&lt;td&gt;Send an Exit Notice before any transfer you want credited&lt;/td&gt;
&lt;td&gt;14 days, then 30 days to start, then 30 days or more to finish&lt;/td&gt;
&lt;td&gt;You must end all use of the service you leave. Internet transfers only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Azure&lt;/td&gt;
&lt;td&gt;Claim a credit for egress above the free 100 GB a month&lt;/td&gt;
&lt;td&gt;See the claim steps on the Azure bandwidth pricing page&lt;/td&gt;
&lt;td&gt;For moving all your data off Azure, over the internet&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In the European Union the Data Act has applied since September 12, 2025. The European Commission's summary: it "will also entirely remove switching charges, including charges for data egress", from January 12, 2027.&lt;/p&gt;

&lt;h3&gt;
  
  
  Contracts hold you longer than egress does
&lt;/h3&gt;

&lt;p&gt;37signals moved 7 applications out of AWS in the summer of 2023 and wrote about every step.&lt;/p&gt;

&lt;p&gt;3 details from their posts belong in any migration plan:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The savings came late: "it took until the end of that year for all the long-term contract commitments to end, so 2024 has been the first clean year of savings"&lt;/li&gt;
&lt;li&gt;Their file storage was "locked into a four(!!)-year contract" signed in 2021&lt;/li&gt;
&lt;li&gt;Missing that contract's end date would have had a price: "a cool five thousand dollars a day". And the move needed a calendar: for almost 6 petabytes they planned "at least three weeks" on a 40 Gbit line&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exit date = the end of your longest commitment. The egress price list has little to do with it.&lt;/p&gt;

&lt;p&gt;So before you sign a multi-year commitment to get a discount, write its end date next to the row of every workload it covers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Migration funding exists, ask for it
&lt;/h3&gt;

&lt;p&gt;All 3 vendors pay part of a migration: AWS through the Migration Acceleration Program, Microsoft through the page now titled Frontier Accelerate for Azure, Google through the Rapid Migration and Modernization Program (RaMP).&lt;/p&gt;

&lt;p&gt;Google publishes a baseline for general workloads: "20% of the projected Annual Recurring Revenue (ARR), capped at $2M per workload". Microsoft publishes one for databases: delivery funding and Azure credits "at 50% of year-one usage". AWS publishes no amount.&lt;/p&gt;

&lt;p&gt;In all 3 cases your number comes from your account manager or a partner. Ask before the first wave.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cloud migration checklist
&lt;/h2&gt;

&lt;p&gt;Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List every workload with an owner, its dependencies and its R&lt;/li&gt;
&lt;li&gt;Switch off what nobody uses before you plan anything else&lt;/li&gt;
&lt;li&gt;Write the reason and the review date next to every retained workload&lt;/li&gt;
&lt;li&gt;Build the landing zone and the shared services before the first application moves&lt;/li&gt;
&lt;li&gt;Pick a first workload that is low risk, used every day and typical&lt;/li&gt;
&lt;li&gt;Keep the first 5 waves under 10 servers each&lt;/li&gt;
&lt;li&gt;Move applications that share a database in the same wave&lt;/li&gt;
&lt;li&gt;Plan 4 to 5 waves ahead, and replan after each one&lt;/li&gt;
&lt;li&gt;Calculate the data transfer time on your real line&lt;/li&gt;
&lt;li&gt;Write the cutover script and rehearse it&lt;/li&gt;
&lt;li&gt;Write the rollback triggers and the time limit of each step&lt;/li&gt;
&lt;li&gt;Lower DNS TTLs at least 1 full old TTL before the cutover&lt;/li&gt;
&lt;li&gt;Validate data with checksums&lt;/li&gt;
&lt;li&gt;Watch closely for 24 to 48 hours&lt;/li&gt;
&lt;li&gt;Write the conditions for switching the source off, and the date&lt;/li&gt;
&lt;li&gt;Compare the new bill to the old one&lt;/li&gt;
&lt;li&gt;Know the end date of every commitment you sign&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the 7 Rs of cloud migration?
&lt;/h3&gt;

&lt;p&gt;They are AWS's 7 migration strategies: retire, retain, rehost, relocate, repurchase, replatform, and refactor or re-architect. Microsoft lists 8 and Google Cloud lists 6, with different names for some of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the 6 Rs and the 5 Rs?
&lt;/h3&gt;

&lt;p&gt;The 6 Rs are the AWS list from 2016: rehost, replatform, repurchase, refactor, retire and retain. The 5 Rs are Gartner's options from 2011: rehost, refactor, revise, rebuild and replace.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which cloud migration strategy is the fastest?
&lt;/h3&gt;

&lt;p&gt;Rehost, for a single workload. Google calls it "the type that requires the least amount of time". AWS calls relocate "the quickest way to migrate" when you move a whole platform at once.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is lift and shift a bad strategy?
&lt;/h3&gt;

&lt;p&gt;No. It is the right one for a workload that works and will not change soon. It is the wrong one for a workload with problems, since the problems move with it.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long does a cloud migration take?
&lt;/h3&gt;

&lt;p&gt;No vendor publishes a total. AWS gives 1 to 3 months to prepare a large migration and a pace of up to 50 servers a week for a team of 4 doing rehosts. Netflix took 7 years because it rebuilt everything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does a cloud migration need downtime?
&lt;/h3&gt;

&lt;p&gt;Per workload, you choose. A migration with a maintenance window is simpler. Continuous replication brings the window down to minutes, and it costs more preparation.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does it cost to move data out of a cloud?
&lt;/h3&gt;

&lt;p&gt;About $0.09 per GB at list price for the first 10 TB a month out of AWS US East, and about $8,000 for 100 TB. All 3 big providers waive it when you leave and follow their process.&lt;/p&gt;

&lt;h2&gt;
  
  
  A recap
&lt;/h2&gt;

&lt;p&gt;If you take away 1 thing from this guide, let it be this:&lt;/p&gt;

&lt;p&gt;A cloud migration strategy is a list of small decisions made BEFORE the move, so that nobody has to make them at 2 AM.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 R per workload, starting with what you can switch off&lt;/li&gt;
&lt;li&gt;Move first, modernize later, except the database&lt;/li&gt;
&lt;li&gt;A first workload that is boring and used every day&lt;/li&gt;
&lt;li&gt;Small waves, planned 4 to 5 ahead&lt;/li&gt;
&lt;li&gt;A cutover script with a way back and a time limit&lt;/li&gt;
&lt;li&gt;A date on which the old environment dies&lt;/li&gt;
&lt;li&gt;The end date of every contract you sign&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You don't need a consultant to run this. The vendor guides are free and the checklist above is the short version.&lt;/p&gt;

&lt;p&gt;If you would like a senior engineer to go over your plan with you before the first wave (yes, that is what we sell), &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;claim a free assessment&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://meteorops.com/blog/cloud-migration-strategy" rel="noopener noreferrer"&gt;MeteorOps blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>devops</category>
      <category>aws</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>kubectl Cheat Sheet: Commands by Task, Checked on v1.37</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Tue, 24 Nov 2026 15:30:07 +0000</pubDate>
      <link>https://dev.to/meteorops/kubectl-cheat-sheet-commands-by-task-checked-on-v137-4a39</link>
      <guid>https://dev.to/meteorops/kubectl-cheat-sheet-commands-by-task-checked-on-v137-4a39</guid>
      <description>&lt;p&gt;Most kubectl cheat sheets list commands by resource type. This one lists them by what you are trying to do, and every flag in it was checked against the Kubernetes v1.37 reference on November 18, 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;12 commands cover most days:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;You want to&lt;/th&gt;
&lt;th&gt;Run&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Know which cluster you are about to change&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl config current-context&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List the pods that are not running&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods -A --field-selector=status.phase!=Running&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Know why a pod is unhealthy&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl describe pod POD&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read the logs of the container that just crashed&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs POD --previous&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;See only the warnings&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl events --types=Warning&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get a shell in a container&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl exec -it POD -- sh&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get a shell when the image has no shell&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl debug -it POD --image=busybox:1.28 --target=CONTAINER&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reach a service from your laptop&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl port-forward svc/SERVICE 8080:80&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;See a change before you make it&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl diff -f FILE.yaml&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Restart every pod of a Deployment, gradually&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout restart deployment/NAME&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go back to the previous version&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout undo deployment/NAME&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Check your permissions before you try&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl auth can-i delete pods -n NAMESPACE&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Words in capitals are placeholders. Replace them with your own names.&lt;/p&gt;

&lt;p&gt;The second command filters on the pod phase. A pod in CrashLoopBackOff, or one that runs with 0/1 containers ready, still has the phase Running and stays out of that list, and finished Job pods show up in it. For those, read the READY and STATUS columns of &lt;code&gt;kubectl get pods -A&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Do you open this page during incidents?&lt;/strong&gt; A senior engineer spends an hour on your CI/CD, infra, Kubernetes, cloud cost and on-call setup. You leave with your top 3 risks, quick wins and a rough roadmap. &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;Claim your free assessment&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Find your task:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A pod is broken: &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet#debug-a-pod-by-its-status" rel="noopener noreferrer"&gt;debug a pod by its status&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The image has no shell: &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet#kubectl-debug-when-exec-is-not-enough" rel="noopener noreferrer"&gt;kubectl debug&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You are about to change production: &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet#change-things-safely" rel="noopener noreferrer"&gt;change things safely&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A release went wrong: &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet#rollouts-restart-watch-and-undo" rel="noopener noreferrer"&gt;rollouts&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A node has to go: &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet#nodes-cordon-drain-and-uncordon" rel="noopener noreferrer"&gt;cordon, drain and uncordon&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You are about to delete something: &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet#delete-commands-that-hurt" rel="noopener noreferrer"&gt;delete commands that hurt&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A command from an old cheat sheet fails: &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet#old-commands-that-no-longer-work" rel="noopener noreferrer"&gt;old commands that no longer work&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setup: completion, an alias and the right cluster
&lt;/h2&gt;

&lt;p&gt;Tab completion and a 1-letter alias, for bash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source &amp;amp;lt;(kubectl completion bash)
alias k=kubectl
complete -o default -F __start_kubectl k
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For zsh, add this to &lt;code&gt;~/.zshrc&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source &amp;amp;lt;(kubectl completion zsh)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the commands that tell you where you are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;List the clusters in your &lt;a href="https://meteorops.com/glossary/kubeconfig" rel="noopener noreferrer"&gt;kubeconfig&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl config get-contexts&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Show the active one&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl config current-context&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Switch cluster&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl config use-context CONTEXT&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Set the default namespace for the active context&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl config set-context --current --namespace=NAMESPACE&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run 1 command against another cluster without switching&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl --context=CONTEXT get pods&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Show client and server versions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl version&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List every resource type the cluster knows&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl api-resources&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read the documentation of a field&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl explain pod.spec.containers.resources&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The classic kubectl accident is a correct command sent to the wrong cluster. In scripts and runbooks, write &lt;code&gt;--context&lt;/code&gt; and &lt;code&gt;-n&lt;/code&gt; on every command. A script that depends on whatever context your terminal had last is a script that will delete staging in production one day.&lt;/p&gt;

&lt;p&gt;Keep kubectl within 1 minor version of the cluster. The version skew policy says: "kubectl is supported within one minor version (older or newer) of kube-apiserver." The latest stable release today is v1.37.2, and the supported minors are 1.37, 1.36 and 1.35.&lt;/p&gt;

&lt;h2&gt;
  
  
  Look at things: get, describe and output formats
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pods in every namespace&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods -A&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pods with their node and IP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods -o wide&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pods by label&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods -l app=web&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pods on 1 node&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods -A --field-selector=spec.nodeName=NODE&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pods sorted by restarts&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Newest objects last&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods --sort-by=.metadata.creationTimestamp&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Watch changes live&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods -w&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A label as a column&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods -L app&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The full object&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get deployment NAME -o yaml&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Names only, for piping&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pods -o name&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Only the status part&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pod POD -o jsonpath='{.status}'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The human summary with events&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl describe pod POD&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Label selectors (&lt;code&gt;-l&lt;/code&gt;) support &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;!=&lt;/code&gt;, &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;notin&lt;/code&gt;. Field selectors support only &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;==&lt;/code&gt; and &lt;code&gt;!=&lt;/code&gt;, and the reference adds: "The server only supports a limited number of field queries per type."&lt;/p&gt;

&lt;h3&gt;
  
  
  Pull out 1 field with JSONPath
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Every image running in the cluster
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{.spec.containers[*].image}{"\n"}{end}'

# One key of a Secret, decoded
kubectl get secret NAME -o jsonpath='{.data.password}' | base64 -d

# A key with a dot in its name
kubectl get secret NAME -o jsonpath='{.data.ca\.crt}' | base64 -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JSONPath in kubectl has no regular expressions. The docs say to use jq for that.&lt;/p&gt;

&lt;h3&gt;
  
  
  Build your own table with custom-columns
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -o custom-columns='NAME:.metadata.name,NODE:.spec.nodeName,IMAGE:.spec.containers[*].image'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why "get all" misses things
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;kubectl get all&lt;/code&gt; does not return all. &lt;code&gt;all&lt;/code&gt; is a category that resource types opt into. In the Kubernetes source today it covers pods, services, deployments, replicasets, statefulsets, daemonsets, jobs, cronjobs, replicationcontrollers and horizontalpodautoscalers. ConfigMaps, Secrets, Ingresses, PersistentVolumeClaims, ServiceAccounts, Roles and NetworkPolicies are missing, and so are most custom resources.&lt;/p&gt;

&lt;p&gt;To list everything in a namespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl api-resources --verbs=list --namespaced -o name \
  | xargs -n 1 kubectl get --show-kind --ignore-not-found -n NAMESPACE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it before you delete a namespace you did not create.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debug a pod by its status
&lt;/h2&gt;

&lt;p&gt;Start from the STATUS column of &lt;code&gt;kubectl get pods&lt;/code&gt;. Each status has a first command.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;First command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Pending&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No node accepted the pod, or its volume is not ready&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl describe pod POD&lt;/code&gt;, then read the Events at the bottom&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;ImagePullBackOff&lt;/code&gt;, &lt;code&gt;ErrImagePull&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;The node cannot pull the image: wrong tag, private registry, missing pull secret&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl events --for pod/POD&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CrashLoopBackOff&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The container starts, exits and gets restarted with a growing delay&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs POD --previous&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;OOMKilled&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The container went over its memory limit and the kernel killed it&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl describe pod POD&lt;/code&gt;, then read Last State&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;Running&lt;/code&gt; with 0/1 ready&lt;/td&gt;
&lt;td&gt;The readiness probe fails&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl describe pod POD&lt;/code&gt;, then &lt;code&gt;kubectl logs POD&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;Terminating&lt;/code&gt; for minutes&lt;/td&gt;
&lt;td&gt;A finalizer or an unreachable node holds the pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl get pod POD -o jsonpath='{.metadata.finalizers}'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The glossary has a page for each of the 3 most common ones: &lt;a href="https://meteorops.com/glossary/crashloopbackoff" rel="noopener noreferrer"&gt;CrashLoopBackOff&lt;/a&gt;, &lt;a href="https://meteorops.com/glossary/imagepullbackoff" rel="noopener noreferrer"&gt;ImagePullBackOff&lt;/a&gt; and &lt;a href="https://meteorops.com/glossary/oomkilled" rel="noopener noreferrer"&gt;OOMKilled&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq6ih18yn1hmgw5e76za4.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq6ih18yn1hmgw5e76za4.webp" alt="Four pod statuses and the first command for each: Pending, kubectl describe pod. ImagePullBackOff, kubectl events --for pod. CrashLoopBackOff, kubectl logs --previous. OOMKilled, kubectl top pod --containers" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The first command for the 4 statuses you will meet most.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The reason the last container died, without scrolling through &lt;code&gt;describe&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pod POD -o jsonpath='{.status.containerStatuses[*].lastState.terminated.reason}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the answer is &lt;code&gt;OOMKilled&lt;/code&gt;, compare real usage with the limit before you raise it (&lt;a href="https://meteorops.com/blog/how-to-set-kubernetes-resource-requests-and-limits-without-throttling-apps" rel="noopener noreferrer"&gt;how to set requests and limits&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl top pod POD --containers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;kubectl top&lt;/code&gt; needs Metrics Server in the cluster. It reports CPU and memory only, and a new pod has no numbers for the first minutes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Logs
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Follow the logs&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs -f POD&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The container that ran before the last restart&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs POD --previous&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 container of a pod with several&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs POD -c CONTAINER&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every container of the pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs POD --all-containers&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The last 15 minutes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs POD --since=15m&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The last 100 lines, with timestamps&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs POD --tail=100 --timestamps&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every pod of a Deployment&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs deployment/NAME --all-pods&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every pod with a label, each line marked with its pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl logs -l app=web --prefix --tail=50&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;3 details that cost people time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;kubectl logs deployment/NAME&lt;/code&gt; without &lt;code&gt;--all-pods&lt;/code&gt; reads 1 pod. The flag arrived in kubectl 1.31.&lt;/li&gt;
&lt;li&gt;With a label selector, &lt;code&gt;--tail&lt;/code&gt; defaults to 10 lines per pod, and &lt;code&gt;-f&lt;/code&gt; stops with an error when the selector matches more than 5 pods. Raise that limit with &lt;code&gt;--max-log-requests&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--previous&lt;/code&gt; reads the previous container of the same pod. Once the pod is deleted, those logs are gone from kubectl. A log pipeline is the only thing that keeps them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Events
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl events --for pod/POD
kubectl events --types=Warning
kubectl events -A --types=Warning --watch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;kubectl events&lt;/code&gt; has been a top-level command since 1.26. It sorts by time on its own, which &lt;code&gt;kubectl get events&lt;/code&gt; does not. If you are on muscle memory, &lt;code&gt;kubectl get events --sort-by=.metadata.creationTimestamp&lt;/code&gt; still works.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shell, files and ports
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A shell in the pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl exec -it POD -- sh&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 command in 1 container&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl exec POD -c CONTAINER -- env&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A command in the first pod of a Deployment&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl exec deployment/NAME -- date&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Copy a file out of a pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl cp NAMESPACE/POD:/tmp/dump.hprof ./dump.hprof&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local port 8080 to port 80 of a Service&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl port-forward svc/SERVICE 8080:80&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local port 5432 to a pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl port-forward pod/POD 5432:5432&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;--&lt;/code&gt; before the command is required. The form without it was removed in kubectl 1.31, and some cheat sheets that rank today still print it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kubectl cp&lt;/code&gt; needs the &lt;code&gt;tar&lt;/code&gt; binary inside the container. On a distroless image it fails, which brings us to the next command.&lt;/p&gt;

&lt;h2&gt;
  
  
  kubectl debug: when exec is not enough
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;kubectl exec&lt;/code&gt; can only run a binary that exists in the image. A distroless image has no shell and no tools, and a crashing container does not stay up long enough to exec into. &lt;code&gt;kubectl debug&lt;/code&gt; covers both, in 3 modes.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Use it when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ephemeral container in the running pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl debug -it POD --image=busybox:1.28 --target=CONTAINER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The pod runs and the image has no tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Copy of the pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl debug POD -it --copy-to=POD-debug --container=CONTAINER -- sh&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The container crashes at start and you want it with another command&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pod on the node&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl debug node/NODE -it --image=busybox:1.28&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The problem is the node and you have no SSH&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8o2m790doxu76hwxggxp.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8o2m790doxu76hwxggxp.webp" alt="The 3 modes of kubectl debug: an ephemeral container inside the running pod, a copy of the pod, and a debug pod on the node with the host filesystem at /host" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The 3 modes of kubectl debug.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--target&lt;/code&gt; puts the debug container in the process namespace of the named container, so &lt;code&gt;ps&lt;/code&gt; shows its processes. The container runtime has to support it.&lt;/li&gt;
&lt;li&gt;An ephemeral container stays in the pod spec until the pod is replaced. It never restarts, and you cannot add one with &lt;code&gt;kubectl edit&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In node mode the node's filesystem is mounted at &lt;code&gt;/host&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Delete the copy and the node pod when you are done. Nothing cleans them up for you.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;--profile&lt;/code&gt; sets how much power the debug container gets: &lt;code&gt;general&lt;/code&gt;, &lt;code&gt;baseline&lt;/code&gt;, &lt;code&gt;restricted&lt;/code&gt;, &lt;code&gt;netadmin&lt;/code&gt; or &lt;code&gt;sysadmin&lt;/code&gt;. The default changed from &lt;code&gt;legacy&lt;/code&gt; to &lt;code&gt;general&lt;/code&gt; in kubectl 1.36, and &lt;code&gt;legacy&lt;/code&gt; is planned for removal in 1.39. Use &lt;code&gt;--profile=sysadmin&lt;/code&gt; when you need root on a node, and &lt;code&gt;--profile=restricted&lt;/code&gt; in namespaces that enforce the restricted Pod Security Standard.&lt;/p&gt;

&lt;p&gt;(One official page still says the default is &lt;code&gt;legacy&lt;/code&gt;. The v1.37 command reference and the 1.36 changelog say &lt;code&gt;general&lt;/code&gt;.)&lt;/p&gt;
&lt;h2&gt;
  
  
  Change things safely
&lt;/h2&gt;

&lt;p&gt;The order I use for any change to a cluster that matters: diff, server dry run, apply.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl diff -f deploy.yaml
kubectl apply -f deploy.yaml --dry-run=server
kubectl apply -f deploy.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;kubectl diff&lt;/code&gt; exits with 0 when nothing would change, 1 when something would, and more than 1 on an error. That makes it a 1-line drift check in CI.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--dry-run=server&lt;/code&gt; sends the request through admission and validation without saving it. &lt;code&gt;--dry-run=client&lt;/code&gt; only prints the object. Always write the value: the bare &lt;code&gt;--dry-run&lt;/code&gt; has been deprecated since 1.18.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl apply -k DIRECTORY&lt;/code&gt; applies a kustomization the same way.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Let kubectl write the YAML
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create deployment web --image=nginx:1.27 --dry-run=client -o yaml &amp;gt; deploy.yaml
kubectl create secret generic db --from-literal=password=CHANGE_ME --dry-run=client -o yaml
kubectl create configmap app-config --from-file=config.yaml --dry-run=client -o yaml
kubectl create job manual-run --from=cronjob/NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last line runs a CronJob once, now. It is the fastest way to test one without waiting for the schedule.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick edits
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Change the image&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl set image deployment/NAME CONTAINER=IMAGE:TAG&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Change an environment variable&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl set env deployment/NAME KEY=value&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Change a memory limit&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl set resources deployment/NAME -c CONTAINER --limits=memory=512Mi&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scale&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl scale deployment/NAME --replicas=3&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Patch 1 field&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl patch deployment NAME -p '{"spec":{"replicas":3}}'&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add or change a label&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl label pods POD team=payments --overwrite&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Remove a label&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl label pods POD team-&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open the live object in your editor&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl edit deployment/NAME&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If Argo CD or Flux owns the object, these edits last until the next sync. If Helm owns it, they last until the next &lt;code&gt;helm upgrade&lt;/code&gt;. Use them to stop an incident, then put the same change in Git.&lt;/p&gt;

&lt;h3&gt;
  
  
  apply, create or replace
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;apply&lt;/code&gt; sends only the differences and keeps fields that other writers set. Use it for everything that lives in a file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;create&lt;/code&gt; fails when the object exists. Use it for one-off objects and for generating YAML.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;replace&lt;/code&gt; swaps the whole spec and drops whatever is missing from your file. &lt;code&gt;replace --force&lt;/code&gt; deletes and recreates the object, and the official quick reference marks it: "Will cause a service outage."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pick 1 per object. The docs are blunt about it: "Mixing and matching techniques for the same object results in undefined behavior."&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kubectl apply --server-side&lt;/code&gt; moves the merge to the API server and records which tool owns each field. When another tool owns a field you are changing, the request is rejected until you pass &lt;code&gt;--force-conflicts&lt;/code&gt;. Read the conflict before you force it: it is usually your autoscaler or your GitOps controller telling you the field is taken.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rollouts: restart, watch and undo
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Wait for a rollout to finish&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout status deployment/NAME --timeout=120s&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Restart every pod, one batch at a time&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout restart deployment/NAME&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Restart every Deployment with a label&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout restart deployment --selector=app=web&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;List the revisions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout history deployment/NAME&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go back 1 revision&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout undo deployment/NAME&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go back to a specific revision&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout undo deployment/NAME --to-revision=2&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Freeze a rollout halfway&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout pause deployment/NAME&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Continue it&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl rollout resume deployment/NAME&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;rollout restart&lt;/code&gt; is the answer to "the app did not pick up the new ConfigMap". It follows the Deployment's update strategy. With the default RollingUpdate strategy, 2 or more replicas and a readiness probe, nobody notices. With the Recreate strategy every pod stops first.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rollout undo&lt;/code&gt; has the same catch as the quick edits: a GitOps controller will roll you forward again on its next sync. Revert the commit too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wait for something in a script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl wait --for=condition=Available deployment/NAME --timeout=120s
kubectl wait --for=condition=Ready pod -l app=web --timeout=60s
kubectl wait --for=condition=Complete job/NAME --timeout=10m
kubectl wait --for=delete pod/POD --timeout=60s
kubectl wait --for=jsonpath='{.status.phase}'=Running pod/POD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The default timeout is 30 seconds, so set it. &lt;code&gt;kubectl wait&lt;/code&gt; replaces every &lt;code&gt;sleep 30&lt;/code&gt; in a pipeline, and it fails the step when the thing never becomes ready. One catch: waiting for &lt;code&gt;condition=Complete&lt;/code&gt; on a Job that failed runs until the timeout, because a failed Job never gets that condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nodes: cordon, drain and uncordon
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl cordon NODE
kubectl drain NODE --ignore-daemonsets --delete-emptydir-data --timeout=300s
# patch, reboot or replace the node
kubectl uncordon NODE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;cordon&lt;/code&gt; stops new pods from landing on the node. &lt;code&gt;drain&lt;/code&gt; cordons first and then evicts what runs there. A plain &lt;code&gt;kubectl drain NODE&lt;/code&gt; stops on most real nodes, because of what drain refuses to touch by default:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;On the node&lt;/th&gt;
&lt;th&gt;What drain does&lt;/th&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DaemonSet pods&lt;/td&gt;
&lt;td&gt;Refuses to proceed. With the flag it skips them, since the DaemonSet would recreate them at once&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--ignore-daemonsets&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pods with an emptyDir volume&lt;/td&gt;
&lt;td&gt;Refuses, because the data dies with the pod&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--delete-emptydir-data&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pods with no controller&lt;/td&gt;
&lt;td&gt;Refuses, because nothing would recreate them&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--force&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pods under a PodDisruptionBudget with no room left&lt;/td&gt;
&lt;td&gt;Waits and retries until the budget allows the eviction&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--timeout&lt;/code&gt; to give up&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flnat7o6ju3evdn061ifo.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flnat7o6ju3evdn061ifo.webp" alt="What kubectl drain refuses by default and the flag for each: DaemonSet pods need --ignore-daemonsets, pods with emptyDir need --delete-emptydir-data, pods with no controller need --force, and a full PodDisruptionBudget makes drain wait" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;What drain refuses by default, and the flag for each case.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There is a flag that skips &lt;a href="https://meteorops.com/glossary/kubernetes-poddisruptionbudget-pdb" rel="noopener noreferrer"&gt;PodDisruptionBudgets&lt;/a&gt;, &lt;code&gt;--disable-eviction&lt;/code&gt;, and its own help text says "use with caution". A drain that hangs on a budget is doing its job. Fix the budget or add a replica. The longer version is in &lt;a href="https://meteorops.com/blog/how-to-drain-kubernetes-nodes-without-evicting-critical-workloads" rel="noopener noreferrer"&gt;how to drain Kubernetes nodes without evicting critical workloads&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Other node commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl top node
kubectl describe node NODE
kubectl taint nodes NODE dedicated=batch:NoSchedule
kubectl taint nodes NODE dedicated=batch:NoSchedule-
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The trailing &lt;code&gt;-&lt;/code&gt; on the last line removes the taint.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check access: can-i and whoami
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl auth whoami
kubectl auth can-i create deployments -n NAMESPACE
kubectl auth can-i --list -n NAMESPACE
kubectl auth can-i list secrets -n NAMESPACE --as=system:serviceaccount:NAMESPACE:SERVICEACCOUNT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last one answers "can this workload read Secrets?" without deploying anything. &lt;code&gt;-q&lt;/code&gt; prints nothing and only sets the exit code, for scripts.&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;kubectl exec&lt;/code&gt; or &lt;code&gt;port-forward&lt;/code&gt; returns a permission error after an upgrade to 1.35: since that release the API server requires &lt;code&gt;create&lt;/code&gt; on &lt;code&gt;pods/exec&lt;/code&gt;, &lt;code&gt;pods/attach&lt;/code&gt; and &lt;code&gt;pods/portforward&lt;/code&gt; for every request. Roles that only granted &lt;code&gt;get&lt;/code&gt; on them no longer work.&lt;/p&gt;

&lt;p&gt;When a command behaves in a way you cannot explain, add &lt;code&gt;--v=6&lt;/code&gt; to see every API request kubectl makes, and &lt;code&gt;--v=8&lt;/code&gt; to see the request bodies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Delete commands that hurt
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What it really does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl delete pod POD&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Asks the pod to stop and gives it its grace period, 30 seconds by default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl delete pod POD --now&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Same as &lt;code&gt;--grace-period=1&lt;/code&gt;. The pod still gets a signal and 1 second&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl delete pod POD --grace-period=0 --force&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Removes the pod from the API at once and does not wait for the node to confirm that the processes stopped&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl delete pods --all&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deletes every pod in the current namespace. Whichever namespace that is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl delete namespace NAMESPACE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deletes everything in the namespace. The docs put an exclamation mark on that sentence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl delete -f DIRECTORY/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deletes every object defined in every manifest of the directory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl replace --force -f FILE.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deletes and recreates. An outage for a Deployment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl delete deployment NAME --cascade=orphan&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deletes the Deployment and leaves its pods running&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zzmruyucakjc0okgrym.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zzmruyucakjc0okgrym.webp" alt="How long a pod gets to stop: 30 seconds by default with kubectl delete pod, 1 second with --now, and no wait and no confirmation with --grace-period=0 --force" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;How long a pod gets to stop, by flag.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Force delete deserves a paragraph. The reference warns that it "does not wait for confirmation that the pod's processes have been terminated, which can leave those processes running". For a stateless web pod that is harmless. For a StatefulSet pod it can mean 2 copies of the same database member writing at once, and the StatefulSet docs name the result: data loss. If a pod is stuck in &lt;code&gt;Terminating&lt;/code&gt;, find out what holds it (a finalizer, or a node that is gone) before you reach for &lt;code&gt;--force&lt;/code&gt;. When the node is dead for good, the documented fix is to delete the Node object.&lt;/p&gt;

&lt;p&gt;Also worth knowing: deleting a pod or a Deployment bypasses PodDisruptionBudgets. Only evictions, like the ones &lt;code&gt;drain&lt;/code&gt; sends, respect them.&lt;/p&gt;

&lt;p&gt;2 habits that prevent most of the table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl delete pods --all -n NAMESPACE --dry-run=server
kubectl delete pods --all -n NAMESPACE --interactive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first prints what would be deleted. The second lists the objects and asks for a yes. &lt;code&gt;--interactive&lt;/code&gt; (short: &lt;code&gt;-i&lt;/code&gt;) has been on by default since kubectl 1.29 and stable since 1.30.&lt;/p&gt;

&lt;h2&gt;
  
  
  kuberc: make the safe flags your default
&lt;/h2&gt;

&lt;p&gt;kuberc is a preferences file for kubectl, separate from your kubeconfig. It holds aliases and default flags and no credentials. It has been beta and on by default since kubectl 1.34, and the changelog of the upcoming 1.38 graduates it to stable, with &lt;code&gt;kubectl.config.k8s.io/v1&lt;/code&gt; as the API version.&lt;/p&gt;

&lt;p&gt;The file lives at &lt;code&gt;~/.kube/kuberc&lt;/code&gt;. This version makes every delete ask for confirmation and adds an alias:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: kubectl.config.k8s.io/v1beta1
kind: Preference
defaults:
  - command: delete
    options:
      - name: interactive
        default: "true"
aliases:
  - name: getn
    command: get
    options:
      - name: output
        default: json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A flag you type always wins over the default, so &lt;code&gt;kubectl delete pod POD --interactive=false&lt;/code&gt; still skips the prompt. To switch the file off for 1 shell, set &lt;code&gt;KUBERC=off&lt;/code&gt;. CI runners have no kuberc unless you put one there, so your pipelines are not affected. A script you run on your own laptop is: give its delete commands &lt;code&gt;--interactive=false&lt;/code&gt;, or it will stop and wait for an answer.&lt;/p&gt;

&lt;p&gt;The kubectl maintainers suggest 2 more settings: server-side apply as the default for &lt;code&gt;kubectl apply&lt;/code&gt;, and a policy for credential plugins. I would add server-side apply per team, after you check which tools already own fields in your cluster. Their example sets the credential plugin policy to DenyAll, and the same page tells users of managed Kubernetes to use an allowlist, since those clusters log you in through such a plugin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Old commands that no longer work
&lt;/h2&gt;

&lt;p&gt;If a command from an older cheat sheet or a Stack Overflow answer fails, it is probably in this table.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Old form&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Use now&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl exec POD ls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Removed in 1.31&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl exec POD -- ls&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl run NAME --replicas=3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;run&lt;/code&gt; only creates pods since 1.18, flag removed in 1.21&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl create deployment NAME --image=IMAGE --replicas=3&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl rolling-update&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Removed in 1.18&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl set image&lt;/code&gt; and &lt;code&gt;kubectl rollout&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl get TYPE NAME -o yaml --export&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deprecated in 1.14 and removed&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl get TYPE NAME -o yaml&lt;/code&gt;, then clean the status and metadata by hand&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl get componentstatuses&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;API deprecated in 1.19&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl get --raw='/readyz?verbose'&lt;/code&gt; (API server and etcd checks only)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;kubectl alpha events&lt;/code&gt;, &lt;code&gt;kubectl alpha debug&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Promoted in 1.26 and 1.20&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl events&lt;/code&gt;, &lt;code&gt;kubectl debug&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl apply --server-dry-run&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Replaced in 1.18&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kubectl apply --dry-run=server&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubectl delete --cascade=false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The documented values are background, orphan and foreground&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--cascade=orphan&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;kubectl top namespace&lt;/code&gt;, &lt;code&gt;kubectl create pod&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Do not exist, and a cheat sheet that ranks today still prints them&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kubectl top pod -n NAMESPACE --sum&lt;/code&gt;, &lt;code&gt;kubectl run&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;1 more thing that looks deprecated and is not: &lt;code&gt;kubectl apply --prune&lt;/code&gt;. It has carried an alpha warning since kubectl 1.5, and its replacement, ApplySets, has been alpha since 1.27. If you want deleted manifests to delete objects, that is a job for Argo CD, Flux or Helm today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plugins
&lt;/h2&gt;

&lt;p&gt;A kubectl plugin is any executable on your PATH whose name starts with &lt;code&gt;kubectl-&lt;/code&gt;. A file named &lt;code&gt;kubectl-foo&lt;/code&gt; gives you &lt;code&gt;kubectl foo&lt;/code&gt;. Plugins cannot replace built-in commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl plugin list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Krew is the plugin manager maintained by the Kubernetes CLI group. Before you install from it on a laptop that holds production credentials, read this line from the docs: "Kubectl plugins available via the Krew plugin index are not audited for security." A plugin runs with your kubeconfig.&lt;/p&gt;

&lt;h2&gt;
  
  
  The checklist before a command in production
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;kubectl config current-context&lt;/code&gt; says the cluster you mean&lt;/li&gt;
&lt;li&gt;The command has &lt;code&gt;-n NAMESPACE&lt;/code&gt; written out&lt;/li&gt;
&lt;li&gt;For a change: &lt;code&gt;kubectl diff&lt;/code&gt; shows only what you expect&lt;/li&gt;
&lt;li&gt;For a delete: you ran it once with &lt;code&gt;--dry-run=server&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;For a drain: no &lt;code&gt;--disable-eviction&lt;/code&gt;, and a &lt;code&gt;--timeout&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;For a quick edit on a GitOps-managed object: the same change is on its way to Git&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;--force&lt;/code&gt; on a StatefulSet pod&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is kubectl?
&lt;/h3&gt;

&lt;p&gt;kubectl is the command-line client for the Kubernetes API. Almost every command in this cheat sheet is an HTTP request to the API server of the cluster your current context points to. The &lt;code&gt;kubectl config&lt;/code&gt; commands only read and edit your local kubeconfig.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I see why a pod is not starting?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;kubectl describe pod POD&lt;/code&gt; and read the Events section at the bottom, or run &lt;code&gt;kubectl events --for pod/POD&lt;/code&gt;. For a pod that starts and crashes, run &lt;code&gt;kubectl logs POD --previous&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I restart a pod with kubectl?
&lt;/h3&gt;

&lt;p&gt;There is no restart command for a single pod. For a pod that belongs to a Deployment, run &lt;code&gt;kubectl rollout restart deployment/NAME&lt;/code&gt;, which replaces every pod gradually. Deleting 1 pod also works, since the Deployment creates a new one.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I switch namespace in kubectl?
&lt;/h3&gt;

&lt;p&gt;Add &lt;code&gt;-n NAMESPACE&lt;/code&gt; to a command, or change the default of the current context with &lt;code&gt;kubectl config set-context --current --namespace=NAMESPACE&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between kubectl apply and kubectl create?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;create&lt;/code&gt; makes a new object and fails if it exists. &lt;code&gt;apply&lt;/code&gt; creates the object or updates it to match the file, and can be run again and again. Use &lt;code&gt;apply&lt;/code&gt; for files you keep in Git.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does kubectl get all not show my ConfigMaps and Secrets?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;all&lt;/code&gt; is a category that covers a short list of workload types. ConfigMaps, Secrets, Ingresses and PersistentVolumeClaims are not in it. Use the &lt;code&gt;api-resources&lt;/code&gt; one-liner from the section on &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet#look-at-things-get-describe-and-output-formats" rel="noopener noreferrer"&gt;looking at things&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which kubectl version should I install?
&lt;/h3&gt;

&lt;p&gt;A version within 1 minor of your cluster's API server. With a 1.36 cluster, kubectl 1.35, 1.36 and 1.37 are supported.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recap
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Know your context before every command, and write &lt;code&gt;--context&lt;/code&gt; and &lt;code&gt;-n&lt;/code&gt; in scripts&lt;/li&gt;
&lt;li&gt;Debug from the STATUS column: &lt;code&gt;describe&lt;/code&gt; for Pending, &lt;code&gt;events&lt;/code&gt; for image pulls, &lt;code&gt;logs --previous&lt;/code&gt; for crashes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl debug&lt;/code&gt; replaces &lt;code&gt;exec&lt;/code&gt; on images with no shell&lt;/li&gt;
&lt;li&gt;diff, &lt;code&gt;--dry-run=server&lt;/code&gt;, then apply&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rollout restart&lt;/code&gt; to restart, &lt;code&gt;rollout undo&lt;/code&gt; to go back, and revert the commit too&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;drain&lt;/code&gt; needs &lt;code&gt;--ignore-daemonsets&lt;/code&gt; and a timeout, and a PodDisruptionBudget that blocks it is a feature&lt;/li&gt;
&lt;li&gt;Put &lt;code&gt;--interactive&lt;/code&gt; for delete in your kuberc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you would like someone to look at the cluster behind these commands (yes, that is what we do), &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;claim a free assessment&lt;/a&gt; and a senior engineer will review your setup with you.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://meteorops.com/blog/kubectl-cheat-sheet" rel="noopener noreferrer"&gt;MeteorOps blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>cloud</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Terraform Import: Import Blocks, Commands and ID Formats</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Tue, 17 Nov 2026 15:30:33 +0000</pubDate>
      <link>https://dev.to/meteorops/terraform-import-import-blocks-commands-and-id-formats-26j7</link>
      <guid>https://dev.to/meteorops/terraform-import-import-blocks-commands-and-id-formats-26j7</guid>
      <description>&lt;p&gt;Terraform import does 1 thing: it ties a resource that already exists to an address in your Terraform state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;Use an &lt;code&gt;import&lt;/code&gt; block. It has been in Terraform since 1.5 (June 2023), it shows up in &lt;code&gt;terraform plan&lt;/code&gt;, and it goes through a pull request like any other change.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;aws_s3_bucket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;assets&lt;/span&gt;
  &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"my-company-assets"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket"&lt;/span&gt; &lt;span class="s2"&gt;"assets"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;bucket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"my-company-assets"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;terraform plan&lt;/code&gt;. The line you want to see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Plan: 1 to import, 0 to add, 0 to change, 0 to destroy.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run &lt;code&gt;terraform apply&lt;/code&gt;. With that plan line, nothing changes in your cloud account. Terraform records that it now manages the bucket.&lt;/p&gt;

&lt;p&gt;Which method to use, by situation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your situation&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;You know the resource and can write its block&lt;/td&gt;
&lt;td&gt;An &lt;code&gt;import&lt;/code&gt; block&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You have the ID and no configuration&lt;/td&gt;
&lt;td&gt;An &lt;code&gt;import&lt;/code&gt; block plus &lt;code&gt;-generate-config-out&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10 resources of the same type&lt;/td&gt;
&lt;td&gt;1 &lt;code&gt;import&lt;/code&gt; block with &lt;code&gt;for_each&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You do not know what exists in the account&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;terraform query&lt;/code&gt; (Terraform 1.14 and later)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You are pinned below Terraform 1.5&lt;/td&gt;
&lt;td&gt;The &lt;code&gt;terraform import&lt;/code&gt; command&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foy1iqv1mxf1trg2dqqrd.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foy1iqv1mxf1trg2dqqrd.webp" alt="Four cards with the Terraform version that added each import method: import block 1.5, -generate-config-out 1.5, for_each 1.7, terraform query 1.14"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The 4 import methods and the Terraform version that added each one.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My rule for every import: the plan shows imports and 0 to add, 0 to change, 0 to destroy. Anything else gets fixed in the configuration before anyone applies.&lt;/p&gt;

&lt;p&gt;Versions here were checked on November 17, 2026: Terraform 1.17.2, OpenTofu 1.13.9 and the AWS provider 6.73.0. The terminal output in the examples that use &lt;code&gt;random_string&lt;/code&gt; is real output from Terraform 1.17.2, so you can reproduce it with no cloud account.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Is half of your infrastructure still outside Terraform?&lt;/strong&gt; A senior engineer spends an hour on your CI/CD, infra, Kubernetes, cloud cost and on-call setup. You leave with your top 3 risks, quick wins and a rough roadmap. &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;Claim your free assessment&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Find your situation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have 1 resource to bring in today: &lt;a href="https://meteorops.com/blog/terraform-import#import-with-an-import-block-in-5-steps" rel="noopener noreferrer"&gt;import with an import block in 5 steps&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You have no configuration for it: &lt;a href="https://meteorops.com/blog/terraform-import#generate-the-resource-block-when-you-have-none" rel="noopener noreferrer"&gt;generate the resource block&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You need the ID string for a resource type: &lt;a href="https://meteorops.com/blog/terraform-import#import-id-formats-for-common-resources" rel="noopener noreferrer"&gt;import ID formats&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The plan after your import wants to replace something: &lt;a href="https://meteorops.com/blog/terraform-import#what-import-leaves-out" rel="noopener noreferrer"&gt;what import leaves out&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Your team shares the state: &lt;a href="https://meteorops.com/blog/terraform-import#a-safe-import-workflow-for-a-team" rel="noopener noreferrer"&gt;a safe import workflow for a team&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You imported the wrong thing: &lt;a href="https://meteorops.com/blog/terraform-import#undo-an-import-without-destroying-anything" rel="noopener noreferrer"&gt;undo an import&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Import binds an object to an address
&lt;/h2&gt;

&lt;p&gt;Terraform tracks 3 things: the real object in your cloud, the &lt;a href="https://meteorops.com/glossary/terraform-state" rel="noopener noreferrer"&gt;state&lt;/a&gt; that maps it to an address, and the configuration that describes it.&lt;/p&gt;

&lt;p&gt;A resource created by hand has the first and is missing the other 2.&lt;/p&gt;

&lt;p&gt;Import = write the state entry for an object that already exists.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvfafnc4sm8eb849mqzmt.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvfafnc4sm8eb849mqzmt.webp" alt="Three boxes: real object, state and configuration. An arrow labeled import goes from the real object to the state, and a resource block links the state to the configuration"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Import writes the state entry. The resource block is still yours to write.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That is all it does. Three consequences follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Import changes nothing in your cloud.&lt;/strong&gt; The first apply after it can, if your configuration differs from the real object&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You still need a resource block.&lt;/strong&gt; Terraform's docs: "you must define a resource block for any resource in state to prevent Terraform from destroying it"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1 object, 1 address.&lt;/strong&gt; Terraform expects every remote object to be bound to a single address, and it does not check that for you&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some resource types cannot be imported at all. Each provider documents import at the bottom of the resource's page. If the section is missing, expect an error like this one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: Resource Import Not Implemented

This resource does not support import. Please contact the provider developer
for additional information.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Import with an import block in 5 steps
&lt;/h2&gt;

&lt;p&gt;The same 5 steps work for an S3 bucket, a VPC or a Helm release.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Write the resource block&lt;/strong&gt;, with every argument whose real value differs from the provider's default&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the import block&lt;/strong&gt; next to it, or in an &lt;code&gt;imports.tf&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run &lt;code&gt;terraform plan&lt;/code&gt;&lt;/strong&gt; and read it&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run &lt;code&gt;terraform apply&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run &lt;code&gt;terraform plan&lt;/code&gt; again.&lt;/strong&gt; It has to say "No changes"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is a version you can run on your laptop in 2 minutes. The &lt;code&gt;random_string&lt;/code&gt; resource needs no credentials and supports import.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;required_providers&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;random&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"hashicorp/random"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"random_string"&lt;/span&gt; &lt;span class="s2"&gt;"legacy_token"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;random_string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;legacy_token&lt;/span&gt;
  &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Xk9$mQ2p"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The plan, on Terraform 1.17.2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;random_string.legacy_token: Preparing import... [id=Xk9$mQ2p]
random_string.legacy_token: Refreshing state... [id=Xk9$mQ2p]

Terraform will perform the following actions:

  # random_string.legacy_token will be imported
    resource "random_string" "legacy_token" {
        id          = "Xk9$mQ2p"
        length      = 8
        ...
    }

Plan: 1 to import, 0 to add, 0 to change, 0 to destroy.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The apply:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;random_string.legacy_token: Importing... [id=Xk9$mQ2p]
random_string.legacy_token: Import complete [id=Xk9$mQ2p]

Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second plan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;No changes. Your infrastructure matches the configuration.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What about the import block afterwards?&lt;/p&gt;

&lt;p&gt;You can delete it or keep it. It does nothing while the address is in state. HashiCorp recommends keeping it "as an historical artifact".&lt;/p&gt;

&lt;p&gt;I delete it once the import is merged and applied. A leftover block can surprise you later, and I show how &lt;a href="https://meteorops.com/blog/terraform-import#4-things-terraform-will-not-stop-you-from-doing" rel="noopener noreferrer"&gt;further down&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three details that save a retry
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The ID can be a variable or an expression&lt;/strong&gt; (since 1.6), as long as Terraform knows the value at plan time. An ID that depends on a resource created in the same run fails with "Invalid import id argument"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The provider can be chosen per block&lt;/strong&gt;, with &lt;code&gt;provider = aws.east&lt;/code&gt;, for a second region or account&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Import blocks inside child modules need Terraform 1.16 or later.&lt;/strong&gt; In the root module, target a module's resource with &lt;code&gt;to = module.network.aws_vpc.main&lt;/code&gt; on any version from 1.5&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Generate the resource block when you have none
&lt;/h2&gt;

&lt;p&gt;Writing 40 arguments of an old load balancer by hand is nobody's idea of a good afternoon.&lt;/p&gt;

&lt;p&gt;Terraform can write the first draft. Add only the import block, then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform plan -generate-config-out=generated.tf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  # random_string.session_secret will be imported
  # (config will be generated)
  ...

Plan: 1 to import, 0 to add, 0 to change, 0 to destroy.

Warning: Config generation is experimental
...

Terraform has generated configuration and written it to generated.tf. Please
review the configuration and edit it as necessary before adding it to version
control.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the file it wrote, unedited:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="c1"&gt;# __generated__ by Terraform&lt;/span&gt;
&lt;span class="c1"&gt;# Please review these resources and move them into your main configuration files.&lt;/span&gt;

&lt;span class="c1"&gt;# __generated__ by Terraform from "p7Wq!zR4tLm2"&lt;/span&gt;
&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"random_string"&lt;/span&gt; &lt;span class="s2"&gt;"session_secret"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;keepers&lt;/span&gt;          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
  &lt;span class="n"&gt;length&lt;/span&gt;           &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
  &lt;span class="n"&gt;lower&lt;/span&gt;            &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="n"&gt;min_lower&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
  &lt;span class="n"&gt;min_numeric&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
  &lt;span class="n"&gt;min_special&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
  &lt;span class="n"&gt;min_upper&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
  &lt;span class="n"&gt;numeric&lt;/span&gt;          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="n"&gt;override_special&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
  &lt;span class="n"&gt;special&lt;/span&gt;          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="n"&gt;upper&lt;/span&gt;            &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look at what it did: 1 argument I care about (&lt;code&gt;length&lt;/code&gt;) and 10 defaults and nulls.&lt;/p&gt;

&lt;p&gt;Generated configuration = a draft. HashiCorp calls it "Terraform's best guess".&lt;/p&gt;

&lt;p&gt;Clean it up before it reaches a pull request:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Delete the arguments that only restate a default or &lt;code&gt;null&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Replace hard-coded IDs with references to your other resources&lt;/li&gt;
&lt;li&gt;Replace repeated values with variables and locals&lt;/li&gt;
&lt;li&gt;Check every password and key argument by hand&lt;/li&gt;
&lt;li&gt;Move the block into the file and module where it belongs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The limits, as of Terraform 1.17.2:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Still experimental.&lt;/strong&gt; The flag has carried that label since 1.5, and the format of the output can change between versions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It never overwrites.&lt;/strong&gt; Run it twice with the same path and you get "Error: Target generated file already exists"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It does not work with &lt;code&gt;for_each&lt;/code&gt; or &lt;code&gt;count&lt;/code&gt;.&lt;/strong&gt; Depending on the shape you get "The target resource does not use for_each" or a message that the option "cannot be used with import blocks which use for_each, or resources which use for_each or count"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some drafts do not validate.&lt;/strong&gt; On resources with conflicting arguments, Terraform writes both and the plan fails with "Conflicting configuration arguments". Remove one and plan again&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Import many resources with for_each
&lt;/h2&gt;

&lt;p&gt;Since Terraform 1.7, 1 import block can bring in a whole set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="n"&gt;locals&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;buckets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;staging&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"acme-assets-staging"&lt;/span&gt;
    &lt;span class="n"&gt;uat&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"acme-assets-uat"&lt;/span&gt;
    &lt;span class="n"&gt;prod&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"acme-assets-prod"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;for_each&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;buckets&lt;/span&gt;
  &lt;span class="n"&gt;to&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;aws_s3_bucket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;assets&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;each&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="n"&gt;id&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;each&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket"&lt;/span&gt; &lt;span class="s2"&gt;"assets"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;for_each&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;buckets&lt;/span&gt;
  &lt;span class="n"&gt;bucket&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;each&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same shape on the &lt;code&gt;random&lt;/code&gt; provider gives this plan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;  &lt;span class="c1"&gt;# random_string.token["api"] will be imported&lt;/span&gt;
  &lt;span class="c1"&gt;# random_string.token["web"] will be imported&lt;/span&gt;
  &lt;span class="c1"&gt;# random_string.token["worker"] will be imported&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="nc"&gt;Plan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;change&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;for_each&lt;/code&gt; takes a map, a set of strings or a list. The resource it targets has to be expanded too: with &lt;code&gt;for_each&lt;/code&gt; when the keys are strings, or with &lt;code&gt;count&lt;/code&gt; when you loop over a list.&lt;/p&gt;

&lt;p&gt;One limit to plan around: config generation and &lt;code&gt;for_each&lt;/code&gt; do not combine. For 30 resources with no configuration, generate the blocks one by one first, then refactor them into a &lt;code&gt;for_each&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find what to import with terraform query
&lt;/h2&gt;

&lt;p&gt;Every method above assumes you know the ID. In an account that grew by hand for 4 years, you often do not.&lt;/p&gt;

&lt;p&gt;Terraform 1.14 (November 2025) added a search step:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write a &lt;code&gt;list&lt;/code&gt; block in a file ending in &lt;code&gt;.tfquery.hcl&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;terraform query&lt;/code&gt; to see what exists&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;terraform query -generate-config-out=generated.tf&lt;/code&gt; to get &lt;code&gt;import&lt;/code&gt; and &lt;code&gt;resource&lt;/code&gt; blocks for the results&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An example, shortened from HashiCorp's docs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="n"&gt;list&lt;/span&gt; &lt;span class="s2"&gt;"aws_instance"&lt;/span&gt; &lt;span class="s2"&gt;"prod"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;aws&lt;/span&gt;
  &lt;span class="n"&gt;limit&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;
  &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-2"&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;name&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"tag:Name"&lt;/span&gt;
      &lt;span class="n"&gt;values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"prod-*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"staging-*"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What to know before you count on it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The provider has to support it per resource type.&lt;/strong&gt; In the AWS provider 6.73.0, 280 of 1,766 resource types can be listed. The common ones are in: instances, buckets, security groups, IAM roles, RDS instances, Lambda functions, EKS clusters, VPCs and subnets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A list block returns up to 100 results by default.&lt;/strong&gt; Raise it with &lt;code&gt;limit&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It returns identities only&lt;/strong&gt;, unless you set &lt;code&gt;include_resource = true&lt;/code&gt; or generate configuration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenTofu 1.13.9 has no &lt;code&gt;query&lt;/code&gt; command&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A real query needs cloud credentials, so there is no output on this page. The syntax above is HashiCorp's, and it passes &lt;code&gt;terraform validate -query&lt;/code&gt; against the AWS provider 6.73.0.&lt;/p&gt;

&lt;p&gt;HCP Terraform has the same search in the UI, under "Search &amp;amp; Import". It marks each result as Managed, Unknown or Unmanaged and generates the starter configuration for the ones you select.&lt;/p&gt;

&lt;h2&gt;
  
  
  The terraform import command still works, with 3 limits
&lt;/h2&gt;

&lt;p&gt;The old way is a command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform import aws_instance.web i-12345678
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It still ships in Terraform 1.17.2, and you will find it in every runbook written before 2023.&lt;/p&gt;

&lt;p&gt;The 3 limits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;No preview.&lt;/strong&gt; It writes to the state the moment you press enter. No plan, no approval, no pull request&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One resource per run.&lt;/strong&gt; The docs: "It cannot simultaneously import an entire collection of resources, such as an AWS VPC"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No configuration.&lt;/strong&gt; The resource block has to exist before you run it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Skip the block and you get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: resource address "random_pet.x" does not exist in the configuration.

Before importing this resource, please create its configuration in the root module. For example:

resource "random_pet" "x" {
  # (resource arguments)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the block in place, a successful run looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;random_string.x: Importing from ID "some-id"...
random_string.x: Import prepared!
  Prepared random_string for import
random_string.x: Refreshing state... [id=some-id]

Import successful!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Addresses with an index need quotes in most shells:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s1"&gt;'aws_instance.baz["example"]'&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;abcd1234&lt;/span&gt;
&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;aws_instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bar&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;abcd1234&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the command when you are on a Terraform older than 1.5, or for a 1-off repair of a state at 2 in the morning. For everything else, the block.&lt;/p&gt;

&lt;h2&gt;
  
  
  Import ID formats for common resources
&lt;/h2&gt;

&lt;p&gt;The ID is a string the provider defines, and every resource type has its own.&lt;/p&gt;

&lt;p&gt;When an import fails, check the ID format first. These are the ones from the provider docs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;ID format&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_instance&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Instance ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;i-12345678&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_s3_bucket&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Bucket name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bucket-name&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_vpc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;VPC ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;vpc-a01106c2&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_subnet&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Subnet ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;subnet-9d4a7b6c&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_security_group&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Security group ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sg-903004f8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_vpc_security_group_ingress_rule&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Security group rule ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sgr-02108b27edd666983&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_iam_role&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Role name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;developer_name&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_iam_role_policy_attachment&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Role name / policy ARN&lt;/td&gt;
&lt;td&gt;&lt;code&gt;test-role/arn:aws:iam::xxxxxxxxxxxx:policy/test-policy&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_route53_record&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Zone ID_name_type (plus _set identifier, if the record has one)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Z4KAPRWWNC7JR_dev.example.com_NS&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_db_instance&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The identifier&lt;/td&gt;
&lt;td&gt;&lt;code&gt;mydb-rds-instance&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_lambda_function&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Function name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;example&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;aws_eks_cluster&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cluster name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;example&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;google_compute_instance&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Project/zone/name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;my-project/us-central1-a/my-instance&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;google_storage_bucket&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Name, or project/name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;my-project/my-bucket&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;google_project_iam_member&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Project, role and member, separated by spaces&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"my-project roles/viewer user:foo@example.com"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;azurerm_resource_group&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Full Azure resource ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kubernetes_deployment&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Namespace/name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;default/terraform-example&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;helm_release&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Namespace/name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;default/example-name&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For any other type: open the resource's page in the Terraform Registry and scroll to "Import" at the bottom.&lt;/p&gt;

&lt;p&gt;(If you manage Kubernetes objects this way, there is a separate guide on &lt;a href="https://meteorops.com/blog/deploy-kubernetes-resources-using-terraform" rel="noopener noreferrer"&gt;deploying Kubernetes resources with Terraform&lt;/a&gt;.)&lt;/p&gt;

&lt;h3&gt;
  
  
  identity replaces the glued strings
&lt;/h3&gt;

&lt;p&gt;Formats like &lt;code&gt;test-role/arn:aws:iam::...&lt;/code&gt; exist because an ID had to be 1 string.&lt;/p&gt;

&lt;p&gt;Terraform 1.12 added &lt;code&gt;identity&lt;/code&gt;: named keys in place of 1 glued string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;aws_s3_bucket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;
  &lt;span class="n"&gt;identity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;bucket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"bucket-name"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;id&lt;/code&gt; or &lt;code&gt;identity&lt;/code&gt; in a block, never both&lt;/li&gt;
&lt;li&gt;The provider has to define an identity for the resource type. In the AWS provider 6.73.0, 582 of 1,766 types have one&lt;/li&gt;
&lt;li&gt;For AWS the keys are what you would guess: &lt;code&gt;bucket&lt;/code&gt; for a bucket, &lt;code&gt;role&lt;/code&gt; and &lt;code&gt;policy_arn&lt;/code&gt; for a role policy attachment, &lt;code&gt;zone_id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;type&lt;/code&gt; for a Route 53 record&lt;/li&gt;
&lt;li&gt;OpenTofu supports &lt;code&gt;identity&lt;/code&gt; since 1.12&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I still write &lt;code&gt;id&lt;/code&gt; for simple resources. I switch to &lt;code&gt;identity&lt;/code&gt; when the ID has a separator in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What import leaves out
&lt;/h2&gt;

&lt;p&gt;This is where imports go wrong. The import itself works, and then the next plan wants to change or destroy something.&lt;/p&gt;

&lt;h3&gt;
  
  
  Arguments you did not write
&lt;/h3&gt;

&lt;p&gt;For an argument you leave out of the resource block, Terraform assumes the provider's default.&lt;/p&gt;

&lt;p&gt;If the real object has a different value, the next apply "fixes" it.&lt;/p&gt;

&lt;p&gt;Sometimes the fix is an update in place. Sometimes it is a replacement. This is a real plan where the configuration says &lt;code&gt;length = 16&lt;/code&gt; and the imported object has 8:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;  &lt;span class="c1"&gt;# random_string.token must be replaced&lt;/span&gt;
  &lt;span class="c1"&gt;# (imported from "Xk9$mQ2p")&lt;/span&gt;
  &lt;span class="c1"&gt;# Warning: this will destroy the imported resource&lt;/span&gt;
&lt;span class="o"&gt;-/+&lt;/span&gt; &lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"random_string"&lt;/span&gt; &lt;span class="s2"&gt;"token"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Xk9$mQ2p"&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;known&lt;/span&gt; &lt;span class="n"&gt;after&lt;/span&gt; &lt;span class="n"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt; &lt;span class="c1"&gt;# forces replacement&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;Plan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;change&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terraform imports the object and destroys it in the same apply.&lt;/p&gt;

&lt;p&gt;Now picture that with a production database in place of a random string.&lt;/p&gt;

&lt;p&gt;The fix is in the configuration: make the block match the real object until the plan shows only imports. Where an argument can never match, &lt;code&gt;lifecycle { ignore_changes = [...] }&lt;/code&gt; tells Terraform to leave it alone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Companion resources
&lt;/h3&gt;

&lt;p&gt;One object in the console is often several resources in Terraform.&lt;/p&gt;

&lt;p&gt;The S3 bucket is the classic case. Since version 4 of the AWS provider, a bucket's settings are separate resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;aws_s3_bucket_versioning&lt;/code&gt; for versioning&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;aws_s3_bucket_acl&lt;/code&gt; for the ACL&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;aws_s3_bucket_cors_configuration&lt;/code&gt; for CORS rules&lt;/li&gt;
&lt;li&gt;and more, for the policy, encryption, lifecycle rules and logging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Import the bucket alone and Terraform manages the bucket alone. The versioning setting stays unmanaged until you import &lt;code&gt;aws_s3_bucket_versioning&lt;/code&gt; too (its ID is also the bucket name, for a bucket in your own account).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fecev2pqmw0zs5z26spho.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fecev2pqmw0zs5z26spho.webp" alt="An aws_s3_bucket in the middle with six separate settings around it: versioning, ACL, CORS rules, policy, encryption, lifecycle rules"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;One bucket in the console, several resources in Terraform.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Unmanaged settings are where &lt;a href="https://meteorops.com/glossary/configuration-drift" rel="noopener noreferrer"&gt;configuration drift&lt;/a&gt; hides.&lt;/p&gt;

&lt;p&gt;Security groups have the same trap. Rules can live inline in &lt;code&gt;aws_security_group&lt;/code&gt; or as separate rule resources, and the AWS docs warn against mixing the 2: "Doing so may cause rule conflicts, perpetual differences, and result in rules being overwritten."&lt;/p&gt;

&lt;p&gt;Pick 1 style before you import. The AWS provider's docs call the separate &lt;code&gt;aws_vpc_security_group_ingress_rule&lt;/code&gt; and &lt;code&gt;aws_vpc_security_group_egress_rule&lt;/code&gt; resources the current best practice.&lt;/p&gt;
&lt;h3&gt;
  
  
  Values the API does not return
&lt;/h3&gt;

&lt;p&gt;Some arguments cannot be read back, so import cannot fill them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google disk encryption keys:&lt;/strong&gt; the provider docs say they "cannot be imported automatically. The API doesn't return this information"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google bucket &lt;code&gt;force_destroy&lt;/code&gt;:&lt;/strong&gt; always imported as &lt;code&gt;false&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Helm release &lt;code&gt;repository&lt;/code&gt;:&lt;/strong&gt; not stored by Helm, so it comes back empty&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat passwords the same way. Check every password and key argument after an import, and keep in mind that what you put in &lt;code&gt;password&lt;/code&gt; on &lt;code&gt;aws_db_instance&lt;/code&gt; is stored in the state as plain text. (The provider offers a write-only &lt;code&gt;password_wo&lt;/code&gt;, which needs Terraform 1.11 or later.)&lt;/p&gt;
&lt;h2&gt;
  
  
  4 things Terraform will not stop you from doing
&lt;/h2&gt;

&lt;p&gt;You would expect Terraform to catch these. It does not. All 4 were reproduced on Terraform 1.17.2 or the version named.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Importing the same object twice.&lt;/strong&gt; The same ID imports into 2 different addresses with no error, by command or by block. Now 2 resource blocks fight over 1 object&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pointing a new ID at a managed address.&lt;/strong&gt; An import block with a different ID for an address already in state is ignored. The plan says "No changes" and you think it worked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leaving an import block behind.&lt;/strong&gt; Remove the resource from state later with &lt;code&gt;terraform state rm&lt;/code&gt;, and the forgotten block imports it again on the next plan&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A module import block on an old version.&lt;/strong&gt; Terraform 1.15.8 ignores an import block inside a child module with no warning, and plans to create a new object in its place&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The 2 it does catch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The command, on an address already in state: "Error: Resource already managed by Terraform"&lt;/li&gt;
&lt;li&gt;2 import blocks with the same &lt;code&gt;to&lt;/code&gt;: "Error: Duplicate import configuration"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Items 3 and 4 show up in the plan if someone reads it. Items 1 and 2 do not, so run &lt;code&gt;terraform state list&lt;/code&gt; before you import and check that the object and the address are both new.&lt;/p&gt;
&lt;h2&gt;
  
  
  A safe import workflow for a team
&lt;/h2&gt;

&lt;p&gt;An import edits the state, and the state is shared. Here is the order I would run it in.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Check the backend first.&lt;/strong&gt; Locking on, and versioning on the state bucket. On the S3 backend locking is opt-in (&lt;code&gt;use_lockfile&lt;/code&gt; defaults to &lt;code&gt;false&lt;/code&gt;), and HashiCorp's docs say it is "highly recommended that you enable Bucket Versioning" for state recovery&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Take a copy of the state:&lt;/strong&gt; &lt;code&gt;terraform state pull &amp;gt; backup.tfstate&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Write the import blocks and resource blocks on a branch&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plan in CI and post the plan on the pull request&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review 1 line:&lt;/strong&gt; N to import, 0 to add, 0 to change, 0 to destroy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge and apply&lt;/strong&gt; through the same pipeline as every other change&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan again.&lt;/strong&gt; "No changes", or the import is not finished&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delete the import blocks&lt;/strong&gt; in a follow-up pull request&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3nwylj17ohx15lm6oo1l.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3nwylj17ohx15lm6oo1l.webp" alt="Two plan summary lines: 3 to import, 0 to add, 0 to change, 0 to destroy means apply. 1 to import, 1 to add, 0 to change, 1 to destroy means fix the configuration first"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The 1 line to review on an import pull request.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;2 rules that keep it boring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;An import pull request changes nothing.&lt;/strong&gt; Tags, renames and cleanups go in the next one. If the plan mixes imports with changes, nobody can tell which is which&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Import in small batches.&lt;/strong&gt; 5 to 20 resources that belong together (a VPC and its subnets) are reviewable. 400 are not&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deciding where the imported resources should live matters as much as the import. That is covered in &lt;a href="https://meteorops.com/blog/how-to-structure-terraform-for-startup-scale" rel="noopener noreferrer"&gt;how to structure Terraform for startup scale&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Undo an import without destroying anything
&lt;/h2&gt;

&lt;p&gt;You imported the wrong object, or into the wrong address. Deleting the resource block alone is the wrong move: Terraform would plan to destroy the real object.&lt;/p&gt;

&lt;p&gt;With an import block that has not been applied yet, there is nothing to undo. Delete the block.&lt;/p&gt;

&lt;p&gt;After the apply (or after a &lt;code&gt;terraform import&lt;/code&gt; command, which writes to the state at once), use a &lt;code&gt;removed&lt;/code&gt; block (Terraform 1.7 and later). Delete the import block, and replace the resource block with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="n"&gt;removed&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;random_string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;

  &lt;span class="n"&gt;lifecycle&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;destroy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The plan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; # random_string.token will no longer be managed by Terraform, but will not be destroyed
 # (destroy = false is set in the configuration)
 ...

Plan: 0 to add, 0 to change, 0 to destroy.

Warning: Some objects will no longer be managed by Terraform
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command line version is &lt;code&gt;terraform state rm&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ terraform state rm -dry-run random_string.forget
Would remove random_string.forget
$ terraform state rm random_string.forget
Removed random_string.forget
Successfully removed 1 resource instance(s).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Delete the resource block and the import block in the same change. Leave the resource block and the next plan creates a second object. Leave the import block and the next plan imports the old one again.&lt;/p&gt;

&lt;p&gt;HashiCorp recommends the &lt;code&gt;removed&lt;/code&gt; block, for the same reason as with import: you get a preview. One exception: a &lt;code&gt;removed&lt;/code&gt; block applies in every workspace that uses the configuration. If you imported into the wrong workspace, run &lt;code&gt;terraform state rm&lt;/code&gt; in that workspace.&lt;/p&gt;

&lt;p&gt;For a resource that is right but sits at the wrong address, use a &lt;code&gt;moved&lt;/code&gt; block. It renames the address and touches nothing else.&lt;/p&gt;

&lt;h3&gt;
  
  
  Never write a removed block without lifecycle
&lt;/h3&gt;

&lt;p&gt;The same file does opposite things on the 2 tools:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;
&lt;code&gt;removed&lt;/code&gt; block with no &lt;code&gt;lifecycle&lt;/code&gt;
&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Terraform 1.17.2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Plan: 0 to add, 0 to change, 1 to destroy.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenTofu 1.13.9&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Plan: 0 to add, 0 to change, 0 to destroy, 1 to forget.&lt;/code&gt; (with a warning)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Terraform destroys the object. OpenTofu forgets it.&lt;/p&gt;

&lt;p&gt;Always write &lt;code&gt;destroy = false&lt;/code&gt; or &lt;code&gt;destroy = true&lt;/code&gt; yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  OpenTofu imports the same way, with 4 differences
&lt;/h2&gt;

&lt;p&gt;Import blocks, &lt;code&gt;for_each&lt;/code&gt;, &lt;code&gt;identity&lt;/code&gt; and &lt;code&gt;tofu plan -generate-config-out&lt;/code&gt; all work on OpenTofu, and &lt;code&gt;tofu import&lt;/code&gt; takes the same arguments as the Terraform command.&lt;/p&gt;

&lt;p&gt;The differences on OpenTofu 1.13.9:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Terraform 1.17.2&lt;/th&gt;
&lt;th&gt;OpenTofu 1.13.9&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Import block in a child module&lt;/td&gt;
&lt;td&gt;Works (since 1.16)&lt;/td&gt;
&lt;td&gt;Error: "Invalid import configuration"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;query&lt;/code&gt; command and &lt;code&gt;list&lt;/code&gt; blocks&lt;/td&gt;
&lt;td&gt;Yes (since 1.14)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;removed&lt;/code&gt; with no &lt;code&gt;lifecycle&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Destroys&lt;/td&gt;
&lt;td&gt;Forgets, with a warning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plan summary&lt;/td&gt;
&lt;td&gt;to import, add, change, destroy&lt;/td&gt;
&lt;td&gt;Adds "to forget" when a resource is forgotten&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A module that ships its own import blocks runs on Terraform 1.16 and later and fails on OpenTofu. Keep import blocks in the root module if you support both.&lt;/p&gt;

&lt;p&gt;Moving between the 2 tools is its own project. Our &lt;a href="https://meteorops.com/migrations/terraform-to-opentofu-migration-guide" rel="noopener noreferrer"&gt;Terraform to OpenTofu migration guide&lt;/a&gt; covers it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools that generate Terraform from a live account
&lt;/h2&gt;

&lt;p&gt;Before &lt;code&gt;terraform query&lt;/code&gt;, third-party tools filled the gap. Their state in November 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Covers&lt;/th&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Terraformer&lt;/td&gt;
&lt;td&gt;Many providers&lt;/td&gt;
&lt;td&gt;Deprecated. The repository was archived on March 16, 2026. Last release: March 2025&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;aws2tf&lt;/td&gt;
&lt;td&gt;AWS&lt;/td&gt;
&lt;td&gt;Active. Latest release in July 2026. An &lt;code&gt;aws-samples&lt;/code&gt; project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Former2&lt;/td&gt;
&lt;td&gt;AWS&lt;/td&gt;
&lt;td&gt;Not archived, last commit in July 2026, no releases. Its own badge puts Terraform coverage at 49%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Azure Export for Terraform (&lt;code&gt;aztfexport&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Azure&lt;/td&gt;
&lt;td&gt;Active, from Microsoft. Latest release in November 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gcloud beta resource-config bulk-export&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Google Cloud&lt;/td&gt;
&lt;td&gt;Preview. No Windows support&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;My order: native import blocks first, &lt;code&gt;terraform query&lt;/code&gt; where the provider supports the resource type, and a generator only for a 1-time bulk export that you then review line by line.&lt;/p&gt;

&lt;p&gt;Old tutorials still send people to Terraformer. Skip it. Nobody patches it anymore.&lt;/p&gt;

&lt;p&gt;Whatever the tool, the test is the same: the generated configuration is done when &lt;code&gt;terraform plan&lt;/code&gt; shows no changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Import checklist
&lt;/h2&gt;

&lt;p&gt;Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use an import block, in a pull request&lt;/li&gt;
&lt;li&gt;Back up the state before the apply&lt;/li&gt;
&lt;li&gt;Look up the ID format on the resource's Registry page&lt;/li&gt;
&lt;li&gt;Write every non-default argument in the resource block&lt;/li&gt;
&lt;li&gt;Import the companion resources (bucket settings, security group rules)&lt;/li&gt;
&lt;li&gt;Apply only when the plan says 0 to add, 0 to change, 0 to destroy&lt;/li&gt;
&lt;li&gt;Plan again after the apply and expect "No changes"&lt;/li&gt;
&lt;li&gt;Delete the import blocks once they are applied&lt;/li&gt;
&lt;li&gt;Write &lt;code&gt;lifecycle { destroy = false }&lt;/code&gt; in every &lt;code&gt;removed&lt;/code&gt; block&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does terraform import change my infrastructure?
&lt;/h3&gt;

&lt;p&gt;No. Import only writes to the Terraform state. The apply that follows can change the resource if your configuration differs from the real object, which is why the plan has to show 0 to change and 0 to destroy first.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does terraform import generate code?
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;terraform import&lt;/code&gt; command does not. An import block with &lt;code&gt;terraform plan -generate-config-out=generated.tf&lt;/code&gt; writes a draft resource block for you. The feature is still labeled experimental in Terraform 1.17.2, so review the draft.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I import multiple resources at once?
&lt;/h3&gt;

&lt;p&gt;Yes, with several import blocks or with 1 import block that uses &lt;code&gt;for_each&lt;/code&gt; (Terraform 1.7 and later). The &lt;code&gt;terraform import&lt;/code&gt; command handles 1 resource per run.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between terraform import and an import block?
&lt;/h3&gt;

&lt;p&gt;The command writes to the state immediately, with no plan. The block is configuration: it shows up in &lt;code&gt;terraform plan&lt;/code&gt;, runs in CI and can be reviewed. Use the block on Terraform 1.5 and later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I delete import blocks after applying?
&lt;/h3&gt;

&lt;p&gt;You can do either. HashiCorp recommends keeping them as a record. I delete them, because a leftover block imports the object again if the address ever leaves the state.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I undo a terraform import?
&lt;/h3&gt;

&lt;p&gt;Replace the resource block with a &lt;code&gt;removed&lt;/code&gt; block that has &lt;code&gt;lifecycle { destroy = false }&lt;/code&gt;, or run &lt;code&gt;terraform state rm&lt;/code&gt; on the address. Both remove the resource from the state and leave the real object running. Delete the import block and the resource block in the same change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does import work the same in OpenTofu?
&lt;/h3&gt;

&lt;p&gt;Mostly. Import blocks, &lt;code&gt;for_each&lt;/code&gt;, &lt;code&gt;identity&lt;/code&gt; and config generation work on OpenTofu 1.13.9. It has no &lt;code&gt;query&lt;/code&gt; command and it rejects import blocks inside child modules.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Recap!
&lt;/h2&gt;

&lt;p&gt;If you take away 1 thing from this page, let it be this:&lt;/p&gt;

&lt;p&gt;An import is done when the plan shows only imports, and done properly when the next plan shows nothing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import block for everything on Terraform 1.5 and later&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-generate-config-out&lt;/code&gt; for a first draft, cleaned by hand&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;for_each&lt;/code&gt; for sets, &lt;code&gt;terraform query&lt;/code&gt; to find what exists&lt;/li&gt;
&lt;li&gt;The ID format from the Registry, or &lt;code&gt;identity&lt;/code&gt; when the ID is a glued string&lt;/li&gt;
&lt;li&gt;Companion resources imported with the main one&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;removed&lt;/code&gt; block with &lt;code&gt;destroy = false&lt;/code&gt; to undo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You don't NEED a consultant to import an AWS account into Terraform. The steps above and a patient week will do it.&lt;/p&gt;

&lt;p&gt;If you would like a second pair of eyes on the result (yes, I sell those), &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;claim a free assessment&lt;/a&gt; and a senior engineer will review your setup with you.&lt;/p&gt;

&lt;p&gt;Related guides: &lt;a href="https://meteorops.com/blog/how-to-structure-terraform-for-startup-scale" rel="noopener noreferrer"&gt;how to structure Terraform for startup scale&lt;/a&gt;, the &lt;a href="https://meteorops.com/migrations/terraform-to-opentofu-migration-guide" rel="noopener noreferrer"&gt;Terraform to OpenTofu migration guide&lt;/a&gt; and the glossary entry on &lt;a href="https://meteorops.com/glossary/terraform-state" rel="noopener noreferrer"&gt;Terraform state&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>devops</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Deployment Strategies: 6 Types and How to Pick One</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Mon, 16 Nov 2026 15:30:07 +0000</pubDate>
      <link>https://dev.to/meteorops/deployment-strategies-6-types-and-how-to-pick-one-18l6</link>
      <guid>https://dev.to/meteorops/deployment-strategies-6-types-and-how-to-pick-one-18l6</guid>
      <description>&lt;p&gt;A deployment strategy decides 1 thing: how many users get a new version before you know it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;There are 6 deployment strategies worth knowing, and most teams need 2 of them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Recreate:&lt;/strong&gt; stop the old version, start the new one, accept the downtime&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rolling update:&lt;/strong&gt; replace a few instances at a time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blue/green:&lt;/strong&gt; run 2 full copies, switch all traffic at once&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canary:&lt;/strong&gt; send a small share of users to the new version first&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadow:&lt;/strong&gt; copy real traffic to the new version and throw away its answers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature flags:&lt;/strong&gt; deploy the code switched off, release it later&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faf4sy6e4dz6fbmv2cnyg.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faf4sy6e4dz6fbmv2cnyg.webp" alt="Six cards, one per deployment strategy: recreate, rolling update, blue/green, canary, shadow, feature flags" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The 6 deployment strategies. Most teams need 2 of them.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here is where I would start, by situation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your situation&lt;/th&gt;
&lt;th&gt;Start with&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A small team with HTTP services on Kubernetes or Amazon ECS&lt;/td&gt;
&lt;td&gt;Rolling update, tuned&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A bad release costs you money within minutes&lt;/td&gt;
&lt;td&gt;Blue/green&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;High traffic and metrics you trust&lt;/td&gt;
&lt;td&gt;Canary with automated checks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A risky feature inside a normal release&lt;/td&gt;
&lt;td&gt;A feature flag&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A rewrite you want to test under real load&lt;/td&gt;
&lt;td&gt;Shadow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;An internal tool, or an app that cannot run 2 versions at once&lt;/td&gt;
&lt;td&gt;Recreate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;My default for a startup: a rolling update with a readiness probe, plus a feature flag on anything risky.&lt;/p&gt;

&lt;p&gt;That covers most releases with no new tooling and 25% of extra capacity.&lt;/p&gt;

&lt;p&gt;Versions and defaults here were checked on November 16, 2026 against the official docs: Kubernetes 1.37, Argo Rollouts v1.10.2, Flagger v1.45.0, Gateway API v1.7.0 and the Amazon ECS documentation.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Do releases still make your team nervous?&lt;/strong&gt; A senior engineer spends an hour on your CI/CD, infra, Kubernetes, cloud cost and on-call setup. You leave with your top 3 risks, quick wins and a rough roadmap. &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;Claim your free assessment&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Find your situation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You run plain Kubernetes Deployments and want them safer: &lt;a href="https://meteorops.com/blog/deployment-strategies#rolling-update-replace-a-few-instances-at-a-time" rel="noopener noreferrer"&gt;tune the rolling update&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You are choosing between blue/green and canary: &lt;a href="https://meteorops.com/blog/deployment-strategies#compare-the-6-strategies-on-3-numbers" rel="noopener noreferrer"&gt;compare them on 3 numbers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Your last rollback failed because of a migration: &lt;a href="https://meteorops.com/blog/deployment-strategies#the-database-decides-if-you-can-roll-back" rel="noopener noreferrer"&gt;the database decides if you can roll back&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You are on ECS or Lambda: &lt;a href="https://meteorops.com/blog/deployment-strategies#know-what-your-platform-gives-you-built-in" rel="noopener noreferrer"&gt;what your platform gives you built in&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You want the short answer for your stage: &lt;a href="https://meteorops.com/blog/deployment-strategies#pick-by-what-a-bad-release-costs-you" rel="noopener noreferrer"&gt;pick by what a bad release costs you&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Deploy and release are 2 separate steps
&lt;/h2&gt;

&lt;p&gt;Most confusion about deployment strategies comes from treating these 2 words as 1.&lt;/p&gt;

&lt;p&gt;Deploy = the new code runs in production.&lt;/p&gt;

&lt;p&gt;Release = users get the new behavior.&lt;/p&gt;

&lt;p&gt;The first 5 strategies change how you deploy. Feature flags change how you release.&lt;/p&gt;

&lt;p&gt;That is why they combine. You can roll out a pod at a time and still keep the new checkout flow switched off until Tuesday.&lt;/p&gt;

&lt;p&gt;Keep the 2 words apart and the rest of this page gets simple.&lt;/p&gt;
&lt;h2&gt;
  
  
  Compare the 6 strategies on 3 numbers
&lt;/h2&gt;

&lt;p&gt;Every comparison table you have seen says "low risk" and "high cost". I prefer 3 things you can count:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Who gets the new version first:&lt;/strong&gt; everyone, a share, or nobody&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extra capacity:&lt;/strong&gt; what you pay for while the rollout runs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What a rollback is:&lt;/strong&gt; a switch, or another deploy&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;Who gets it first&lt;/th&gt;
&lt;th&gt;Extra capacity&lt;/th&gt;
&lt;th&gt;A rollback is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recreate&lt;/td&gt;
&lt;td&gt;Everyone, after downtime&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;A second deploy, with a second downtime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rolling update&lt;/td&gt;
&lt;td&gt;A growing share, instance by instance&lt;/td&gt;
&lt;td&gt;25% by default on Kubernetes&lt;/td&gt;
&lt;td&gt;Another rolling update, backwards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blue/green&lt;/td&gt;
&lt;td&gt;Nobody, then everyone&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;A switch back, while the old copy still runs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Canary&lt;/td&gt;
&lt;td&gt;A share you choose&lt;/td&gt;
&lt;td&gt;Close to 0 by replica count, up to 100% with a traffic router&lt;/td&gt;
&lt;td&gt;The canary weight back to 0 (instant only with a traffic router)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shadow&lt;/td&gt;
&lt;td&gt;Nobody (copies of requests)&lt;/td&gt;
&lt;td&gt;A copy sized for the traffic you mirror&lt;/td&gt;
&lt;td&gt;Stop mirroring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Feature flag&lt;/td&gt;
&lt;td&gt;The cohort you choose&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;A flag flip&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Read the last column twice.&lt;/p&gt;

&lt;p&gt;A rollback that is a switch takes seconds. A rollback that is another deploy takes as long as the deploy did, and it runs while users are hurting.&lt;/p&gt;
&lt;h2&gt;
  
  
  Recreate: stop the old version, start the new one
&lt;/h2&gt;

&lt;p&gt;Recreate is the oldest strategy and the only one with planned downtime.&lt;/p&gt;

&lt;p&gt;On Kubernetes it is 1 of the 2 strategy types of a Deployment. All old pods are terminated, and only after they are gone are the new ones created.&lt;/p&gt;

&lt;p&gt;What you get in return: 2 versions never run at the same time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The app holds a lock, a volume or a license that only 1 version can own&lt;/li&gt;
&lt;li&gt;The old and the new version cannot share the database for even a minute&lt;/li&gt;
&lt;li&gt;It is an internal tool and nobody is using it at 7 PM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Skip it when:&lt;/strong&gt; a customer can notice. (Recreate is what "we deploy on Sunday at 2 AM" means.)&lt;/p&gt;

&lt;p&gt;AWS calls the same idea an in-place deployment done all at once.&lt;/p&gt;
&lt;h2&gt;
  
  
  Rolling update: replace a few instances at a time
&lt;/h2&gt;

&lt;p&gt;A rolling update is the default on Kubernetes and on Amazon ECS, so you are probably using it already.&lt;/p&gt;

&lt;p&gt;New instances start, old ones stop, a few at a time, until only the new version is left.&lt;/p&gt;

&lt;p&gt;On Kubernetes, 2 fields control the pace, and both default to 25%:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;maxSurge:&lt;/strong&gt; how many pods can exist above the desired count. The percentage rounds up&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;maxUnavailable:&lt;/strong&gt; how many pods can be missing. The percentage rounds down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With 10 replicas and the defaults, that means up to 13 pods running and at least 8 available at any moment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0tbup23smp34wury18ps.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0tbup23smp34wury18ps.webp" alt="A row of 13 pod squares for a rolling update with 10 replicas: at least 8 available, up to 13 pods, maxUnavailable 25% rounds down, maxSurge 25% rounds up" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The Kubernetes defaults on 10 replicas: up to 13 pods, at least 8 available.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So with 10 replicas, the default rolling update can run your service at 80% of its capacity in the middle of a deploy. If you size replicas tightly, that is your real risk.&lt;/p&gt;

&lt;p&gt;Here is the version I would run for a service that takes user traffic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  replicas: 10
  minReadySeconds: 10
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: registry.example.com/api:1.4.2
          ports:
            - containerPort: 8080
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
            periodSeconds: 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3 lines do the work:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;maxUnavailable: 0&lt;/strong&gt; keeps all 10 pods serving for the whole rollout&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;readinessProbe&lt;/strong&gt; keeps traffic away from a new pod until it answers. If new pods never turn ready, the rollout stops by itself&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;minReadySeconds: 10&lt;/strong&gt; makes a new pod stay ready for 10 seconds before it counts. The default is 0&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The readiness probe is the part people skip. A pod with no readiness probe counts as ready the moment its containers start, so Kubernetes will happily replace all 10 pods with 10 broken ones.&lt;/p&gt;

&lt;p&gt;(If probes are new to you, start with the &lt;a href="https://meteorops.com/glossary/kubernetes-readiness-probe" rel="noopener noreferrer"&gt;readiness probe&lt;/a&gt; definition, then read how to &lt;a href="https://meteorops.com/blog/how-to-configure-kubernetes-liveness-probes-without-causing-restart-loops" rel="noopener noreferrer"&gt;configure liveness probes without restart loops&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Use these 2 commands in your pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Fails the pipeline if the rollout does not finish
kubectl rollout status deployment/api

# Goes back to the previous revision
kubectl rollout undo deployment/api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2 facts about rollbacks that surprise people:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes never rolls back for you. After 600 seconds without progress (progressDeadlineSeconds) it marks the rollout as failed and keeps retrying&lt;/li&gt;
&lt;li&gt;A rollback is a rolling update in the other direction. It takes about as long as the rollout did&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rolling update = cheap, built in, slow to undo.&lt;/p&gt;

&lt;p&gt;It also means 2 versions serve users at the same time during every deploy. Your API and your database must accept that. More on this in the database section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blue/green: run 2 full copies and switch
&lt;/h2&gt;

&lt;p&gt;Blue/green keeps the old version (blue) serving while a full copy of the new version (green) starts next to it.&lt;/p&gt;

&lt;p&gt;You test green with no user traffic. Then you switch all traffic at once.&lt;/p&gt;

&lt;p&gt;What happens:&lt;/p&gt;

&lt;p&gt;Green starts&lt;br&gt;&lt;br&gt;
→ green passes its checks on a preview address&lt;br&gt;&lt;br&gt;
→ the router points to green&lt;br&gt;&lt;br&gt;
→ blue stays up for a while&lt;br&gt;&lt;br&gt;
→ blue is removed&lt;/p&gt;

&lt;p&gt;The rollback is the fastest of the 5 ways to deploy: point the router back to blue. No pods to start, no images to pull.&lt;/p&gt;

&lt;p&gt;The price is capacity. For the length of the switch you pay for 2 production copies.&lt;/p&gt;

&lt;p&gt;Kubernetes has no blue/green type built in. &lt;a href="https://meteorops.com/blog/how-to-deploy-zero-downtime-kubernetes-releases-with-helm-and-argo-rollouts" rel="noopener noreferrer"&gt;Argo Rollouts&lt;/a&gt; adds it with a Rollout object, which replaces your Deployment (or wraps it with workloadRef). The strategy block looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;strategy:
  blueGreen:
    activeService: api-active
    previewService: api-preview
    autoPromotionEnabled: false
    scaleDownDelaySeconds: 600
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change 2 defaults, as I did above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;autoPromotionEnabled&lt;/strong&gt; defaults to true. Green takes all traffic as soon as its pods are ready, with nobody looking. Set it to false, or add an analysis step&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;scaleDownDelaySeconds&lt;/strong&gt; defaults to 30. So 30 seconds after the switch, blue is gone and your instant rollback with it. Give yourself 10 minutes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You promote with 1 command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl argo rollouts promote api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Argo's own docs recommend starting with blue/green before canary, because only 1 version is active at a time. They also list it as the option that works for queue workers, where no router can split the traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when:&lt;/strong&gt; a bad release is expensive within minutes and you can afford double capacity for 10 of them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skip it when:&lt;/strong&gt; the service is so large that a second copy does not fit in your cluster or your budget.&lt;/p&gt;

&lt;h2&gt;
  
  
  Canary: send a small share of users first
&lt;/h2&gt;

&lt;p&gt;A canary release gives the new version to a small share of users, watches it, and grows the share step by step.&lt;/p&gt;

&lt;p&gt;(The name comes from the canaries that miners carried into coal mines. The bird reacted to gas before the miners did.)&lt;/p&gt;

&lt;p&gt;The math is the reason to do it. In Google's SRE workbook example, a version that fails 20% of requests, given to 5% of traffic, produces a 1% error rate overall.&lt;/p&gt;

&lt;p&gt;Same bug, 1/20 of the damage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8jd2zayl1ewuxz92haa0.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8jd2zayl1ewuxz92haa0.webp" alt="Blue/green sends 100% of users to the new copy at once, canary sends 90% to the old version and 10% to the new one" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Blue/green switches everyone at once. A canary moves a share you choose.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;With Argo Rollouts the steps are a list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;strategy:
  canary:
    steps:
      - setWeight: 10
      - pause: {duration: 10m}
      - setWeight: 50
      - pause: {duration: 10m}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the last step the rollout goes to 100%.&lt;/p&gt;

&lt;p&gt;3 things about canaries that the comparison pages leave out:&lt;/p&gt;

&lt;h3&gt;
  
  
  Without a traffic router, 10% means 1 pod in 10
&lt;/h3&gt;

&lt;p&gt;Plain Kubernetes splits traffic by pod count. With 10 replicas and a weight of 10, Argo runs 1 new pod and 9 old ones.&lt;/p&gt;

&lt;p&gt;With 3 replicas, your smallest possible canary is a quarter to a third of traffic.&lt;/p&gt;

&lt;p&gt;For a real percentage you need something that routes: an ingress controller, a service mesh, or the Gateway API. An HTTPRoute splits traffic by weight in a few lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: simple-split
spec:
  rules:
  - backendRefs:
    - name: foo-v1
      port: 8080
      weight: 90
    - name: foo-v2
      port: 8080
      weight: 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(The example comes from the Gateway API repository. Add parentRefs to attach it to your Gateway.)&lt;/p&gt;

&lt;h3&gt;
  
  
  A canary with a traffic router can cost as much as blue/green
&lt;/h3&gt;

&lt;p&gt;When Argo Rollouts uses a traffic router, the old version stays scaled to 100% during the rollout, so an abort is instant.&lt;/p&gt;

&lt;p&gt;Late in the rollout you run close to double the pods. The dynamicStableScale option trades that cost for a slower abort.&lt;/p&gt;

&lt;h3&gt;
  
  
  A canary is only as good as the check that stops it
&lt;/h3&gt;

&lt;p&gt;A canary that a human watches on a dashboard is a slow rolling update.&lt;/p&gt;

&lt;p&gt;The value comes from an automated check that aborts the rollout. In Argo Rollouts that is an AnalysisTemplate: a Prometheus query, a success condition, and a limit of failed measurements.&lt;/p&gt;

&lt;p&gt;Which metrics? Google's advice is to start from your service level indicators (SLIs): HTTP error codes and response latency. CPU usage makes a noisy canary.&lt;/p&gt;

&lt;p&gt;(If you have no SLIs yet, my guide on &lt;a href="https://meteorops.com/blog/slo-vs-sla" rel="noopener noreferrer"&gt;SLO vs SLA vs SLI&lt;/a&gt; starts there.)&lt;/p&gt;

&lt;p&gt;How big and how long? AWS suggests 5% to 10% of traffic for 10 to 30 minutes in its ECS guidance. Google adds one rule I like: the more often you deploy, the shorter the canary. At 20 deploys a day it has to be far shorter than at 1 a week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when:&lt;/strong&gt; you have enough traffic for 5% to mean something, and 2 metrics you would bet a release on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skip it when:&lt;/strong&gt; the service gets 3 requests a minute, or it is a queue worker. Argo's docs say plainly that canary does not work for queue workers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Shadow: copy real traffic to the new version
&lt;/h2&gt;

&lt;p&gt;A shadow deployment (also called traffic mirroring) sends a copy of each live request to the new version.&lt;/p&gt;

&lt;p&gt;The user gets the answer from the old version. The answer from the new one is thrown away.&lt;/p&gt;

&lt;p&gt;So you learn how the new version behaves under real load, and no user can see a bug in it.&lt;/p&gt;

&lt;p&gt;In Istio it is 2 fields on a VirtualService: mirror and mirrorPercentage. The Gateway API has a RequestMirror filter, with Extended support, so check that your gateway supports it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You rewrote a service and want to compare latency and errors before anyone depends on it&lt;/li&gt;
&lt;li&gt;You are changing a database, a runtime or a major dependency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rule: mirror reads freely, and think hard before you mirror writes.&lt;/p&gt;

&lt;p&gt;A mirrored "create order" request creates a second order unless the shadow copy writes to its own database and sends no emails. Flagger's docs give the same warning: mirror only requests that can be processed twice.&lt;/p&gt;

&lt;p&gt;Shadow is a test under production load. You still need 1 of the other strategies to release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature flags: deploy the code, release it later
&lt;/h2&gt;

&lt;p&gt;A &lt;a href="https://meteorops.com/glossary/feature-flag" rel="noopener noreferrer"&gt;feature flag&lt;/a&gt; is an if statement around new behavior, with a switch you can change without a deploy.&lt;/p&gt;

&lt;p&gt;You deploy the code switched off, with any strategy above. You release by turning the flag on for 1% of users, then 10%, then everyone.&lt;/p&gt;

&lt;p&gt;What a flag gives you that no deployment strategy does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A rollback in seconds:&lt;/strong&gt; no pods, no pipeline, no router&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A cohort you choose:&lt;/strong&gt; your own team, 1 customer, 1 country&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A release on the product team's schedule:&lt;/strong&gt; the code shipped last week&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What it costs: every flag is a second code path to test and a line to delete later.&lt;/p&gt;

&lt;p&gt;Pete Hodgson's rule on martinfowler.com is the one I use: a release flag should live a week or two. A flag that is 6 months old is a config option nobody decided to have.&lt;/p&gt;

&lt;p&gt;A flag cannot protect you from a bad migration, a bad base image or a memory leak in the new build. Those arrive with the deploy, flag on or off.&lt;/p&gt;

&lt;p&gt;So: flags for features, a deployment strategy for the build.&lt;/p&gt;

&lt;h2&gt;
  
  
  A/B testing is an experiment
&lt;/h2&gt;

&lt;p&gt;Many lists count A/B testing as the seventh deployment strategy. I leave it out.&lt;/p&gt;

&lt;p&gt;The plumbing is the same as a canary: 2 versions, a traffic split. The question is different.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canary:&lt;/strong&gt; "Is this version broken?" Answered in minutes or hours&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A/B test:&lt;/strong&gt; "Does this version sell more?" Answered in days, when the numbers are significant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run them as 1 rollout and each one ruins the other. The canary wants to finish fast, and the experiment wants a stable group of users for a week.&lt;/p&gt;

&lt;p&gt;Ship the build with a canary. Run the experiment with a flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  The database decides if you can roll back
&lt;/h2&gt;

&lt;p&gt;Every strategy above assumes the old version still works after the new one has run. The database is where that assumption breaks.&lt;/p&gt;

&lt;p&gt;The classic failure:&lt;/p&gt;

&lt;p&gt;The new version renames a column&lt;br&gt;&lt;br&gt;
→ the migration runs&lt;br&gt;&lt;br&gt;
→ the canary looks bad&lt;br&gt;&lt;br&gt;
→ you roll back&lt;br&gt;&lt;br&gt;
→ the old version asks for a column that no longer exists&lt;/p&gt;

&lt;p&gt;Your instant rollback now needs a second migration, written during an incident.&lt;/p&gt;

&lt;p&gt;The fix is a pattern called expand and contract (or parallel change). Every breaking schema change becomes 3 deploys:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Expand:&lt;/strong&gt; add the new column next to the old one. Write to both&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Migrate:&lt;/strong&gt; copy the old data over. Move every reader to the new column&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contract:&lt;/strong&gt; remove the old column, once nothing reads it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1kcebgctlpdqqnpiv8nx.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1kcebgctlpdqqnpiv8nx.webp" alt="Expand and contract in 3 steps: expand adds the new column, migrate copies the old data over, contract removes the old column" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Expand and contract: 3 deploys for 1 breaking schema change.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After step 1, old and new versions both work against the same schema. So a rolling update is safe, a canary is safe, and a rollback is safe.&lt;/p&gt;

&lt;p&gt;The rule: a migration ships in its own deploy, before the code that needs it, and never removes anything the running version uses.&lt;/p&gt;

&lt;p&gt;Do the contract step. A half-finished expand and contract leaves you with 2 columns and a team that is afraid of both.&lt;/p&gt;
&lt;h2&gt;
  
  
  Know what your platform gives you built in
&lt;/h2&gt;

&lt;p&gt;You may already own more of this than you think. Amazon ECS added blue/green in July 2025 and linear and canary in October 2025, so the ECS section of most guides is out of date.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Built in&lt;/th&gt;
&lt;th&gt;Worth knowing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kubernetes Deployment&lt;/td&gt;
&lt;td&gt;Rolling update, Recreate&lt;/td&gt;
&lt;td&gt;No automatic rollback. 10 old revisions kept by default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argo Rollouts&lt;/td&gt;
&lt;td&gt;Blue/green, canary&lt;/td&gt;
&lt;td&gt;Automated analysis and abort. Replaces or wraps the Deployment object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flagger&lt;/td&gt;
&lt;td&gt;Canary, A/B, blue/green, mirroring&lt;/td&gt;
&lt;td&gt;Keeps your Deployment and runs a primary copy of it. Part of the Flux family&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon ECS&lt;/td&gt;
&lt;td&gt;Rolling, blue/green, linear, canary&lt;/td&gt;
&lt;td&gt;All 4 are native now. AWS recommends the native blue/green over CodeDeploy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AWS Lambda&lt;/td&gt;
&lt;td&gt;Weighted aliases, CodeDeploy canary and linear&lt;/td&gt;
&lt;td&gt;An alias splits traffic between 2 versions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;3 details for AWS users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ECS rolling defaults are 100% and 200%:&lt;/strong&gt; minimumHealthyPercent 100, maximumPercent 200. With 4 tasks, ECS can start 4 new ones before it stops any old one&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turn on the circuit breaker with rollback:&lt;/strong&gt; it stops a rolling deployment whose tasks cannot start or fail their health checks, and returns to the last completed one&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ECS canary scales the new version to 100% first:&lt;/strong&gt; so it costs the same capacity as blue/green
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ecs update-service --cluster prod --service api \
  --deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;On Lambda, a weighted alias is a canary in 1 command. This one sends 3% of traffic to version 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws lambda create-alias \
  --name routing-alias \
  --function-name my-function \
  --function-version 1 \
  --routing-config AdditionalVersionWeights={"2"=0.03}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pick by what a bad release costs you
&lt;/h2&gt;

&lt;p&gt;Teams pick a strategy by what sounds advanced. Pick by 1 question instead: what does 10 minutes of a broken release cost?&lt;/p&gt;

&lt;p&gt;My rule, in 3 stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;It costs an apology:&lt;/strong&gt; rolling update with maxUnavailable 0, a readiness probe, and flags on risky features. This is where 9 out of 10 startups should be&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It costs money or a customer:&lt;/strong&gt; blue/green with manual promotion and a 10 minute window to switch back&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It costs money and you deploy many times a day:&lt;/strong&gt; canary with automated analysis, because nobody can babysit 20 switches a day&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each stage keeps what the one before it built. Probes, expand and contract, and flags are needed at all 3.&lt;/p&gt;

&lt;p&gt;How do you know you are ready for stage 3? You can name the 2 metrics that would abort a rollout, and you trust them enough to let them do it at 3 AM.&lt;/p&gt;

&lt;p&gt;If you cannot, a canary gives you more YAML and the same risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid the 6 mistakes I keep seeing
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;No readiness probe:&lt;/strong&gt; every strategy on Kubernetes trusts it. Without one, a rolling update replaces healthy pods with broken ones&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A rollback nobody has run:&lt;/strong&gt; if the first time is during an incident, it is a second incident. Run it once a quarter on purpose&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A migration inside the deploy:&lt;/strong&gt; the schema changes, the rollback breaks. Expand first&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blue/green with the defaults:&lt;/strong&gt; automatic promotion and a 30 second window is a rolling update that costs double&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A canary on 3 replicas:&lt;/strong&gt; the smallest step is a quarter of your users or more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flags that never die:&lt;/strong&gt; 40 old flags = 40 code paths nobody tests&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Check these before your next release
&lt;/h2&gt;

&lt;p&gt;Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every service has a readiness probe that checks something real&lt;/li&gt;
&lt;li&gt;maxUnavailable is 0 on anything users call&lt;/li&gt;
&lt;li&gt;The pipeline waits on the rollout status and fails when it fails&lt;/li&gt;
&lt;li&gt;The rollback command is written down, and someone ran it this quarter&lt;/li&gt;
&lt;li&gt;Schema changes ship before the code, and remove nothing in the same deploy&lt;/li&gt;
&lt;li&gt;Risky features sit behind a flag with an owner and a removal date&lt;/li&gt;
&lt;li&gt;You know your extra capacity during a deploy: 25%, or 100%&lt;/li&gt;
&lt;li&gt;If you run a canary: the abort is automatic and based on errors and latency&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deployment strategies FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is a deployment strategy?
&lt;/h3&gt;

&lt;p&gt;It is the way you replace a running version of your software with a new one. It decides who gets the new version first, how much extra capacity you pay for, and how you go back.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the main types of deployment strategies?
&lt;/h3&gt;

&lt;p&gt;6: recreate, rolling update, blue/green, canary, shadow and feature flags. The first 5 change how the code is deployed, and feature flags change when users see it.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between blue/green and canary?
&lt;/h3&gt;

&lt;p&gt;Blue/green switches all users at once to a version that was tested with no traffic. Canary moves a small share of real users first and grows it. Blue/green is simpler and costs double capacity. Canary limits the damage and needs metrics you trust.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the default deployment strategy in Kubernetes?
&lt;/h3&gt;

&lt;p&gt;RollingUpdate, with maxSurge and maxUnavailable both at 25%. The only other built-in type is Recreate. Blue/green and canary need a tool such as Argo Rollouts or Flagger.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which deployment strategy has zero downtime?
&lt;/h3&gt;

&lt;p&gt;All of them except recreate, if the app has a readiness probe, handles shutdown cleanly and works with both the old and the new schema. A rolling update with maxUnavailable 0 is the cheapest way to get there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which deployment strategy is the safest?
&lt;/h3&gt;

&lt;p&gt;A canary with automated analysis exposes the fewest users to a bad version. It is only safer than blue/green when the checks are automatic. A feature flag is the fastest to undo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is A/B testing a deployment strategy?
&lt;/h3&gt;

&lt;p&gt;I say no. It uses the same traffic split as a canary, to answer a product question over days. A deployment strategy answers "is it broken" in minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  A recap
&lt;/h2&gt;

&lt;p&gt;If you take away 1 thing, let it be this: choose the strategy by what a rollback is, and practice the rollback.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy and release are 2 steps. Flags separate them&lt;/li&gt;
&lt;li&gt;Rolling update first, with maxUnavailable 0 and a readiness probe&lt;/li&gt;
&lt;li&gt;Blue/green when a bad release is expensive, with manual promotion&lt;/li&gt;
&lt;li&gt;Canary when the abort is automatic&lt;/li&gt;
&lt;li&gt;Expand and contract on every breaking schema change&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You don't NEED a DevOps expert for this. The manifest and the checklist above cover the first stage, and the &lt;a href="https://meteorops.com/blog/how-to-deploy-zero-downtime-kubernetes-releases-with-helm-and-argo-rollouts" rel="noopener noreferrer"&gt;Argo Rollouts guide&lt;/a&gt; covers the next 2.&lt;/p&gt;

&lt;p&gt;If you would rather have a senior engineer look at your pipeline and tell you what to fix first, &lt;a href="https://meteorops.com/free-assessment" rel="noopener noreferrer"&gt;the free assessment&lt;/a&gt; is an hour of exactly that.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>cloud</category>
      <category>sre</category>
    </item>
    <item>
      <title>Datadog Alternatives: 10 Options and How to Pick One</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Sun, 15 Nov 2026 15:30:03 +0000</pubDate>
      <link>https://dev.to/meteorops/datadog-alternatives-10-options-and-how-to-pick-one-25a8</link>
      <guid>https://dev.to/meteorops/datadog-alternatives-10-options-and-how-to-pick-one-25a8</guid>
      <description>&lt;p&gt;If you are searching for a Datadog alternative, the problem is usually the bill, and a new tool is 1 of 5 ways to fix it:&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;There are 5 routes away from your current Datadog bill, and only 4 of them change the tool.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Stay and cut the bill:&lt;/strong&gt; fewer indexed logs, fewer tag combinations, a commitment that fits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Another commercial platform:&lt;/strong&gt; New Relic, Dynatrace, Honeycomb, Elastic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Managed open source:&lt;/strong&gt; Grafana Cloud, SigNoz Cloud&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-hosted open source:&lt;/strong&gt; Prometheus, Grafana, Loki and Tempo, or SigNoz, or VictoriaMetrics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your cloud's own monitoring:&lt;/strong&gt; Amazon CloudWatch, Google Cloud Observability&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzpdut156gz0vxf1fc3s5.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzpdut156gz0vxf1fc3s5.webp" alt="Diagram of 5 routes away from a Datadog bill: stay and cut the bill, another commercial platform, managed open source, self-hosted open source, your cloud's own monitoring" width="799" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The 5 routes away from your Datadog bill. Only 4 of them change the tool.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here is where I would start, by situation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your situation&lt;/th&gt;
&lt;th&gt;Start with&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The bill grew, the tool works&lt;/td&gt;
&lt;td&gt;Route 1, then compare&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You are leaving, with under 20 engineers and nobody to run a monitoring stack&lt;/td&gt;
&lt;td&gt;Grafana Cloud or SigNoz Cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data has to stay in your own cloud account&lt;/td&gt;
&lt;td&gt;Self-hosted Grafana stack or SigNoz&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You debug requests across many services all day&lt;/td&gt;
&lt;td&gt;Honeycomb&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A large company that wants one vendor and one contract&lt;/td&gt;
&lt;td&gt;Dynatrace or New Relic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One cloud, a few services, a small budget&lt;/td&gt;
&lt;td&gt;CloudWatch or Google Cloud Observability&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Whatever you pick, the price of the new tool is the smaller cost.&lt;/p&gt;

&lt;p&gt;The bigger one is moving your instrumentation, your dashboards and your monitors.&lt;/p&gt;

&lt;p&gt;So do one thing before you pick: send your telemetry through OpenTelemetry. After that, changing the tool is a change of address.&lt;/p&gt;

&lt;p&gt;All prices here are public list prices in USD, checked on November 15, 2026 against each vendor's pricing page. Your contract can differ.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Is the Datadog bill the reason you are reading this?&lt;/strong&gt; Our senior engineers assess your setup, plan the work and do it hands-on, paid by the hour with no lock-in. &lt;a href="https://meteorops.com/services/finops-consulting" rel="noopener noreferrer"&gt;Book a free 30-minute consultation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Find your situation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The renewal is close and you need a number: &lt;a href="https://meteorops.com/blog/datadog-alternatives#500-gb-of-logs-and-20-000-metrics-priced-on-each-tool" rel="noopener noreferrer"&gt;500 GB of logs and 20,000 metrics, priced on each tool&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You want to keep Datadog and pay less: &lt;a href="https://meteorops.com/blog/datadog-alternatives#route-1-cut-the-datadog-bill-and-stay" rel="noopener noreferrer"&gt;Route 1&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You want open source and no servers to run: &lt;a href="https://meteorops.com/blog/datadog-alternatives#route-3-managed-open-source" rel="noopener noreferrer"&gt;Route 3&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You already decided to leave: &lt;a href="https://meteorops.com/blog/datadog-alternatives#move-to-opentelemetry-before-you-pick" rel="noopener noreferrer"&gt;move to OpenTelemetry first&lt;/a&gt;, then &lt;a href="https://meteorops.com/blog/datadog-alternatives#run-both-tools-side-by-side-then-cut-over" rel="noopener noreferrer"&gt;run both side by side&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Know what you use before you compare tools
&lt;/h2&gt;

&lt;p&gt;Datadog is a price list of separate products. So is every alternative.&lt;/p&gt;

&lt;p&gt;Before you open a comparison page, write down which of these you use today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Infrastructure metrics and the integrations that feed them&lt;/li&gt;
&lt;li&gt;Application tracing (APM)&lt;/li&gt;
&lt;li&gt;Logs: search, pipelines, archives&lt;/li&gt;
&lt;li&gt;Dashboards and monitors&lt;/li&gt;
&lt;li&gt;Synthetic tests and real user monitoring (RUM)&lt;/li&gt;
&lt;li&gt;On-call and incident tooling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then write down why you want to leave. There are 4 honest reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The bill:&lt;/strong&gt; it grows faster than the system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lock-in:&lt;/strong&gt; your code and your agents speak one vendor's format&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data location:&lt;/strong&gt; telemetry must stay in your account or your region&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fit:&lt;/strong&gt; you use 2 products out of 20 and pay for a platform&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reason = route. A bill problem starts at Route 1. A data location problem starts at Route 4.&lt;/p&gt;

&lt;p&gt;(A fifth reason exists: someone saw a nicer dashboard at a conference. It is the most expensive one.)&lt;/p&gt;
&lt;h2&gt;
  
  
  Route 1: Cut the Datadog bill and stay
&lt;/h2&gt;

&lt;p&gt;This is the cheapest route, and the one that gets skipped.&lt;/p&gt;

&lt;p&gt;In my &lt;a href="https://meteorops.com/blog/datadog-pricing" rel="noopener noreferrer"&gt;Datadog pricing breakdown&lt;/a&gt;, a setup of 50 hosts costs $4,360 a month at list price. 3 changes bring it to $2,953:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Exclusion filters on the log indexes, so you ingest everything and index a part of it&lt;/li&gt;
&lt;li&gt;Fewer queryable tags on the custom metrics that multiply&lt;/li&gt;
&lt;li&gt;APM only on the hosts that send traces you read&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of them needs a new tool, a migration or a retrained team.&lt;/p&gt;

&lt;p&gt;Do this first even if you plan to leave. The filters and the tag cleanup carry over: every tool on this page bills you for volume in some unit.&lt;/p&gt;

&lt;p&gt;Stay when the bill after the cleanup is one you can defend. Leave when it is still too high, or when the reason was never the bill.&lt;/p&gt;
&lt;h2&gt;
  
  
  Route 2: Another commercial platform
&lt;/h2&gt;

&lt;p&gt;These are full platforms run by a vendor. You swap one bill for another, with a different unit.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What sets the bill&lt;/th&gt;
&lt;th&gt;List price&lt;/th&gt;
&lt;th&gt;Fits&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;New Relic&lt;/td&gt;
&lt;td&gt;GB ingested, plus full platform users&lt;/td&gt;
&lt;td&gt;100 GB a month free, then $0.40 per GB. Full platform users: $10 for the first and $99 for each of the next 4 on Standard (5 at most), $349 each on Pro with an annual commitment&lt;/td&gt;
&lt;td&gt;Teams that want one product for everything and have few people who need full access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dynatrace&lt;/td&gt;
&lt;td&gt;Memory of the monitored hosts, per hour, plus GiB ingested&lt;/td&gt;
&lt;td&gt;Full-Stack Monitoring: $0.01 per memory-GiB-hour ($58 a month for an 8 GiB host). Logs: $0.20 per GiB to ingest&lt;/td&gt;
&lt;td&gt;Large companies that want automatic instrumentation and an annual contract&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Honeycomb&lt;/td&gt;
&lt;td&gt;Events sent&lt;/td&gt;
&lt;td&gt;Free up to 20 million events a month. Pro starts at $150 a month for 50 million events&lt;/td&gt;
&lt;td&gt;Teams that debug with traces and wide events, with unlimited seats&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Elastic Observability&lt;/td&gt;
&lt;td&gt;GB ingested and GB retained&lt;/td&gt;
&lt;td&gt;Serverless, Complete tier: ingest "as low as" $0.09 per GB, retention $0.019 per GB a month&lt;/td&gt;
&lt;td&gt;Teams that already run Elasticsearch and are heavy on logs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;3 things to check before you sign:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;New Relic users:&lt;/strong&gt; Standard allows 5 full platform users, for $406 a month. From the 6th you are on Pro, where 5 users cost $1,745 a month before 1 GB of data. Basic users are free and can see dashboards. Count who needs more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynatrace commitment:&lt;/strong&gt; the pricing page describes a minimum annual spend commitment and prints no amount. Ask for it in the first call&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynatrace host size:&lt;/strong&gt; a 32 GiB node costs 4 times the 8 GiB price for Full-Stack Monitoring. Check the memory of your nodes before you read the $58&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Coralogix and Better Stack also show up on these shortlists. Both price per GB, and both prices depend on the pipeline or the region you choose, so read the full table before you compare.&lt;/p&gt;

&lt;p&gt;New Relic, Dynatrace, Honeycomb and Elastic all accept OpenTelemetry data over OTLP (the OpenTelemetry Protocol). That matters for the switch, below.&lt;/p&gt;
&lt;h2&gt;
  
  
  Route 3: Managed open source
&lt;/h2&gt;

&lt;p&gt;The software is open source. Someone else runs it. You pay for usage, and you can take the same software in-house later.&lt;/p&gt;

&lt;p&gt;For most startups leaving Datadog, this is the route I would take.&lt;/p&gt;
&lt;h3&gt;
  
  
  Grafana Cloud
&lt;/h3&gt;

&lt;p&gt;Grafana Cloud is the hosted version of the Grafana stack: Mimir for metrics, Loki for logs, Tempo for traces, Grafana for dashboards.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free plan:&lt;/strong&gt; 10,000 active metric series, 50 GB of logs, 50 GB of traces, 14 days of retention, 3 users&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pro plan:&lt;/strong&gt; $19 a month platform fee with the same amounts included, then pay as you go&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metrics:&lt;/strong&gt; from $6.50 per 1,000 active series, kept 13 months&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logs and traces:&lt;/strong&gt; $0.05 per GB to process, $0.40 to write and $0.10 to retain, so $0.55 per GB, kept 30 days&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Users:&lt;/strong&gt; from $8 per active Grafana user a month&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The unit to watch is the active series. Every label value you add creates new series, exactly like tags create custom metrics in Datadog.&lt;/p&gt;

&lt;p&gt;One more line to plan for: Grafana Cloud's Kubernetes Monitoring app is billed separately, by the host hour ($0.01, about $7.20 a node a month) and the container hour ($0.0007, about $0.50 a container a month), on top of the series and GB it produces.&lt;/p&gt;

&lt;p&gt;On 50 nodes and 1,000 containers that is about $815 a month.&lt;/p&gt;

&lt;p&gt;You can skip the app, build your own Kubernetes dashboards and pay for telemetry only. Decide which before you estimate.&lt;/p&gt;
&lt;h3&gt;
  
  
  SigNoz Cloud
&lt;/h3&gt;

&lt;p&gt;SigNoz is one application for metrics, traces and logs, built on OpenTelemetry and stored in ClickHouse.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Entry:&lt;/strong&gt; $49 a month, which includes $49 of usage (the pricing page shows $199 struck through next to it, so check it on the day you sign up)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logs and traces:&lt;/strong&gt; $0.30 per GB, kept 15 days&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metrics:&lt;/strong&gt; $0.10 per million samples, kept 1 month&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No fee&lt;/strong&gt; per user or per host&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SigNoz publishes a guide for migrating from Datadog, and a tool that translates Datadog dashboard JSON into SigNoz dashboards as a starting point.&lt;/p&gt;

&lt;p&gt;Grafana Cloud = more parts, more integrations, a bigger community. SigNoz = one product, one query screen, a simpler price list.&lt;/p&gt;
&lt;h2&gt;
  
  
  Route 4: Self-hosted open source
&lt;/h2&gt;

&lt;p&gt;You run the stack in your own cluster. The licence costs nothing. The work is yours.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stack&lt;/th&gt;
&lt;th&gt;Licence&lt;/th&gt;
&lt;th&gt;What you run&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Prometheus, Grafana, Loki, Tempo (Mimir when 1 Prometheus is too small)&lt;/td&gt;
&lt;td&gt;Prometheus: Apache 2.0. Grafana, Loki, Tempo and Mimir: AGPLv3&lt;/td&gt;
&lt;td&gt;4 or 5 systems, object storage, their upgrades&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SigNoz community edition&lt;/td&gt;
&lt;td&gt;MIT, outside its enterprise directories&lt;/td&gt;
&lt;td&gt;SigNoz and a ClickHouse cluster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VictoriaMetrics for metrics, with Grafana on top&lt;/td&gt;
&lt;td&gt;Apache 2.0&lt;/td&gt;
&lt;td&gt;A metrics store that speaks PromQL and also accepts Datadog Agent and DogStatsD metrics&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;What you pay for on this route:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compute, disks and object storage for the telemetry&lt;/li&gt;
&lt;li&gt;Upgrades of every component&lt;/li&gt;
&lt;li&gt;Capacity planning when a team adds a label with 10,000 values&lt;/li&gt;
&lt;li&gt;An on-call rotation for the monitoring itself&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Self-hosted cost = infrastructure + engineer time. The second number is the big one, and it is missing from every "free alternative" list.&lt;/p&gt;

&lt;p&gt;My rule: self-host when the managed bill is larger than the engineer time it takes to run the stack, or when the data is not allowed to leave your account.&lt;/p&gt;

&lt;p&gt;Under about 20 engineers, neither is usually true. I wrote about the stages in &lt;a href="https://meteorops.com/blog/how-to-build-a-startup-observability-stack" rel="noopener noreferrer"&gt;how to build a startup observability stack&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you want the open source stack in your own account with someone else operating it, both vendors sell that too, at enterprise prices: Grafana Cloud has a Bring Your Own Cloud option on AWS and GCP (Enterprise starts at $25,000 a year), and SigNoz offers a BYOC plan on its Enterprise tier (from $4,000 a month).&lt;/p&gt;
&lt;h2&gt;
  
  
  Route 5: Your cloud's own monitoring
&lt;/h2&gt;

&lt;p&gt;You already have it, and for a small system it is enough.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Logs&lt;/th&gt;
&lt;th&gt;Metrics&lt;/th&gt;
&lt;th&gt;Traces&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Amazon CloudWatch (US East)&lt;/td&gt;
&lt;td&gt;$0.50 per GB ingested, $0.03 per GB a month stored&lt;/td&gt;
&lt;td&gt;Custom metrics: $0.30 each for the first 10,000, $0.10 for the next 240,000. OpenTelemetry metrics: $0.50 per GB ingested&lt;/td&gt;
&lt;td&gt;Accepts OpenTelemetry data on its OTLP endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud Observability&lt;/td&gt;
&lt;td&gt;$0.50 per GiB, first 50 GiB per project free, 30 days of storage included&lt;/td&gt;
&lt;td&gt;Managed Service for Prometheus: $0.06 per million samples&lt;/td&gt;
&lt;td&gt;$0.20 per million spans, first 2.5 million free&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The strength: no agent contract, no new vendor, access control you already manage.&lt;/p&gt;

&lt;p&gt;The weakness: it stops at the edge of that cloud, and the classic per-metric price in CloudWatch punishes high cardinality harder than Datadog does. Metrics sent over OTLP are billed per GB instead.&lt;/p&gt;

&lt;p&gt;A good use of this route is the mix: cloud monitoring for the managed services, an open source stack for your own applications.&lt;/p&gt;
&lt;h2&gt;
  
  
  500 GB of logs and 20,000 metrics, priced on each tool
&lt;/h2&gt;

&lt;p&gt;Price lists are hard to compare because every unit is different. So here is 1 workload on each of them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F60546oeo1vah7ba4sefi.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F60546oeo1vah7ba4sefi.webp" alt="Six cards showing the billing unit of each tool: Datadog hosts and indexed events, Grafana Cloud active series and GB, SigNoz samples and GB, New Relic GB and users, Dynatrace memory GiB-hours, Honeycomb events" width="799" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Every tool bills a different unit, so price your own volume on each.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;First, 500 GB of logs in a month (300 million events), all of it searchable:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Calculation&lt;/th&gt;
&lt;th&gt;Per month&lt;/th&gt;
&lt;th&gt;Retention at that price&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Datadog&lt;/td&gt;
&lt;td&gt;500 GB x $0.10 + 300 million events x $1.70 per million&lt;/td&gt;
&lt;td&gt;$560&lt;/td&gt;
&lt;td&gt;15 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grafana Cloud Pro&lt;/td&gt;
&lt;td&gt;(500 - 50 included) x $0.55&lt;/td&gt;
&lt;td&gt;$247.50&lt;/td&gt;
&lt;td&gt;30 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SigNoz Cloud&lt;/td&gt;
&lt;td&gt;500 x $0.30&lt;/td&gt;
&lt;td&gt;$150&lt;/td&gt;
&lt;td&gt;15 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New Relic&lt;/td&gt;
&lt;td&gt;500 x $0.40&lt;/td&gt;
&lt;td&gt;$200&lt;/td&gt;
&lt;td&gt;30 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dynatrace&lt;/td&gt;
&lt;td&gt;465.7 GiB x $0.20&lt;/td&gt;
&lt;td&gt;$93.13, plus retention per GiB-day and a charge per GiB scanned&lt;/td&gt;
&lt;td&gt;You choose, 1 day to 10 years&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon CloudWatch&lt;/td&gt;
&lt;td&gt;500 x $0.50&lt;/td&gt;
&lt;td&gt;$250, plus $0.03 per GB a month stored and a charge per GB scanned by queries&lt;/td&gt;
&lt;td&gt;You choose&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Cloud Logging&lt;/td&gt;
&lt;td&gt;(465.7 GiB - 50 free) x $0.50&lt;/td&gt;
&lt;td&gt;$207.83&lt;/td&gt;
&lt;td&gt;30 days&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Dynatrace and Google bill per GiB, and 500 GB is 465.7 GiB.&lt;/p&gt;

&lt;p&gt;New Relic's free 100 GB a month covers all your data together, so I left it out of the row. The Grafana Cloud prices are its "starts at" figures, without the $19 platform fee.&lt;/p&gt;

&lt;p&gt;The Datadog row drops to $203 if exclusion filters leave 30% of the events indexed (Route 1). Compare the cleaned-up number, or the comparison flatters the alternative.&lt;/p&gt;

&lt;p&gt;Second, 20,000 metric series, each reporting once a minute. That is 864 million samples in a 30 day month:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Calculation&lt;/th&gt;
&lt;th&gt;Per month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Datadog, as custom metrics on 50 Pro hosts&lt;/td&gt;
&lt;td&gt;(20,000 - 5,000 included) / 100 x $5&lt;/td&gt;
&lt;td&gt;$750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grafana Cloud Pro&lt;/td&gt;
&lt;td&gt;(20,000 - 10,000 included) / 1,000 x $6.50&lt;/td&gt;
&lt;td&gt;$65&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SigNoz Cloud&lt;/td&gt;
&lt;td&gt;864 million samples x $0.10 per million&lt;/td&gt;
&lt;td&gt;$86.40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Managed Service for Prometheus&lt;/td&gt;
&lt;td&gt;864 million samples x $0.06 per million&lt;/td&gt;
&lt;td&gt;$51.84&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon CloudWatch, classic custom metrics&lt;/td&gt;
&lt;td&gt;10,000 x $0.30 + 10,000 x $0.10&lt;/td&gt;
&lt;td&gt;$4,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon CloudWatch, OpenTelemetry metrics&lt;/td&gt;
&lt;td&gt;864 million data points x 300 to 600 bytes = 259 to 518 GB, x $0.50&lt;/td&gt;
&lt;td&gt;$130 to $259&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Read this table with one warning.&lt;/p&gt;

&lt;p&gt;On Datadog, the metrics that come from its integrations are covered by the host price. Only your custom metrics are counted.&lt;/p&gt;

&lt;p&gt;On a tool priced per series or per sample, EVERY series counts: the ones from your Kubernetes nodes, your pods and your databases too.&lt;/p&gt;

&lt;p&gt;So count your real series before you celebrate. Run this in any Prometheus that scrapes your cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;count({__name__=~".+"})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The number it returns is your active series count.&lt;/p&gt;

&lt;p&gt;Then check your scrape interval. The table assumes 1 sample a minute. At a 15 second interval you send 4 times the samples: the per-sample rows are 4 times larger, and Grafana Cloud bills 4 data points a minute as 4 series.&lt;/p&gt;

&lt;p&gt;On Grafana Cloud, add the Kubernetes Monitoring hours from Route 3 if you want that app.&lt;/p&gt;

&lt;p&gt;The pattern across both tables: the open source based tools are cheaper per unit, and they count more units.&lt;/p&gt;

&lt;h2&gt;
  
  
  The switch costs more than the tool
&lt;/h2&gt;

&lt;p&gt;A new observability tool is a migration project. These are the things that move:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you have in Datadog&lt;/th&gt;
&lt;th&gt;What it becomes&lt;/th&gt;
&lt;th&gt;Work&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The Datadog Agent and its integrations&lt;/td&gt;
&lt;td&gt;The OpenTelemetry Collector, or Prometheus exporters&lt;/td&gt;
&lt;td&gt;Per integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tracing libraries (dd-trace) in every service&lt;/td&gt;
&lt;td&gt;OpenTelemetry SDKs&lt;/td&gt;
&lt;td&gt;Per service: the largest item&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom metrics sent with DogStatsD&lt;/td&gt;
&lt;td&gt;The same calls, received by a Collector or by a store that accepts the format&lt;/td&gt;
&lt;td&gt;Small, with a test first: the Collector's statsd receiver is beta&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dashboards&lt;/td&gt;
&lt;td&gt;Rebuilt, or translated where a tool exists&lt;/td&gt;
&lt;td&gt;Per dashboard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monitors&lt;/td&gt;
&lt;td&gt;Alert rules in the new tool&lt;/td&gt;
&lt;td&gt;Per monitor, with the thresholds checked again&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Log pipelines, parsing rules and archives&lt;/td&gt;
&lt;td&gt;Processors in the Collector, plus the new tool's own pipeline&lt;/td&gt;
&lt;td&gt;Per pipeline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Links in runbooks, habits during incidents&lt;/td&gt;
&lt;td&gt;New links, a practice session&lt;/td&gt;
&lt;td&gt;Per team&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Do not rebuild every dashboard. Use the move to delete.&lt;/p&gt;

&lt;p&gt;List the dashboards opened in the last 90 days and the monitors that paged someone. Migrate those. The rest was decoration.&lt;/p&gt;

&lt;p&gt;If your monitors are a pile of noise today, moving them moves the noise. Fix that list first: &lt;a href="https://meteorops.com/blog/how-to-handle-alert-fatigue" rel="noopener noreferrer"&gt;how to handle alert fatigue&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Move to OpenTelemetry before you pick
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://meteorops.com/glossary/opentelemetry" rel="noopener noreferrer"&gt;OpenTelemetry&lt;/a&gt; is the open standard for producing and shipping telemetry. It became a Graduated project of the Cloud Native Computing Foundation (CNCF) in May 2026, and every tool on this page accepts it (VictoriaMetrics for metrics only).&lt;/p&gt;

&lt;p&gt;Datadog accepts it too. That is the useful part.&lt;/p&gt;

&lt;p&gt;You can change how telemetry leaves your services while Datadog stays your tool:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the OpenTelemetry Collector in the cluster&lt;/li&gt;
&lt;li&gt;Point your services at the Collector&lt;/li&gt;
&lt;li&gt;Export from the Collector to Datadog's OTLP intake&lt;/li&gt;
&lt;li&gt;Add a second exporter when you want to try another tool&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The relevant part of the Collector config then looks like this (trimmed from the setup Datadog documents, with a second destination added):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exporters:
  otlp_http/datadog:
    endpoint: https://otlp.${env:DD_SITE}
    headers:
      dd-api-key: ${env:DD_API_KEY}
  otlp_http/candidate:
    endpoint: ${env:CANDIDATE_OTLP_ENDPOINT}
    headers:
      authorization: ${env:CANDIDATE_OTLP_TOKEN}

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [otlp_http/datadog, otlp_http/candidate]
    logs:
      receivers: [otlp]
      exporters: [otlp_http/datadog, otlp_http/candidate]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same spans and logs now reach both tools. Your services did not change.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F41mzm3lnwarsxmc9ze65.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F41mzm3lnwarsxmc9ze65.webp" alt="Three services send telemetry to an OpenTelemetry Collector, which exports to Datadog and to a second tool" width="799" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;One Collector, two destinations. Your services did not change.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The header name for the second tool depends on the vendor. The exporter is named otlp_http since Collector v0.144.0 (older versions call it otlphttp), and Datadog's page asks for Collector Contrib v0.154.0 or later.&lt;/p&gt;

&lt;p&gt;Datadog's full example adds processors, a metrics pipeline with a delta conversion, and a connector that produces the APM metrics. Start from their page and add the second exporter.&lt;/p&gt;

&lt;p&gt;3 caveats, all from the docs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Metrics you send over OTLP count as Datadog custom metrics unless they come from a receiver Datadog supports. Move traces and logs first, and check the custom metrics line before you move metrics&lt;/li&gt;
&lt;li&gt;Some Datadog features expect Datadog's own libraries. Check Datadog's OpenTelemetry compatibility table for the ones you use&lt;/li&gt;
&lt;li&gt;If you cannot touch the services yet, the Collector has a Datadog receiver that accepts traffic from the Datadog Agent and tracing libraries. It is marked alpha, so treat it as a bridge for the migration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lock-in = instrumentation in one vendor's format. OpenTelemetry removes it without removing the vendor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run both tools side by side, then cut over
&lt;/h2&gt;

&lt;p&gt;The plan I would follow, in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clean up:&lt;/strong&gt; apply Route 1, delete dead dashboards and monitors, write down the monthly volume per signal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shortlist 2 tools:&lt;/strong&gt; price your real volume on each, in their units&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual-ship 1 service:&lt;/strong&gt; add the second exporter for one team's services&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rebuild the top 10:&lt;/strong&gt; the 10 dashboards and the paging monitors for that team, in the new tool&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run both for at least 2 weeks:&lt;/strong&gt; include an on-call rotation and one real incident or a game day&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decide with the on-call engineers:&lt;/strong&gt; could they find the cause as fast as before?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roll out by team:&lt;/strong&gt; then remove the Datadog exporter, the Agent and the contract lines, in that order&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxmfbzbint8g8kquk0xxw.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxmfbzbint8g8kquk0xxw.webp" alt="Timeline of 7 steps: clean up, shortlist 2 tools, dual-ship 1 service, rebuild the top 10, run both for 2 weeks, decide with on-call, roll out by team, with Datadog and the new tool running side by side from step 3" width="799" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Both tools run side by side from step 3 until the roll-out.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;During the parallel run you pay twice for the services you dual-ship. Keep that set small and the period short.&lt;/p&gt;

&lt;p&gt;Time the cut-over to your renewal date. A migration that ends a month after the renewal costs you a year of commitment.&lt;/p&gt;

&lt;p&gt;Keep your &lt;a href="https://meteorops.com/blog/slo-vs-sla" rel="noopener noreferrer"&gt;SLO&lt;/a&gt; dashboards and their alerts for last, and move them only after the new numbers match the old ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistakes that make a migration expensive
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Comparing list prices in different units:&lt;/strong&gt; hosts against GB against series. Price your own volume&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comparing against the uncleaned Datadog bill:&lt;/strong&gt; the alternative wins a contest it should have had to fight&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forgetting the series you never paid for:&lt;/strong&gt; integration metrics are included in a Datadog host and billed on a per-series tool&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-hosting with nobody assigned:&lt;/strong&gt; the stack works until the first upgrade&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Migrating everything:&lt;/strong&gt; every dashboard moved, a few of them opened&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cutting over without a parallel run:&lt;/strong&gt; you find the missing alert during the incident it was for&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switching tool and instrumentation in the same month:&lt;/strong&gt; change the instrumentation first, while the old tool still shows you what broke&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The checklist
&lt;/h2&gt;

&lt;p&gt;Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write down the products you use and the reason you want to leave&lt;/li&gt;
&lt;li&gt;Cut the Datadog bill before you compare&lt;/li&gt;
&lt;li&gt;Count your active series, your log GB and your trace GB for a month&lt;/li&gt;
&lt;li&gt;Price that volume on 2 tools, with retention and users included&lt;/li&gt;
&lt;li&gt;Ask every vendor for the minimum commitment and the overage price&lt;/li&gt;
&lt;li&gt;Send telemetry through an OpenTelemetry Collector before you choose&lt;/li&gt;
&lt;li&gt;Run both tools for at least 2 weeks&lt;/li&gt;
&lt;li&gt;Let the people on call make the final call&lt;/li&gt;
&lt;li&gt;Name the owner of the new stack, especially when it is self-hosted&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Who is Datadog's biggest competitor?
&lt;/h3&gt;

&lt;p&gt;Among commercial platforms, Dynatrace and New Relic sell the closest thing: one product for metrics, traces and logs. Among open source options, the Grafana stack is the one most teams compare it with.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is there a free alternative to Datadog?
&lt;/h3&gt;

&lt;p&gt;Yes, at small scale. Grafana Cloud's free plan includes 10,000 metric series and 50 GB each of logs and traces, New Relic includes 100 GB a month and 1 full platform user, and Honeycomb includes 20 million events a month. Datadog has a free plan too: up to 5 hosts with 1 day of metric retention.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is there an open source Datadog alternative?
&lt;/h3&gt;

&lt;p&gt;Yes. The common ones are the Grafana stack (Prometheus, Loki, Tempo, Grafana) and SigNoz. Both can be self-hosted, and both are sold as a managed service by the company behind them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Grafana better than Datadog?
&lt;/h3&gt;

&lt;p&gt;Grafana is cheaper per unit and open source, and Datadog needs less setup. I would choose Grafana Cloud when cost and lock-in are the problem, and stay on Datadog when the team is small and the bill is under control.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is Datadog so expensive?
&lt;/h3&gt;

&lt;p&gt;Because the bill follows usage that nobody approves: indexed log events, custom metric tag combinations, containers and APM hosts. The $15 host price is a small part of it. My &lt;a href="https://meteorops.com/blog/datadog-pricing" rel="noopener noreferrer"&gt;pricing breakdown&lt;/a&gt; shows a 50 host bill where it is 17%.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use OpenTelemetry with Datadog?
&lt;/h3&gt;

&lt;p&gt;Yes. Datadog accepts OTLP through the Datadog Agent, through an OpenTelemetry Collector and on direct intake endpoints. Start with traces and logs: OTLP metrics can count as custom metrics on the Datadog bill.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long does it take to move off Datadog?
&lt;/h3&gt;

&lt;p&gt;The parallel run sets the minimum: 2 weeks. The rest depends on how many services still use Datadog's tracing libraries and how many dashboards and monitors you decide to keep.&lt;/p&gt;

&lt;h2&gt;
  
  
  A recap
&lt;/h2&gt;

&lt;p&gt;If you take away 1 thing, let it be this:&lt;/p&gt;

&lt;p&gt;Fix the bill first, standardize on OpenTelemetry second, and choose the tool third.&lt;/p&gt;

&lt;p&gt;In that order, the choice is small and you can change it again.&lt;/p&gt;

&lt;p&gt;You don't need a consultant for this. The steps are above, and the &lt;a href="https://meteorops.com/blog/datadog-pricing" rel="noopener noreferrer"&gt;Datadog pricing breakdown&lt;/a&gt; has the filters and the numbers for the first one.&lt;/p&gt;

&lt;p&gt;(Yes, I sell DevOps engineers.) If you would rather have a senior engineer go over the bill and the options with you, &lt;a href="https://meteorops.com/services/finops-consulting" rel="noopener noreferrer"&gt;book a free 30-minute consultation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>monitoring</category>
      <category>cloud</category>
      <category>sre</category>
    </item>
    <item>
      <title>Datadog Pricing: What You Pay and How to Cut the Bill</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Sat, 14 Nov 2026 21:30:02 +0000</pubDate>
      <link>https://dev.to/meteorops/datadog-pricing-what-you-pay-and-how-to-cut-the-bill-1a5f</link>
      <guid>https://dev.to/meteorops/datadog-pricing-what-you-pay-and-how-to-cut-the-bill-1a5f</guid>
      <description>&lt;p&gt;On a Datadog bill for 50 hosts, the $15 per host is 17% of the total:&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;Datadog pricing is a price list of separate products, and each product has its own unit.&lt;/p&gt;

&lt;p&gt;Infrastructure Monitoring costs $15 per host per month on the Pro plan (billed annually), or $18 on-demand.&lt;/p&gt;

&lt;p&gt;APM adds $31 per host.&lt;/p&gt;

&lt;p&gt;Logs cost $0.10 per GB to ingest plus $1.70 per million events to index for 15 days.&lt;/p&gt;

&lt;p&gt;Custom metrics cost $5 per 100 above what your hosts include.&lt;/p&gt;

&lt;p&gt;So the host price tells you very little. The bill follows 4 things your team controls:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How many hosts and containers run at the busiest hours of the month&lt;/li&gt;
&lt;li&gt;How many tag combinations your custom metrics have&lt;/li&gt;
&lt;li&gt;How many log events you index, and for how many days&lt;/li&gt;
&lt;li&gt;How much of it you committed to in advance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the worked example below, 50 hosts cost $4,360 a month at list price, and the $15 host line is 17% of it.&lt;/p&gt;

&lt;p&gt;3 changes bring that bill to $2,953.&lt;/p&gt;

&lt;p&gt;All prices here are Datadog's public list prices for the US site, in USD, checked on November 14, 2026 against the &lt;a href="https://www.datadoghq.com/pricing/list/" rel="noopener noreferrer"&gt;Datadog price list&lt;/a&gt; and the &lt;a href="https://docs.datadoghq.com/account_management/billing/pricing/" rel="noopener noreferrer"&gt;billing docs&lt;/a&gt;. Your contract can differ.&lt;/p&gt;

&lt;h2&gt;
  
  
  Datadog pricing is a price list, one unit per product
&lt;/h2&gt;

&lt;p&gt;The Datadog price list has a row for every product, and you pay for each one you turn on.&lt;/p&gt;

&lt;p&gt;These are the lines a typical startup setup uses:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Product&lt;/th&gt;
&lt;th&gt;Unit&lt;/th&gt;
&lt;th&gt;Billed annually&lt;/th&gt;
&lt;th&gt;Month-to-month&lt;/th&gt;
&lt;th&gt;On-demand&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure Pro&lt;/td&gt;
&lt;td&gt;Host, per month&lt;/td&gt;
&lt;td&gt;$15&lt;/td&gt;
&lt;td&gt;$18&lt;/td&gt;
&lt;td&gt;$18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure Enterprise&lt;/td&gt;
&lt;td&gt;Host, per month&lt;/td&gt;
&lt;td&gt;$23&lt;/td&gt;
&lt;td&gt;$27&lt;/td&gt;
&lt;td&gt;$27&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APM&lt;/td&gt;
&lt;td&gt;APM host, per month&lt;/td&gt;
&lt;td&gt;$31&lt;/td&gt;
&lt;td&gt;$36&lt;/td&gt;
&lt;td&gt;$36&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APM Pro&lt;/td&gt;
&lt;td&gt;APM host, per month&lt;/td&gt;
&lt;td&gt;$35&lt;/td&gt;
&lt;td&gt;$42&lt;/td&gt;
&lt;td&gt;$42&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APM Enterprise&lt;/td&gt;
&lt;td&gt;APM host, per month&lt;/td&gt;
&lt;td&gt;$40&lt;/td&gt;
&lt;td&gt;$48&lt;/td&gt;
&lt;td&gt;$48&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Monitoring&lt;/td&gt;
&lt;td&gt;Database host, per month&lt;/td&gt;
&lt;td&gt;$70&lt;/td&gt;
&lt;td&gt;$84&lt;/td&gt;
&lt;td&gt;$84&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Containers above the included ones&lt;/td&gt;
&lt;td&gt;Container&lt;/td&gt;
&lt;td&gt;$1 per month&lt;/td&gt;
&lt;td&gt;$1 per month&lt;/td&gt;
&lt;td&gt;$0.002 per hour&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom metrics above the included ones&lt;/td&gt;
&lt;td&gt;100 metrics, per month&lt;/td&gt;
&lt;td&gt;$5&lt;/td&gt;
&lt;td&gt;$5&lt;/td&gt;
&lt;td&gt;$5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Log ingestion&lt;/td&gt;
&lt;td&gt;GB&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Indexed logs, 15-day retention&lt;/td&gt;
&lt;td&gt;1 million events&lt;/td&gt;
&lt;td&gt;$1.70&lt;/td&gt;
&lt;td&gt;$2.04&lt;/td&gt;
&lt;td&gt;$2.55&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Indexed spans, 15-day retention&lt;/td&gt;
&lt;td&gt;1 million spans&lt;/td&gt;
&lt;td&gt;$1.70&lt;/td&gt;
&lt;td&gt;$2.04&lt;/td&gt;
&lt;td&gt;$2.55&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Synthetic API tests&lt;/td&gt;
&lt;td&gt;10,000 test runs&lt;/td&gt;
&lt;td&gt;$5&lt;/td&gt;
&lt;td&gt;$6&lt;/td&gt;
&lt;td&gt;$7.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Synthetic browser tests&lt;/td&gt;
&lt;td&gt;1,000 test runs&lt;/td&gt;
&lt;td&gt;$12&lt;/td&gt;
&lt;td&gt;$15&lt;/td&gt;
&lt;td&gt;$18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RUM Measure&lt;/td&gt;
&lt;td&gt;1,000 sessions&lt;/td&gt;
&lt;td&gt;$0.15&lt;/td&gt;
&lt;td&gt;$0.18&lt;/td&gt;
&lt;td&gt;$0.22&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two things in this table decide most bills.&lt;/p&gt;

&lt;p&gt;First: a host with Infrastructure Pro and APM costs $46 a month, 3 times the number on the pricing page.&lt;/p&gt;

&lt;p&gt;Second: the last 8 rows are usage.&lt;/p&gt;

&lt;p&gt;Nobody signs off on them. They grow with every deploy.&lt;/p&gt;

&lt;p&gt;Host = a predictable floor. Usage = the part that surprises you.&lt;/p&gt;

&lt;h2&gt;
  
  
  A host is billed on the busiest hours of the month
&lt;/h2&gt;

&lt;p&gt;Datadog counts your hosts every hour.&lt;/p&gt;

&lt;p&gt;On the default plan (Datadog calls it the high watermark plan) you pay for the highest count of the month after the top 1% of hours is dropped.&lt;/p&gt;

&lt;p&gt;A 30 day month has 720 hourly readings. The top 1% is 7.2 of them, and Datadog rounds that up to 8.&lt;/p&gt;

&lt;p&gt;The APM billing page spells the rule out for APM hosts: Datadog charges on the ninth highest reading of the month (the eighth in February). Infrastructure hosts follow the same 99% rule.&lt;/p&gt;

&lt;p&gt;Here is what that does to an autoscaling cluster:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You run 40 nodes all month&lt;/li&gt;
&lt;li&gt;A load test keeps 100 nodes up during 8 hourly readings → you pay for 40 hosts&lt;/li&gt;
&lt;li&gt;It shows up in a ninth reading → you pay for 100 hosts, for the whole month&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Rule: 9 high readings set the price of the other 711.&lt;/p&gt;

&lt;p&gt;The 8 readings are a budget for the whole month, and a test that starts mid-hour uses an extra one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8u5705a3ip4z0l5v22ix.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8u5705a3ip4z0l5v22ix.webp" alt="Two charts of host count over a month: a spike to 100 nodes for 8 hours is billed as 40 hosts, a spike for 9 hours is billed as 100 hosts" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Datadog drops the top 1% of the 720 hourly readings. A ninth high reading sets the host count for the month.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What counts as a host: a server, a VM, a Kubernetes node, an Azure App Service Plan instance or a Heroku dyno. A VM seen by both the Agent and the cloud integration counts once.&lt;/p&gt;

&lt;p&gt;If your fleet scales up and down every day, ask for the hybrid monthly/hourly plan. You commit to a monthly minimum and pay an hourly rate for host hours above it.&lt;/p&gt;

&lt;p&gt;The same hourly counting applies to APM hosts and database hosts. (Yes, one long load test can raise the host line, the APM line and the container line.)&lt;/p&gt;

&lt;p&gt;If you autoscale on Kubernetes, the settings that decide how long extra nodes stay up are in my guide on &lt;a href="https://meteorops.com/blog/how-to-set-up-kubernetes-autoscaling-without-creating-cost-surprises" rel="noopener noreferrer"&gt;Kubernetes autoscaling without cost surprises&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Containers and custom metrics come with the host, up to a limit
&lt;/h2&gt;

&lt;p&gt;Each Infrastructure host includes an allotment of other products:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Included with each host&lt;/th&gt;
&lt;th&gt;Pro&lt;/th&gt;
&lt;th&gt;Enterprise&lt;/th&gt;
&lt;th&gt;Above the allotment&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Containers&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;$1 per container per month prepaid, $0.002 per hour on-demand&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom metrics&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;$5 per 100 per month at list price&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The allotments are pooled across the account. 50 Pro hosts include 250 containers and 5,000 custom metrics, wherever they run.&lt;/p&gt;

&lt;p&gt;A Kubernetes node that runs 20 containers uses 4 hosts' worth of the container allotment.&lt;/p&gt;

&lt;p&gt;The on-demand container rate looks small: $0.002 an hour is $1.46 over a 730 hour month, 46% more than the prepaid $1.&lt;/p&gt;

&lt;p&gt;Kubernetes pause containers are excluded from the count.&lt;/p&gt;

&lt;p&gt;One mistake to avoid: installing the Agent inside every container. Datadog then bills each container as a host.&lt;/p&gt;

&lt;p&gt;Run 1 containerized Agent per node.&lt;/p&gt;
&lt;h2&gt;
  
  
  Custom metrics multiply with every tag
&lt;/h2&gt;

&lt;p&gt;This is the line that is hardest to predict.&lt;/p&gt;

&lt;p&gt;A custom metric is any metric that does not come from a Datadog integration: everything you send through DogStatsD, a custom check or a log-based metric.&lt;/p&gt;

&lt;p&gt;Datadog counts tag combinations, and 1 metric name can hold thousands of them:&lt;/p&gt;

&lt;p&gt;1 custom metric = 1 metric name + 1 unique combination of tag values (the host tag included).&lt;/p&gt;

&lt;p&gt;Take a metric named &lt;code&gt;checkout.latency&lt;/code&gt; with 3 tags:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;endpoint&lt;/code&gt;: 20 values&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;status&lt;/code&gt;: 3 values&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pod&lt;/code&gt;: 50 values&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If every combination reports, that is 20 x 3 x 50 = 3,000 custom metrics.&lt;/p&gt;

&lt;p&gt;The metric type multiplies it again:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric type&lt;/th&gt;
&lt;th&gt;Custom metrics per tag combination&lt;/th&gt;
&lt;th&gt;checkout.latency&lt;/th&gt;
&lt;th&gt;Cost above the allotment&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Count, rate or gauge&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;3,000&lt;/td&gt;
&lt;td&gt;$150 a month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Histogram (default aggregations)&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;15,000&lt;/td&gt;
&lt;td&gt;$750 a month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distribution&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;15,000&lt;/td&gt;
&lt;td&gt;$750 a month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distribution with percentiles&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;30,000&lt;/td&gt;
&lt;td&gt;$1,500 a month&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One metric name, one line of code, $1,500 a month.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9igddh232j6ysfevntqx.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9igddh232j6ysfevntqx.webp" alt="Multiplication diagram: endpoint 20 values times status 3 values times pod 50 values equals 3,000 custom metrics, times 10 as a distribution with percentiles equals 30,000 custom metrics or $1,500 a month" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;1 metric name with 3 tags becomes 3,000 custom metrics, and 30,000 as a distribution with percentiles.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now add a &lt;code&gt;customer_id&lt;/code&gt; tag with 200 values and multiply the table by up to 200.&lt;/p&gt;

&lt;p&gt;Two details work in your favor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only combinations that actually report are counted, and the count follows your most detailed tag&lt;/li&gt;
&lt;li&gt;Billing uses the monthly average of the hourly count, so a 1 hour burst of new tag values costs 1/720 of a full month&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How do you get the tags back under control without changing code? Metrics without Limits.&lt;/p&gt;

&lt;p&gt;It lets you pick, per metric, which tags stay queryable. Datadog then bills two volumes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Indexed custom metrics:&lt;/strong&gt; the combinations of the tags you kept, at the $5 per 100 list price&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ingested custom metrics:&lt;/strong&gt; everything your code still sends for the metrics you configured, at $0.10 per 100 above the allotment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keeping only &lt;code&gt;endpoint&lt;/code&gt; and &lt;code&gt;status&lt;/code&gt; on &lt;code&gt;checkout.latency&lt;/code&gt; takes it from 3,000 indexed combinations to 60.&lt;/p&gt;
&lt;h2&gt;
  
  
  Logs are billed twice: once to ingest, once to index
&lt;/h2&gt;

&lt;p&gt;Every log you send pays $0.10 per GB at ingestion.&lt;/p&gt;

&lt;p&gt;Every log you keep searchable pays again, per million events, by retention:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Index retention&lt;/th&gt;
&lt;th&gt;Billed annually&lt;/th&gt;
&lt;th&gt;Month-to-month&lt;/th&gt;
&lt;th&gt;On-demand&lt;/th&gt;
&lt;th&gt;300 million events a month (annual)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;3 days&lt;/td&gt;
&lt;td&gt;$1.06&lt;/td&gt;
&lt;td&gt;$1.27&lt;/td&gt;
&lt;td&gt;$1.59&lt;/td&gt;
&lt;td&gt;$318&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7 days&lt;/td&gt;
&lt;td&gt;$1.27&lt;/td&gt;
&lt;td&gt;$1.52&lt;/td&gt;
&lt;td&gt;$1.91&lt;/td&gt;
&lt;td&gt;$381&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15 days&lt;/td&gt;
&lt;td&gt;$1.70&lt;/td&gt;
&lt;td&gt;$2.04&lt;/td&gt;
&lt;td&gt;$2.55&lt;/td&gt;
&lt;td&gt;$510&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30 days&lt;/td&gt;
&lt;td&gt;$2.50&lt;/td&gt;
&lt;td&gt;$3.00&lt;/td&gt;
&lt;td&gt;$3.75&lt;/td&gt;
&lt;td&gt;$750&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Ingestion is cheap. Indexing is the bill.&lt;/p&gt;

&lt;p&gt;500 GB of logs costs $50 to ingest. The same logs, as 300 million events indexed for 15 days, cost $510.&lt;/p&gt;

&lt;p&gt;That split is also the way out: you can ingest everything and index a part of it.&lt;/p&gt;

&lt;p&gt;An exclusion filter on an index drops matching logs before they are indexed. The excluded logs still show in Live Tail, can still feed log-based metrics and can still go to your archive.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzznfcgh0cif917fbxzxz.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzznfcgh0cif917fbxzxz.webp" alt="Flow diagram: 500 GB of logs are ingested at $0.10 per GB for $50, pass an exclusion filter, and are indexed for 15 days at $1.70 per million events for $510; excluded logs go to Live Tail, metrics and archive" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Every log pays for ingestion. Only the logs that pass the exclusion filters pay for indexing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The two filters I would add first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;status:DEBUG                                        exclude 100%
source:nginx AND http.status_code:[200 TO 299]      exclude 95%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first one can be switched off from the UI or the API during an incident, when you want the debug logs back.&lt;/p&gt;

&lt;p&gt;The second keeps every 3xx, 4xx and 5xx request and 5% of the successful ones, which is enough to see the trend.&lt;/p&gt;

&lt;p&gt;Two more log facts for your budget:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Indexed logs above your commitment are billed on-demand, at a 50% premium ($2.55 against $1.70)&lt;/li&gt;
&lt;li&gt;Each index can have a daily quota. When a service starts logging at debug level in production, indexing stops at the quota. The logs still reach Live Tail and your archive, and you still pay the $0.10 per GB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For logs you must keep for months but rarely read, Flex Logs stores them at $0.05 per million events per month, with query capacity bought separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  APM adds a second host price, with spans included
&lt;/h2&gt;

&lt;p&gt;An APM host is any host that sends traces. It costs $31 a month on top of the Infrastructure price.&lt;/p&gt;

&lt;p&gt;Each APM host includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;150 GB of ingested spans a month&lt;/li&gt;
&lt;li&gt;1 million indexed spans a month, kept for 15 days&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Above that: $0.10 per ingested GB, and $1.70 per million indexed spans at 15-day retention.&lt;/p&gt;

&lt;p&gt;Both allotments are pooled across your APM hosts.&lt;/p&gt;

&lt;p&gt;50 APM hosts include 7,500 GB of ingested spans and 50 million indexed spans a month. The host count is the easier place to overpay: tracing left on for hosts that run batch jobs and internal tools nobody traces.&lt;/p&gt;

&lt;p&gt;Only hosts that send traces are APM hosts. A node pool for untraced workloads is $31 a month saved per node.&lt;/p&gt;

&lt;p&gt;If you do pass the allotment, set sampling per service in the tracing library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export DD_TRACE_SAMPLING_RULES='[
  {"service": "checkout", "resource": "GET /checkout", "sample_rate": 1},
  {"service": "checkout", "sample_rate": 0.2}
]'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This keeps every trace that starts at &lt;code&gt;GET /checkout&lt;/code&gt; and 20% of the other traces that start in the service.&lt;/p&gt;

&lt;p&gt;Resource rules need a recent Java, Python, Go or PHP tracer. Other languages take the per-service rule only.&lt;/p&gt;

&lt;p&gt;Retention filters then decide which ingested spans are indexed.&lt;/p&gt;

&lt;p&gt;The Intelligent Retention Filter keeps a sample of errors and slow traces at no charge, so start by trimming your custom filters and the rate of the Error Default one.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked Datadog bill for 50 hosts
&lt;/h2&gt;

&lt;p&gt;The setup, with my assumptions stated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;50 Kubernetes nodes, Infrastructure Pro, billed annually&lt;/li&gt;
&lt;li&gt;APM on all 50 nodes, spans inside the allotment&lt;/li&gt;
&lt;li&gt;1,000 containers on average (20 per node)&lt;/li&gt;
&lt;li&gt;20,000 custom metrics&lt;/li&gt;
&lt;li&gt;500 GB of logs a month, 300 million events, all indexed for 15 days&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;Calculation&lt;/th&gt;
&lt;th&gt;Per month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure Pro&lt;/td&gt;
&lt;td&gt;50 x $15&lt;/td&gt;
&lt;td&gt;$750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APM&lt;/td&gt;
&lt;td&gt;50 x $31&lt;/td&gt;
&lt;td&gt;$1,550&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Containers&lt;/td&gt;
&lt;td&gt;(1,000 - 250 included) x $1&lt;/td&gt;
&lt;td&gt;$750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom metrics&lt;/td&gt;
&lt;td&gt;(20,000 - 5,000 included) / 100 x $5&lt;/td&gt;
&lt;td&gt;$750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Log ingestion&lt;/td&gt;
&lt;td&gt;500 GB x $0.10&lt;/td&gt;
&lt;td&gt;$50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Indexed logs&lt;/td&gt;
&lt;td&gt;300 x $1.70&lt;/td&gt;
&lt;td&gt;$510&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$4,360&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;$4,360 a month is $52,320 a year.&lt;/p&gt;

&lt;p&gt;The line everyone quotes ($15 per host) is $750 of it: 17%.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff5b3fnbpq1u8vas1nark.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff5b3fnbpq1u8vas1nark.webp" alt="Bar chart of a Datadog bill for 50 hosts, $4,360 a month: APM $1,550, Infrastructure Pro $750, containers $750, custom metrics $750, indexed logs $510, log ingestion $50" width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The 50 host bill at list price. The $15 per host line is 17% of it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The same usage with no commitment, at on-demand rates, comes to $5,360 a month. That is 23% more for the same usage.&lt;/p&gt;

&lt;p&gt;Now the same company after 3 changes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tracing only on the 35 nodes that run traced services&lt;/td&gt;
&lt;td&gt;$1,550&lt;/td&gt;
&lt;td&gt;$1,085&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Metrics without Limits: 20,000 indexed custom metrics down to 8,000&lt;/td&gt;
&lt;td&gt;$750&lt;/td&gt;
&lt;td&gt;$150 + up to $15 for ingested&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exclusion filters: 30% of log events indexed&lt;/td&gt;
&lt;td&gt;$510&lt;/td&gt;
&lt;td&gt;$153&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Everything else unchanged&lt;/td&gt;
&lt;td&gt;$1,550&lt;/td&gt;
&lt;td&gt;$1,550&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$4,360&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$2,953&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;$1,407 a month less: 32%.&lt;/p&gt;

&lt;p&gt;These are list prices. Datadog lists volume discounts from 500 hosts a month, and a sales conversation changes the numbers long before that.&lt;/p&gt;
&lt;h2&gt;
  
  
  Commit to your baseline, pay on-demand for the rest
&lt;/h2&gt;

&lt;p&gt;Datadog has 3 price columns: billed annually, month-to-month and on-demand.&lt;/p&gt;

&lt;p&gt;Commitment = a quantity per product that you pay for whether you use it or not.&lt;/p&gt;

&lt;p&gt;On-demand = everything above it, at the highest price.&lt;/p&gt;

&lt;p&gt;The billing docs give the formula:&lt;/p&gt;

&lt;p&gt;allotments + committed usage = included usage. Billable usage minus included usage = on-demand usage.&lt;/p&gt;

&lt;p&gt;The premium depends on the product:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hosts: $18 against $15, 20% more&lt;/li&gt;
&lt;li&gt;Indexed logs and spans: $2.55 against $1.70, 50% more&lt;/li&gt;
&lt;li&gt;Containers: $1.46 against $1 over a full month, 46% more&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So my rule is simple: commit to what you used in your quietest month, and let growth run on-demand until the next renewal.&lt;/p&gt;

&lt;p&gt;Commit too low and you pay up to 50% extra on the difference (16% on APM hosts, 20% on hosts, 50% on indexed logs).&lt;/p&gt;

&lt;p&gt;Commit too high and you pay 100% for something you never used.&lt;/p&gt;
&lt;h2&gt;
  
  
  Cut the bill in this order
&lt;/h2&gt;

&lt;p&gt;Start where the money is. In the example above that is APM hosts, custom metrics and indexed logs.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Read the bill by product:&lt;/strong&gt; Plan and Usage shows month-to-date and projected cost per product, and the top custom metric names by share of cost&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exclude logs you never search:&lt;/strong&gt; debug logs, health checks and successful requests first&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shorten retention:&lt;/strong&gt; 300 million events at 7 days cost $381 against $510 at 15 days. Send the rest to an archive in your own bucket&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set a daily quota on every index:&lt;/strong&gt; a bad deploy then indexes 1 day's quota at most. Logs past the quota are not searchable, so add the warning threshold&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop tags with Metrics without Limits:&lt;/strong&gt; start with the 10 metric names at the top of the usage page. Datadog marks the tags queried in the last 30 days&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stop percentiles you do not graph:&lt;/strong&gt; they double the count of a distribution metric&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turn tracing off where nobody reads traces:&lt;/strong&gt; every host that sends traces is an APM host&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep all spikes of the month inside 8 hourly readings, or move to the hourly plan:&lt;/strong&gt; the high-water mark decides the month&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alert on your own usage:&lt;/strong&gt; Datadog publishes it as metrics&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The usage metrics for the last point:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;datadog.estimated_usage.hosts
datadog.estimated_usage.containers
datadog.estimated_usage.metrics.custom
datadog.estimated_usage.logs.ingested_bytes
datadog.estimated_usage.logs.ingested_events
datadog.estimated_usage.apm_hosts
datadog.estimated_usage.apm.ingested_bytes
datadog.estimated_usage.apm.indexed_spans
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Put an anomaly monitor on the log and custom metric ones. You then hear about a cost spike the same day it starts.&lt;/p&gt;

&lt;p&gt;Filter &lt;code&gt;logs.ingested_events&lt;/code&gt; by &lt;code&gt;datadog_is_excluded:false&lt;/code&gt; to watch what gets indexed.&lt;/p&gt;

&lt;p&gt;The same approach works on the cloud bill itself. I wrote it down in &lt;a href="https://meteorops.com/blog/how-to-cut-cloud-costs-without-slowing-teams" rel="noopener noreferrer"&gt;how to cut cloud costs without slowing teams&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pay for Datadog when it saves an engineer
&lt;/h2&gt;

&lt;p&gt;Yes, I help companies lower this bill. My first advice is to cut it before you leave it.&lt;/p&gt;

&lt;p&gt;The alternative to Datadog is usually Prometheus, Grafana, Loki and an OpenTelemetry Collector that somebody on your team runs.&lt;/p&gt;

&lt;p&gt;The license is free. The engineer is the cost.&lt;/p&gt;

&lt;p&gt;My position:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Up to about 20 engineers:&lt;/strong&gt; buy it. $4,000 a month is cheaper than the part of an engineer that a self-hosted stack takes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When the bill passes the cost of an engineer:&lt;/strong&gt; cut it with the list above before you think about leaving&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When it is still too high after that:&lt;/strong&gt; move the most expensive signal first (often logs) and keep the rest&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exceptions: if you already run Prometheus well, or you are bound to keep data in your own account, start self-hosted.&lt;/p&gt;

&lt;p&gt;Instrument with OpenTelemetry either way. Datadog accepts it, and it keeps the exit open.&lt;/p&gt;

&lt;p&gt;Check how your OTLP metrics are billed first: metrics outside a Datadog integration count as custom metrics.&lt;/p&gt;

&lt;p&gt;I compare the two paths in &lt;a href="https://meteorops.com/blog/how-to-build-a-startup-observability-stack" rel="noopener noreferrer"&gt;how to build a startup observability stack&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Datadog cost checklist
&lt;/h2&gt;

&lt;p&gt;Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 Agent per node&lt;/li&gt;
&lt;li&gt;A commitment equal to your quietest month&lt;/li&gt;
&lt;li&gt;Exclusion filters on debug logs and successful requests&lt;/li&gt;
&lt;li&gt;A daily quota on every log index&lt;/li&gt;
&lt;li&gt;The shortest index retention your on-call needs, and an archive for the rest&lt;/li&gt;
&lt;li&gt;No user, customer or request ID as a metric tag&lt;/li&gt;
&lt;li&gt;Percentiles only on metrics that have a graph or a monitor&lt;/li&gt;
&lt;li&gt;Tracing only on hosts where somebody reads traces&lt;/li&gt;
&lt;li&gt;Monitors on the &lt;code&gt;datadog.estimated_usage&lt;/code&gt; metrics&lt;/li&gt;
&lt;li&gt;A look at the projected cost on the 10th of every month&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How does Datadog pricing work?
&lt;/h3&gt;

&lt;p&gt;Each Datadog product has its own unit and price. Infrastructure Monitoring and APM are priced per host per month, logs per GB ingested and per million events indexed, custom metrics per 100, and Synthetics and RUM per test run and per session. You commit to a quantity per product and pay a higher on-demand rate above it.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does Datadog cost per host?
&lt;/h3&gt;

&lt;p&gt;Infrastructure Pro is $15 per host per month billed annually and $18 on-demand. Enterprise is $23 and $27. With APM at $31, a traced host costs $46 a month before containers, custom metrics and logs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is Datadog so expensive?
&lt;/h3&gt;

&lt;p&gt;The host price is a small part of the bill. Custom metrics multiply with every tag, logs are charged at ingestion and again at indexing, and hosts are billed on the busiest hours of the month. In the 50 host example above, the host line is 17% of $4,360.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Datadog free?
&lt;/h3&gt;

&lt;p&gt;Partly. Datadog has a free trial, and when it ends you can move to the Free tier: up to 5 Basic hosts with 1-day metric retention, at no cost. Container monitoring is listed from the Pro plan, at $15 per host.&lt;/p&gt;

&lt;h3&gt;
  
  
  How are Datadog custom metrics billed?
&lt;/h3&gt;

&lt;p&gt;By the number of unique combinations of metric name and tag values, averaged per hour over the month. Pro includes 100 per host and Enterprise 200. Above that the list price is $5 per 100 a month, and a histogram or distribution counts 5 times per combination.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much do Datadog logs cost?
&lt;/h3&gt;

&lt;p&gt;$0.10 per GB ingested, plus $1.06 to $2.50 per million indexed events depending on retention (3 to 30 days, billed annually). Indexed logs above your commitment cost 50% more. Exclusion filters lower the indexing part, which is the larger one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Datadog charge per user?
&lt;/h3&gt;

&lt;p&gt;Infrastructure Monitoring, APM and Log Management have no per-user fee. The price list has per-seat prices for On-Call and Incident Management, and per-committer prices for CI and code security products.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the high-water mark in Datadog billing?
&lt;/h3&gt;

&lt;p&gt;Datadog counts hosts every hour, drops the top 1% of hours and bills the highest remaining count. In a 30 day month that is the ninth highest hourly reading. Scale-ups that touch 8 hourly readings or fewer in the month do not raise the host count. A ninth sets it for the month.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I reduce my Datadog bill?
&lt;/h3&gt;

&lt;p&gt;Exclude logs you never search, shorten index retention, drop unused metric tags with Metrics without Limits and turn tracing off on hosts nobody traces. Then commit to your baseline usage. In the example above these steps cut the bill by 32%.&lt;/p&gt;

&lt;h2&gt;
  
  
  A recap
&lt;/h2&gt;

&lt;p&gt;If you take away 1 thing from this, let it be this:&lt;/p&gt;

&lt;p&gt;Your tags, your log filters and your busiest 9 hours set the Datadog bill.&lt;/p&gt;

&lt;p&gt;You don't NEED a consultant to fix it. The checklist above is the whole method, and a senior engineer can run it.&lt;/p&gt;

&lt;p&gt;If you'd rather have someone who has done it before look at your setup, &lt;a href="https://meteorops.com/devops-setup-for-production-free-consultation" rel="noopener noreferrer"&gt;book a free production setup consultation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;P.S. Before you delete a metric or a log, check that no SLO depends on it. I covered those in &lt;a href="https://meteorops.com/blog/slo-vs-sla" rel="noopener noreferrer"&gt;SLO vs SLA vs SLI&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>monitoring</category>
      <category>cloud</category>
      <category>sre</category>
    </item>
    <item>
      <title>SLO vs SLA vs SLI: Set Targets Before You Sign a Contract</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Fri, 13 Nov 2026 15:30:04 +0000</pubDate>
      <link>https://dev.to/meteorops/slo-vs-sla-vs-sli-set-targets-before-you-sign-a-contract-1hch</link>
      <guid>https://dev.to/meteorops/slo-vs-sla-vs-sli-set-targets-before-you-sign-a-contract-1hch</guid>
      <description>&lt;p&gt;Enterprise contracts ask for 1 number, your uptime SLA. Signing 99.9% takes 1 minute. Measuring it takes 1 quarter:&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;SLI (Service Level Indicator) = the measurement. The share of requests that went well.&lt;/p&gt;

&lt;p&gt;SLO (Service Level Objective) = the target your team sets on that measurement.&lt;/p&gt;

&lt;p&gt;SLA (Service Level Agreement) = the promise you sign with a customer, with a price for missing it.&lt;/p&gt;

&lt;p&gt;They are built in that order: measure, target, promise.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;SLI&lt;/th&gt;
&lt;th&gt;SLO&lt;/th&gt;
&lt;th&gt;SLA&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What it is&lt;/td&gt;
&lt;td&gt;A measurement&lt;/td&gt;
&lt;td&gt;An internal target&lt;/td&gt;
&lt;td&gt;A contract clause&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who owns it&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;Engineering and product&lt;/td&gt;
&lt;td&gt;Sales, legal and the CTO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who sees it&lt;/td&gt;
&lt;td&gt;The team&lt;/td&gt;
&lt;td&gt;The company&lt;/td&gt;
&lt;td&gt;The customer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;When it is missed&lt;/td&gt;
&lt;td&gt;Nothing, it is a fact&lt;/td&gt;
&lt;td&gt;The team shifts to reliability work&lt;/td&gt;
&lt;td&gt;You pay service credits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Example&lt;/td&gt;
&lt;td&gt;99.97% of API requests succeeded in the last 30 days&lt;/td&gt;
&lt;td&gt;99.95% of API requests succeed over 30 days&lt;/td&gt;
&lt;td&gt;99.9% monthly uptime, or 10% of the monthly fee back&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The rule of this article: measured &amp;gt; SLO &amp;gt; SLA.&lt;/p&gt;

&lt;p&gt;Your SLA is looser than your SLO, and your SLO is looser than what you measured. Each gap is your margin.&lt;/p&gt;

&lt;p&gt;The targets I set for a B2B SaaS product API: an SLO of 99.95% over a rolling 30 days and an SLA of 99.9% per calendar month, after 1 quarter of measuring.&lt;/p&gt;

&lt;p&gt;Below: how to define the SLI, how to pick the SLO, what an error budget buys you, what goes into the SLA clause, and the alerts that tell you before the customer does.&lt;/p&gt;

&lt;h2&gt;
  
  
  SLI, SLO and SLA are 3 layers of the same number
&lt;/h2&gt;

&lt;p&gt;Start from 1 user request.&lt;/p&gt;

&lt;p&gt;request → good or bad →&lt;br&gt;&lt;br&gt;
SLI: the share of good ones →&lt;br&gt;&lt;br&gt;
SLO: the share you aim for →&lt;br&gt;&lt;br&gt;
error budget: the bad ones you can afford →&lt;br&gt;&lt;br&gt;
SLA: the share you promise, with margin →&lt;br&gt;&lt;br&gt;
credits: what a miss costs you&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgxyzelbkjmo5dynuem81.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgxyzelbkjmo5dynuem81.webp" alt="Three stacked bands: SLI, the measurement, 99.97%; SLO, the target, 99.95%; SLA, the promise, 99.9%. An arrow beside them reads measure, target, promise." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The same number in 3 layers: the SLI you measured, the SLO you aim for, the SLA you promise. Each gap is margin.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Google's SRE book gives a 1 question test for telling an SLO from an SLA: "what happens if the SLOs aren't met?"&lt;/p&gt;

&lt;p&gt;If there is no explicit consequence, it is an SLO.&lt;/p&gt;

&lt;p&gt;If a contract names a consequence, usually money back, it is an SLA.&lt;/p&gt;

&lt;p&gt;So an SLA always contains an SLO. The reverse is optional, and for most of your services it should stay that way.&lt;/p&gt;

&lt;p&gt;SLO = a decision tool for you.&lt;/p&gt;

&lt;p&gt;SLA = a commitment to someone else.&lt;/p&gt;

&lt;p&gt;The same book defines an SLI as "a carefully defined quantitative measure of some aspect of the level of service". Carefully defined is the part that takes work, so it comes first.&lt;/p&gt;
&lt;h2&gt;
  
  
  An SLI is good events divided by all events
&lt;/h2&gt;

&lt;p&gt;SLI = good events / total events.&lt;/p&gt;

&lt;p&gt;That is the form Google's SRE workbook recommends, and it works for every kind of service:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service type&lt;/th&gt;
&lt;th&gt;SLI&lt;/th&gt;
&lt;th&gt;Good event&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;API or web app&lt;/td&gt;
&lt;td&gt;Availability&lt;/td&gt;
&lt;td&gt;A request answered without a server error&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API or web app&lt;/td&gt;
&lt;td&gt;Latency&lt;/td&gt;
&lt;td&gt;A request answered in under 300 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data pipeline&lt;/td&gt;
&lt;td&gt;Freshness&lt;/td&gt;
&lt;td&gt;A record processed within 10 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data pipeline&lt;/td&gt;
&lt;td&gt;Correctness&lt;/td&gt;
&lt;td&gt;A record with the right output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;Durability&lt;/td&gt;
&lt;td&gt;An object that can still be read&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;3 choices decide whether the number means anything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Measure where the user is.&lt;/strong&gt; The workbook uses load balancer metrics because they are "closer to the user's experience" than the application server's logs. A crashed pod reports no errors, and the load balancer in front of it does&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure a real user flow.&lt;/strong&gt; Login, the core API call, checkout. A health check on /health can be green while checkout fails&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a threshold for latency.&lt;/strong&gt; "Requests under 300 ms" is a ratio you can target. An average hides the slow 1% that your biggest customer lives in&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An availability SLI in Prometheus, from the request counter most HTTP frameworks already export:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sum(rate(http_requests_total{job="api",code!~"5.."}[30d]))
/
sum(rate(http_requests_total{job="api"}[30d]))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The query needs 30 days of metrics, and Prometheus keeps 15 days by default, so raise the retention first. If your ingress or load balancer exports its own request counter, count from that one.&lt;/p&gt;

&lt;p&gt;If you have no metrics yet, the load balancer's access logs give you the same 2 counts. The &lt;a href="https://meteorops.com/blog/how-to-build-a-startup-observability-stack" rel="noopener noreferrer"&gt;startup observability stack&lt;/a&gt; article covers the tooling.&lt;/p&gt;

&lt;p&gt;Rule: 2 SLIs per user-facing service, availability and latency. Add a third when a customer complains about something the first 2 missed.&lt;/p&gt;

&lt;h2&gt;
  
  
  An SLO is a target, a window, and an error budget
&lt;/h2&gt;

&lt;p&gt;SLO = SLI target + time window.&lt;/p&gt;

&lt;p&gt;"99.9% of API requests succeed, over a rolling 30 days."&lt;/p&gt;

&lt;p&gt;The workbook's general-purpose window is 4 weeks, rolling. I use 30 days because the cloud SLAs you depend on count in months.&lt;/p&gt;

&lt;p&gt;The useful half of an SLO is what it leaves over.&lt;/p&gt;

&lt;p&gt;Error budget = 1 minus the SLO.&lt;/p&gt;

&lt;p&gt;At 99.9% you may fail 0.1% of requests. With 10 million requests a month, that is 10,000 failed requests you are allowed.&lt;/p&gt;

&lt;p&gt;In time, over 30 days:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;SLO&lt;/th&gt;
&lt;th&gt;Error budget&lt;/th&gt;
&lt;th&gt;Full downtime it allows in 30 days&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;99%&lt;/td&gt;
&lt;td&gt;1%&lt;/td&gt;
&lt;td&gt;7 hours 12 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.5%&lt;/td&gt;
&lt;td&gt;0.5%&lt;/td&gt;
&lt;td&gt;3 hours 36 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.9%&lt;/td&gt;
&lt;td&gt;0.1%&lt;/td&gt;
&lt;td&gt;43 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.95%&lt;/td&gt;
&lt;td&gt;0.05%&lt;/td&gt;
&lt;td&gt;21 minutes 36 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.99%&lt;/td&gt;
&lt;td&gt;0.01%&lt;/td&gt;
&lt;td&gt;4 minutes 19 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;99.999%&lt;/td&gt;
&lt;td&gt;0.001%&lt;/td&gt;
&lt;td&gt;26 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3wtmancpmpolsv2p3cfl.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3wtmancpmpolsv2p3cfl.webp" alt="Bar chart titled Error budget = 1 minus the SLO, full downtime it allows in 30 days: 99% allows 7 hours 12 minutes, 99.9% allows 43 minutes, 99.95% allows 21 minutes 36 seconds, 99.99% allows 4 minutes 19 seconds." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Each extra 9 cuts the error budget by 10: from 7 hours 12 minutes at 99% to 4 minutes 19 seconds at 99.99%.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A request-based SLO spends the same budget in failed requests, so 10 minutes down at peak costs more than 10 minutes down at 3 AM.&lt;/p&gt;

&lt;p&gt;Read the table as a staffing plan.&lt;/p&gt;

&lt;p&gt;43 minutes covers 1 incident where a person is paged, wakes up, finds the cause and rolls back.&lt;/p&gt;

&lt;p&gt;4 minutes covers none. At 99.99% every recovery has to be automatic, because the budget is gone before a human opens the laptop.&lt;/p&gt;

&lt;p&gt;5 nines leaves 26 seconds a month. (Enough time to read the alert.)&lt;/p&gt;
&lt;h3&gt;
  
  
  How to pick the number
&lt;/h3&gt;

&lt;p&gt;Google's SRE book lists 5 rules for choosing targets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;"Don't pick a target based on current performance"&lt;/li&gt;
&lt;li&gt;"Keep it simple"&lt;/li&gt;
&lt;li&gt;"Avoid absolutes"&lt;/li&gt;
&lt;li&gt;"Have as few SLOs as possible"&lt;/li&gt;
&lt;li&gt;"Perfection can wait"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The workbook is blunter about the absolute: "100% reliability is the wrong target". A 100% target leaves no room for change, and change is the leading cause of outages.&lt;/p&gt;

&lt;p&gt;How I apply the 5 rules at a startup:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Measure the SLI for 4 weeks before choosing anything&lt;/li&gt;
&lt;li&gt;Ask what the user needs. An internal admin tool at 99% is fine. A payments API at 99% loses customers&lt;/li&gt;
&lt;li&gt;Start the product API at 99.9% while no SLA exists, and move to 99.95% before you sign a 99.9% SLA&lt;/li&gt;
&lt;li&gt;Promise 99.99% only when failover is automatic and a drill has proven it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The opposite mistake is real too. Google's SREs found that a service running far above its SLO teaches users to depend on the extra.&lt;/p&gt;

&lt;p&gt;Their fix for Chubby, an internal lock service: in a quarter with no real failure, they take the system down on purpose.&lt;/p&gt;

&lt;p&gt;At a startup the cheaper version is to spend the budget: ship faster, run the risky migration, do the cluster upgrade in daylight.&lt;/p&gt;

&lt;p&gt;An unspent error budget = features you didn't ship.&lt;/p&gt;
&lt;h2&gt;
  
  
  Check your SLA against the SLAs you run on
&lt;/h2&gt;

&lt;p&gt;Your service sits on top of other people's promises. Dependencies in a row multiply.&lt;/p&gt;

&lt;p&gt;The AWS numbers, from its SLA pages:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;AWS service&lt;/th&gt;
&lt;th&gt;Setup&lt;/th&gt;
&lt;th&gt;Monthly uptime in the SLA&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;EC2&lt;/td&gt;
&lt;td&gt;Instances in 2 or more availability zones&lt;/td&gt;
&lt;td&gt;99.99%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EC2&lt;/td&gt;
&lt;td&gt;A single instance&lt;/td&gt;
&lt;td&gt;99.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RDS&lt;/td&gt;
&lt;td&gt;Multi-AZ&lt;/td&gt;
&lt;td&gt;99.95%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RDS&lt;/td&gt;
&lt;td&gt;Single instance&lt;/td&gt;
&lt;td&gt;99.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Elastic Load Balancing&lt;/td&gt;
&lt;td&gt;Across 2 or more availability zones&lt;/td&gt;
&lt;td&gt;99.99%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A request that needs the load balancer, the compute and the database:&lt;/p&gt;

&lt;p&gt;99.99% × 99.99% × 99.95% = 99.93%&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwofg9qkeern1newikmtu.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwofg9qkeern1newikmtu.webp" alt="Three chain links titled Dependencies in a row multiply: load balancer 99.99% times compute 99.99% times database 99.95% equals 99.93%, what the cloud commits to." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Dependencies in a row multiply: 3 AWS SLAs of 99.99%, 99.99% and 99.95% leave 99.93%.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That is what the cloud commits to before your own code fails once: the level AWS pays credits below.&lt;/p&gt;

&lt;p&gt;An SLA of 99.95% on top of it is a promise your suppliers never made to you.&lt;/p&gt;

&lt;p&gt;Run the database on a single instance and the chain drops to about 99.48%. Signing 99.9% on that setup is a bet.&lt;/p&gt;

&lt;p&gt;The provider's SLA is the floor it pays for missing. Real availability is usually higher, and your measurement is how you find out by how much.&lt;/p&gt;

&lt;p&gt;Redundancy is the lever that raises the ceiling, and it has a price. The &lt;a href="https://meteorops.com/blog/rto-vs-rpo" rel="noopener noreferrer"&gt;RTO vs RPO&lt;/a&gt; article lays out what each level costs.&lt;/p&gt;
&lt;h2&gt;
  
  
  An SLA is an SLO with a price
&lt;/h2&gt;

&lt;p&gt;An SLA clause has 6 parts. Check each one before you sign, on either side of the table:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The metric:&lt;/strong&gt; what counts as "available", and who measures it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The window:&lt;/strong&gt; usually a calendar month&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The target:&lt;/strong&gt; the percentage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The exclusions:&lt;/strong&gt; scheduled maintenance, the customer's own outages, beta features, force majeure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The remedy:&lt;/strong&gt; a service credit schedule&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The claim process:&lt;/strong&gt; who has to notice, and by when&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AWS's EC2 SLA is a good model to read, because it is short:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Monthly uptime of the region&lt;/th&gt;
&lt;th&gt;Service credit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Below 99.99%, down to 99.0%&lt;/td&gt;
&lt;td&gt;10%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Below 99.0%, down to 95.0%&lt;/td&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Below 95.0%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;2 details in it are worth copying.&lt;/p&gt;

&lt;p&gt;The remedy is a credit against future bills, 100% of that month's EC2 charge at most.&lt;/p&gt;

&lt;p&gt;The customer has to claim it: a support case, received by the end of the second billing cycle after the incident. A credit nobody claims is never paid.&lt;/p&gt;

&lt;p&gt;Which also means: if your cloud bill is large and your region had a bad month, someone on your team should be opening that case.&lt;/p&gt;
&lt;h3&gt;
  
  
  A clause to hand your lawyer
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Provider will make the Service available with a Monthly Uptime Percentage of at least 99.9%. Monthly Uptime Percentage is the share of minutes in a calendar month in which the production API, measured at Provider's load balancer, answers at least 99% of requests with a response other than a 5xx error. Minutes in which the Service is unreachable count as unavailable. Scheduled maintenance announced 72 hours ahead, failures caused by Customer's systems, beta features and force majeure events are excluded. If the Monthly Uptime Percentage falls below 99.9%, Customer may request a service credit of 10% of that month's fee, or 25% if it falls below 99.0%. Requests must be made within 30 days of the end of the month. Service credits are Customer's sole and exclusive remedy for a failure to meet this commitment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is a draft for your lawyer, with the engineering parts already in: a metric defined per minute, a named measuring point, a window, the exclusions and a remedy with a ceiling.&lt;/p&gt;

&lt;p&gt;Track it on its own dashboard. The SLA counts calendar months and the SLO counts a rolling 30 days, so the 2 numbers differ on most days.&lt;/p&gt;

&lt;p&gt;The 3 rules I hold when sales brings a contract:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SLA = SLO minus margin.&lt;/strong&gt; Google Cloud's SRE fundamentals post gives an SLA of 99.9% backed by an internal SLO of 99.95%. You can spend the whole SLO budget and still have half the SLA's budget left&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Promise what a quarter of measurement has shown.&lt;/strong&gt; A number copied from a competitor's pricing page is a guess&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Price the extra 9.&lt;/strong&gt; A customer who needs 99.99% is asking for a second availability zone everywhere, automatic failover and 24/7 on-call. That is a different tier with a different price&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;a href="https://meteorops.com/glossary/service-level-agreement-sla" rel="noopener noreferrer"&gt;SLA glossary entry&lt;/a&gt; has the shorter definition if you need to send one to a colleague.&lt;/p&gt;
&lt;h2&gt;
  
  
  Alert on how fast the error budget burns
&lt;/h2&gt;

&lt;p&gt;An SLO gives you the 1 alert worth waking up for: the budget is burning too fast.&lt;/p&gt;

&lt;p&gt;The workbook's definition: "Burn rate is how fast, relative to the SLO, the service consumes the error budget."&lt;/p&gt;

&lt;p&gt;Burn rate 1 = the budget lasts exactly the 30 days.&lt;/p&gt;

&lt;p&gt;Burn rate 10 = it is gone in 3 days.&lt;/p&gt;

&lt;p&gt;Burn rate 1,000 = everything is failing, and a 99.9% budget is gone in 43 minutes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4arh1ztcprzkwpanth0q.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4arh1ztcprzkwpanth0q.webp" alt="Line chart titled How fast the error budget burns: at burn rate 1 the budget lasts 30 days, at burn rate 10 it lasts 3 days, at burn rate 1,000 it is gone in 43 minutes." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Burn rate is the slope of the error budget: 30 days at 1, 3 days at 10, 43 minutes at 1,000.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The alert setup Google recommends for a 99.9% SLO:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Burn rate&lt;/th&gt;
&lt;th&gt;Long window&lt;/th&gt;
&lt;th&gt;Short window&lt;/th&gt;
&lt;th&gt;Budget consumed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Page&lt;/td&gt;
&lt;td&gt;14.4&lt;/td&gt;
&lt;td&gt;1 hour&lt;/td&gt;
&lt;td&gt;5 minutes&lt;/td&gt;
&lt;td&gt;2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Page&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;6 hours&lt;/td&gt;
&lt;td&gt;30 minutes&lt;/td&gt;
&lt;td&gt;5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ticket&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;3 days&lt;/td&gt;
&lt;td&gt;6 hours&lt;/td&gt;
&lt;td&gt;10%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The long window proves the problem is real. The short window proves it is still happening, so the page stops soon after the fix.&lt;/p&gt;

&lt;p&gt;The paging rule in Prometheus, in the workbook's shorthand (0.001 is the error budget of a 99.9% SLO; for 99.95% use 0.0005):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;expr: (
        job:slo_errors_per_request:ratio_rate1h{job="myjob"} &amp;gt; (14.4*0.001)
      and
        job:slo_errors_per_request:ratio_rate5m{job="myjob"} &amp;gt; (14.4*0.001)
      )
    or
      (
        job:slo_errors_per_request:ratio_rate6h{job="myjob"} &amp;gt; (6*0.001)
      and
        job:slo_errors_per_request:ratio_rate30m{job="myjob"} &amp;gt; (6*0.001)
      )
severity: page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each &lt;code&gt;ratio_rate&lt;/code&gt; series is a &lt;a href="https://meteorops.com/glossary/prometheus-recording-rule" rel="noopener noreferrer"&gt;recording rule&lt;/a&gt;: errors divided by requests over that window.&lt;/p&gt;

&lt;p&gt;2 pages and 1 ticket replace the CPU and memory pages that wake people for things users never felt. Disk space and certificate expiry stay as tickets.&lt;/p&gt;

&lt;p&gt;That swap is most of the cure for &lt;a href="https://meteorops.com/blog/how-to-handle-alert-fatigue" rel="noopener noreferrer"&gt;alert fatigue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One warning for small products, with the workbook's own numbers: at 10 requests an hour, 1 failed request is a burn rate of 1,000.&lt;/p&gt;

&lt;p&gt;Its options: synthetic traffic, combining small services into 1 SLO, or lowering the SLO or lengthening its window. I start with the longer window.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decide what happens when the budget runs out
&lt;/h2&gt;

&lt;p&gt;An SLO with no consequence inside the company is a dashboard.&lt;/p&gt;

&lt;p&gt;The consequence is an error budget policy, agreed while everyone is calm. Google publishes its example, and 3 lines carry it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Budget spent:&lt;/strong&gt; "we will halt all changes and releases other than P0 issues or security fixes until the service is back within its SLO"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1 incident eats more than 20% of the budget:&lt;/strong&gt; the team must conduct a &lt;a href="https://meteorops.com/glossary/postmortem" rel="noopener noreferrer"&gt;postmortem&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The teams disagree:&lt;/strong&gt; "the issue should be escalated to the CTO to make a decision"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The startup version I use fits in 4 lines:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Budget left: ship whenever you want&lt;/li&gt;
&lt;li&gt;Half the budget gone in the first week: the on-call engineer reviews every deploy until the window recovers&lt;/li&gt;
&lt;li&gt;Budget spent: the next sprint's first items are reliability work&lt;/li&gt;
&lt;li&gt;1 incident over 20% of the budget: a written postmortem with 1 fix that gets done&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why does a CTO want this? Because "should we slow down and fix reliability" stops being an argument between product and engineering.&lt;/p&gt;

&lt;p&gt;The number answers it every Monday.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://meteorops.com/glossary/error-budget" rel="noopener noreferrer"&gt;error budget&lt;/a&gt; is the only reliability metric I know that tells a team when to go faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  The SLO document, on 1 page
&lt;/h2&gt;

&lt;p&gt;1 page per user-facing service, under 8 headings:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Service and user flow:&lt;/strong&gt; what the user is doing ("call the public API")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SLI:&lt;/strong&gt; the good event, the total event, and the query that counts both&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SLO:&lt;/strong&gt; the target and the window&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error budget:&lt;/strong&gt; in requests and in minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alerts:&lt;/strong&gt; the burn rates that page and the one that opens a ticket&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy:&lt;/strong&gt; what happens at half spent and at fully spent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External SLA:&lt;/strong&gt; the number in contracts, and the margin to the SLO&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Owner and review date:&lt;/strong&gt; a name, and a quarterly check that the target still matches what users need&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Heading 7 is the one sales should read before the next enterprise call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistakes I keep seeing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;An SLA signed before any SLI exists:&lt;/strong&gt; the first measurement arrives with the customer's complaint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SLA equal to the SLO:&lt;/strong&gt; every internal miss is a contract breach&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The SLO copied from last month's graph:&lt;/strong&gt; current performance is where you start measuring, and the user's need is what sets the target&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A 100% target:&lt;/strong&gt; no deploy is safe under it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uptime measured by a ping on /health:&lt;/strong&gt; the health check passes while the checkout fails&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Average latency as the SLI:&lt;/strong&gt; the slowest 1% is invisible in it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;15 SLOs per service:&lt;/strong&gt; nobody can say which one matters during an incident&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;99.99% promised on a single database instance:&lt;/strong&gt; the supplier's own SLA for it is 99.5%&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud credits nobody claims:&lt;/strong&gt; the provider waits for your support case&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;p&gt;Always:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define 2 SLIs per user-facing service: availability and latency, as good events over total events&lt;/li&gt;
&lt;li&gt;Measure at the load balancer, on a real user flow&lt;/li&gt;
&lt;li&gt;Measure for 4 weeks before setting a target&lt;/li&gt;
&lt;li&gt;Set 1 SLO per SLI with a 30 day window, and write the error budget in minutes and in requests&lt;/li&gt;
&lt;li&gt;Multiply your dependencies' SLAs and check the SLA you sign sits under the result&lt;/li&gt;
&lt;li&gt;Page on burn rate 14.4 and 6, ticket on burn rate 1&lt;/li&gt;
&lt;li&gt;Write the error budget policy before the first incident&lt;/li&gt;
&lt;li&gt;Sign an SLA only with a quarter of measurements behind it, looser than the SLO&lt;/li&gt;
&lt;li&gt;Put exclusions, a credit schedule, a claim deadline and a sole remedy line in every SLA&lt;/li&gt;
&lt;li&gt;Review each SLO every quarter with product in the room&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What's the difference between SLOs and SLAs?
&lt;/h3&gt;

&lt;p&gt;An SLO is an internal target your team sets for a service. An SLA is a contract with a customer that includes a consequence, usually service credits, for missing a target. Set the SLO tighter than the SLA, so you find out about a problem before it costs you money.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is an SLO part of an SLA?
&lt;/h3&gt;

&lt;p&gt;Yes. Every SLA contains at least 1 objective, the number being promised, plus the consequence for missing it. Most SLOs have no SLA around them: they exist so the team can decide between shipping and fixing.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between SLI, SLO and SLA?
&lt;/h3&gt;

&lt;p&gt;The SLI is the measurement (99.97% of requests succeeded). The SLO is the target on it (99.95% over 30 days). The SLA is the promise to a customer (99.9% monthly, or credits). Measure, target, promise, in that order.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is an example of an SLO?
&lt;/h3&gt;

&lt;p&gt;"99.9% of requests to the public API return a successful response, measured at the load balancer over a rolling 30 days." A latency SLO for the same service: "95% of requests complete in under 300 ms over a rolling 30 days."&lt;/p&gt;

&lt;h3&gt;
  
  
  What is an error budget?
&lt;/h3&gt;

&lt;p&gt;1 minus the SLO. A 99.9% SLO leaves a budget of 0.1%: about 43 minutes of full downtime in 30 days, or 10,000 failed requests out of 10 million. While budget remains the team ships; when it is spent the team works on reliability.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which comes first, the SLO or the SLA?
&lt;/h3&gt;

&lt;p&gt;The SLO, with the SLI before it. Run the SLO for a quarter, see what you achieve, then offer an SLA with margin below it. An SLA signed first means the customer's contract is setting your engineering priorities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does every service need an SLA?
&lt;/h3&gt;

&lt;p&gt;No. Internal services and free tiers run on SLOs alone. Sign an SLA when a paying customer asks for one, and only for the service that customer uses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is 99.9% uptime good?
&lt;/h3&gt;

&lt;p&gt;For most B2B SaaS products, yes. It allows 43 minutes of downtime in 30 days, which a small on-call team can meet with 1 region and 2 availability zones. 99.99% allows 4 minutes and needs automatic failover everywhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who owns the SLO?
&lt;/h3&gt;

&lt;p&gt;The team that runs the service owns the measurement and the alerts. Product agrees to the target, because the target decides how much time goes to features. The CTO owns the tie-break, and signs off on any SLA built on top.&lt;/p&gt;

&lt;h2&gt;
  
  
  A recap
&lt;/h2&gt;

&lt;p&gt;If you take away 1 thing, let it be this: measured &amp;gt; SLO &amp;gt; SLA.&lt;/p&gt;

&lt;p&gt;Measure the SLI where the user is. Set the SLO from what the user needs.&lt;/p&gt;

&lt;p&gt;Spend the error budget on shipping. Page on the burn rate.&lt;/p&gt;

&lt;p&gt;Sign the SLA last, with margin.&lt;/p&gt;

&lt;p&gt;You don't NEED a DevOps expert for the first SLO. A load balancer log, a spreadsheet and 4 weeks get you the first honest number.&lt;/p&gt;

&lt;p&gt;If you would rather set it up with a team that has worked with 200+ companies, &lt;a href="https://meteorops.com/devops-setup-for-production-free-consultation" rel="noopener noreferrer"&gt;book a free production setup consultation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;P.S. The on-call rotation that answers those 2 pages is its own design problem. I wrote about it in &lt;a href="https://meteorops.com/blog/how-to-design-on-call-before-you-hire-sre" rel="noopener noreferrer"&gt;how to design on-call before you hire an SRE&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>sre</category>
      <category>startup</category>
      <category>management</category>
    </item>
    <item>
      <title>DevOps as a Service: What It Is, Costs, and When to Use It</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Thu, 12 Nov 2026 07:30:12 +0000</pubDate>
      <link>https://dev.to/meteorops/devops-as-a-service-what-it-is-costs-and-when-to-use-it-214f</link>
      <guid>https://dev.to/meteorops/devops-as-a-service-what-it-is-costs-and-when-to-use-it-214f</guid>
      <description>&lt;p&gt;&lt;em&gt;This guide was written by &lt;a href="https://meteorops.com/team/arthur-azrieli" rel="noopener noreferrer"&gt;Arthur Azrieli&lt;/a&gt;, CTO at MeteorOps, and first published on the &lt;a href="https://meteorops.com/blog/devops-team-vs-devops-as-a-service" rel="noopener noreferrer"&gt;MeteorOps blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;DevOps as a Service (DaaS) means an outside team of DevOps engineers builds and runs your delivery and cloud operations for a recurring fee: CI/CD pipelines, infrastructure as code, Kubernetes or other runtimes, monitoring, security baselines and cost control. You get a team's skills for less than a team's payroll. In exchange, you have to manage the ownership, access and exit terms carefully.&lt;/p&gt;

&lt;p&gt;It beats hiring when your DevOps workload is real but not big enough for two or three full-time specialists. It also fits when you need senior skills faster than you can recruit them, or when one engineer is currently the only person who understands production. It loses to hiring when infrastructure is your product, when the work is constant and deep enough to keep a team busy, or when nobody inside the company can own decisions about the platform.&lt;/p&gt;

&lt;p&gt;This guide is for founders, CTOs and engineering leaders deciding how to cover DevOps. It covers what DaaS actually includes, the delivery models providers sell under that name, how pricing works and how to compare it with the true cost of hiring, a decision checklist, contract safeguards, and how to run the first 90 days.&lt;/p&gt;

&lt;h2&gt;
  
  
  What DevOps as a Service actually includes
&lt;/h2&gt;

&lt;p&gt;"DevOps as a Service" gets used for three different things, which is why the search results feel contradictory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A managed engineering service.&lt;/strong&gt; A provider's engineers work on your cloud accounts, repositories and pipelines on an ongoing basis. This is what most buyers mean, and what this guide is about.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A hosted toolchain.&lt;/strong&gt; GitHub, GitLab, Azure DevOps or AWS developer tools sold as SaaS. Useful, but that is buying tools, not getting DevOps done.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A platform product.&lt;/strong&gt; An internal developer platform or "platform as a service" that hides infrastructure behind a portal. It reduces DevOps work for product teams, but someone still has to run it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A serious DaaS engagement usually covers these workstreams. Most companies need four or five of them, not all eight:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workstream&lt;/th&gt;
&lt;th&gt;What the provider does&lt;/th&gt;
&lt;th&gt;What you should get to keep&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud foundation&lt;/td&gt;
&lt;td&gt;Account structure, networking, identity and access, landing zone, environments&lt;/td&gt;
&lt;td&gt;Infrastructure as code in your repositories, an access model diagram&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure as code&lt;/td&gt;
&lt;td&gt;Terraform or OpenTofu modules, state management, review workflow&lt;/td&gt;
&lt;td&gt;Modules your engineers can read and change through pull requests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI/CD&lt;/td&gt;
&lt;td&gt;Build, test and deploy pipelines, environment promotion, rollback&lt;/td&gt;
&lt;td&gt;Pipeline definitions in your repositories, a documented release process&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime&lt;/td&gt;
&lt;td&gt;Kubernetes, ECS, Cloud Run or VM operations, upgrades, autoscaling&lt;/td&gt;
&lt;td&gt;Upgrade runbooks, a version and support calendar&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Observability&lt;/td&gt;
&lt;td&gt;Metrics, logs, traces, dashboards, alert rules&lt;/td&gt;
&lt;td&gt;Alerts that page the right owner, dashboards per service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reliability and on-call&lt;/td&gt;
&lt;td&gt;Incident response, postmortems, backup and restore testing&lt;/td&gt;
&lt;td&gt;Runbooks, tested restore procedures, an escalation policy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security and compliance&lt;/td&gt;
&lt;td&gt;Secrets management, least privilege, vulnerability scanning, audit evidence&lt;/td&gt;
&lt;td&gt;Evidence that maps to your SOC 2 or ISO 27001 controls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost control&lt;/td&gt;
&lt;td&gt;Tagging, rightsizing, commitments, budgets and alerts&lt;/td&gt;
&lt;td&gt;A cost report your finance team can read, owners per cost line&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Look at the last column. It is the real test of a DaaS provider. The fee buys work, but the value you keep is the code, documentation and operating habits that stay when the engagement ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four ways to get DevOps covered
&lt;/h2&gt;

&lt;p&gt;DaaS is one of four models. The difference that matters most is who owns the outcome and who directs the work day to day.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;In-house DevOps team&lt;/th&gt;
&lt;th&gt;DevOps as a Service&lt;/th&gt;
&lt;th&gt;Staff augmentation&lt;/th&gt;
&lt;th&gt;Project consulting&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Who directs the work&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;td&gt;Shared: you set priorities, the provider plans and executes&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;td&gt;The provider, against a defined goal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who owns production outcomes&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;td&gt;Shared, defined in the contract&lt;/td&gt;
&lt;td&gt;You&lt;/td&gt;
&lt;td&gt;You, after handover&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical commitment&lt;/td&gt;
&lt;td&gt;Permanent headcount&lt;/td&gt;
&lt;td&gt;Monthly, ongoing&lt;/td&gt;
&lt;td&gt;Monthly per engineer&lt;/td&gt;
&lt;td&gt;Fixed scope and timeline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Time to first useful work&lt;/td&gt;
&lt;td&gt;Months (hiring plus ramp-up)&lt;/td&gt;
&lt;td&gt;Days to weeks&lt;/td&gt;
&lt;td&gt;Weeks&lt;/td&gt;
&lt;td&gt;Weeks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Breadth of skills&lt;/td&gt;
&lt;td&gt;Whatever you hired&lt;/td&gt;
&lt;td&gt;A bench of specialists behind your main engineer&lt;/td&gt;
&lt;td&gt;One person's skills&lt;/td&gt;
&lt;td&gt;Whatever the project needs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Main risk&lt;/td&gt;
&lt;td&gt;Slow hiring, single points of failure&lt;/td&gt;
&lt;td&gt;Knowledge staying with the provider&lt;/td&gt;
&lt;td&gt;You still need to manage and review the work&lt;/td&gt;
&lt;td&gt;Handover to nobody&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best for&lt;/td&gt;
&lt;td&gt;Large, constant platform work&lt;/td&gt;
&lt;td&gt;Startups and scale-ups without a full DevOps team&lt;/td&gt;
&lt;td&gt;A known backlog and a capacity gap&lt;/td&gt;
&lt;td&gt;A migration or a one-off build&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fquaybe02mv6g5rl465cg.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fquaybe02mv6g5rl465cg.webp" alt="Comparison of four ways to get DevOps covered: an in-house DevOps team, DevOps as a Service, staff augmentation and project consulting, showing who directs the work, who owns outcomes and the time to first useful work for each." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;DevOps as a Service is the only model where direction and ownership are shared, and it starts in days to weeks.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Many companies combine them: DaaS to stabilize and build the foundation, then one internal hire who takes over day-to-day ownership while the provider stays on for depth and coverage. If the staff augmentation column looks closer to what you need, read &lt;a href="https://meteorops.com/blog/how-to-choose-a-staff-augmentation-company" rel="noopener noreferrer"&gt;how to choose a staff augmentation company&lt;/a&gt;. For a project with a clear end, read &lt;a href="https://meteorops.com/blog/how-to-choose-a-devops-consulting-service" rel="noopener noreferrer"&gt;how to choose a DevOps consulting service&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When DevOps as a Service beats hiring
&lt;/h2&gt;

&lt;p&gt;DaaS is usually the better choice when most of these are true:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The workload is real but uneven.&lt;/strong&gt; Some months bring a migration, a compliance audit or a Kubernetes upgrade. Other months are mostly maintenance. A full-time hire is either overloaded or underused.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You need breadth one person cannot have.&lt;/strong&gt; Networking, Kubernetes internals, Terraform design, database operations, security and cost optimization rarely sit in one head.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Production depends on one person.&lt;/strong&gt; If your only infrastructure engineer goes on holiday and deploys stop, you have a bus factor of one. A provider gives you coverage and a second pair of eyes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hiring is slow or risky.&lt;/strong&gt; Senior DevOps engineers are hard to assess if nobody on your team is senior in DevOps. A bad hire with production access is expensive to undo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You are early.&lt;/strong&gt; Teams of roughly 5 to 40 engineers usually do not need a dedicated platform team yet, but they do need production-grade foundations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When hiring wins
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Infrastructure is part of what you sell (a data platform, a developer tool, a hosting product).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The work is constant and deep enough to keep two or more specialists busy all year.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regulation or customer contracts prevent outside parties from accessing production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You are building a platform team that will serve many product teams, and you want it to grow with the company.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even then, a provider often helps for the first months: setting up the foundations, helping you interview candidates and handing over to the new team. If you are unsure how much DevOps work you actually have, &lt;a href="https://meteorops.com/blog/calculating-your-companys-required-devops-capacity" rel="noopener noreferrer"&gt;estimate your required DevOps capacity&lt;/a&gt; before deciding. The &lt;a href="https://meteorops.com/blog/how-to-build-a-devops-team" rel="noopener noreferrer"&gt;guide to building a DevOps team&lt;/a&gt; covers the hiring path.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much DevOps as a Service costs
&lt;/h2&gt;

&lt;p&gt;Providers rarely publish prices, and the ones that do are not comparable, because "a plan" can mean ten hours or a full-time engineer. What you can compare is the pricing model and what it includes.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pricing model&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Good for&lt;/th&gt;
&lt;th&gt;Watch for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Monthly hours plan&lt;/td&gt;
&lt;td&gt;A fixed block of engineering hours per month, often with tiers&lt;/td&gt;
&lt;td&gt;Ongoing work with uneven demand&lt;/td&gt;
&lt;td&gt;Unused-hour expiry, response times outside the plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dedicated engineer&lt;/td&gt;
&lt;td&gt;One or more named engineers at a monthly rate&lt;/td&gt;
&lt;td&gt;Steady workload, deep context&lt;/td&gt;
&lt;td&gt;Whether a senior backs up the engineer, cover during leave&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed service with service levels&lt;/td&gt;
&lt;td&gt;A fee per environment or service, with uptime and response commitments&lt;/td&gt;
&lt;td&gt;Operations you never want to think about&lt;/td&gt;
&lt;td&gt;What counts as "in scope", penalties that are only credits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fixed-price project plus retainer&lt;/td&gt;
&lt;td&gt;A defined build, then a smaller monthly plan to run it&lt;/td&gt;
&lt;td&gt;Foundations, migrations&lt;/td&gt;
&lt;td&gt;Change requests, who fixes defects after go-live&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pay per hour&lt;/td&gt;
&lt;td&gt;Billed monthly for hours worked&lt;/td&gt;
&lt;td&gt;Advisory work, small or unpredictable needs&lt;/td&gt;
&lt;td&gt;Availability when you need someone urgently&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Compare it with the real cost of hiring
&lt;/h3&gt;

&lt;p&gt;The fair comparison is not a provider's monthly fee against a salary. It is against the full cost of covering the same work in-house:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Loaded salary.&lt;/strong&gt; The US Bureau of Labor Statistics puts the median software developer wage at $135,980 (&lt;a href="https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm" rel="noopener noreferrer"&gt;May 2025&lt;/a&gt;). Experienced DevOps and platform engineers are often above that median. Wages are about 70% of total employer compensation cost in US private industry (&lt;a href="https://www.bls.gov/news.release/ecec.nr0.htm" rel="noopener noreferrer"&gt;BLS, June 2026&lt;/a&gt;), so a $136,000 salary is roughly $194,000 in total cost before recruiting, equipment and tooling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recruiting and ramp-up.&lt;/strong&gt; Recruiter fees, interview time from your senior engineers, and the months before a new hire is fully productive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Coverage.&lt;/strong&gt; One engineer is not on-call coverage. Real coverage for production needs at least two people who can respond, or an escalation path to someone outside.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Breadth gaps.&lt;/strong&gt; The specialist work your hire cannot do still needs a consultant, so add a buffer for it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost of mistakes.&lt;/strong&gt; Outages, security incidents and cloud waste from missing experience are real costs, even if they never appear in a budget line.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu3b2la0uxtsm44uvlnzi.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu3b2la0uxtsm44uvlnzi.webp" alt="Bar chart showing a $136,000 salary becoming about $194,000 in total cost because wages are about 70% of total cost, with recruiting and ramp-up, coverage, breadth gaps and cost of mistakes stacked on top as the real cost to compare." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Compare a provider's quote with the full stack of hiring costs, not with the salary alone.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Put a one-year number on each line, then ask providers to quote the same scope. If the provider costs more but removes the coverage gap and the breadth gap, it can still be the cheaper option. If you have constant work for two engineers, hiring usually wins on cost within a year or two. To see how MeteorOps structures engagements, see the &lt;a href="https://meteorops.com/plans-pricing" rel="noopener noreferrer"&gt;plans and pricing page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision checklist: DaaS, hire, or both
&lt;/h2&gt;

&lt;p&gt;Answer these honestly. Each "yes" in the left group points toward DevOps as a Service, and each "yes" in the right group points toward hiring.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Points to DevOps as a Service&lt;/th&gt;
&lt;th&gt;Points to hiring&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fewer than about 40 engineers, no platform team yet&lt;/td&gt;
&lt;td&gt;Several product teams that need a shared platform&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workload swings with launches, audits and migrations&lt;/td&gt;
&lt;td&gt;Constant workload for two or more specialists&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Only one person understands production today&lt;/td&gt;
&lt;td&gt;You already have DevOps people who need reinforcement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You need results this quarter&lt;/td&gt;
&lt;td&gt;You can wait three to six months for a hire to ramp up&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You need several specialties occasionally&lt;/td&gt;
&lt;td&gt;You need one specialty all the time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nobody internal can assess DevOps candidates&lt;/td&gt;
&lt;td&gt;A senior engineer can run the hiring process&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A mixed result is common and usually means "both": a provider now, and a plan to hire one owner who works alongside them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flddx5vtn8g3use58b9bb.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flddx5vtn8g3use58b9bb.webp" alt="Balance scale weighing signals that point to DevOps as a Service, such as fewer than about 40 engineers and workload swings, against signals that point to hiring, such as several product teams and constant work for two or more, with a mixed result meaning a provider now and one owner later." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Count the yes answers on each side; a mixed result usually means using both.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What good DevOps as a Service looks like in practice
&lt;/h2&gt;

&lt;p&gt;These are the signals that a provider runs DaaS as engineering, not as a ticket desk:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Everything lands in your repositories.&lt;/strong&gt; Terraform, pipeline files, Helm charts and runbooks live in your Git organization and go through your pull request reviews.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Access is personal and least privilege.&lt;/strong&gt; Each engineer has their own identity through your identity provider or AWS IAM Identity Center. Nobody shares root credentials or long-lived access keys.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A named lead engineer, with seniors behind them.&lt;/strong&gt; You know who works on your systems, and design reviews involve someone more senior than the person doing the work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visible work.&lt;/strong&gt; A shared backlog, short written updates, and decisions recorded where your team can find them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Measured outcomes.&lt;/strong&gt; Progress is tracked with delivery metrics such as the five &lt;a href="https://dora.dev/guides/dora-metrics/" rel="noopener noreferrer"&gt;DORA metrics&lt;/a&gt; (change lead time, deployment frequency, failed deployment recovery time, change fail rate and deployment rework rate), plus cloud cost and incident trends. Hours logged and tickets closed do not count as outcomes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Your team gets more capable.&lt;/strong&gt; Your developers can deploy, read dashboards and handle common incidents without asking the provider.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Contract safeguards before you sign
&lt;/h2&gt;

&lt;p&gt;DaaS contracts fail at the edges: who owns what, how fast someone responds, and how you leave. Check these clauses:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Clause&lt;/th&gt;
&lt;th&gt;What to look for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Intellectual property&lt;/td&gt;
&lt;td&gt;All code, configuration and documentation created for you belongs to you, with no license fees to keep using it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access and credentials&lt;/td&gt;
&lt;td&gt;Your identity provider, individual accounts, removal on exit, no provider-owned accounts in your production path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scope and response times&lt;/td&gt;
&lt;td&gt;What is included, what is extra, and response times for production incidents in writing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Named people&lt;/td&gt;
&lt;td&gt;Who your lead engineer is, notice before they change, and how a replacement gets onboarded&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security and confidentiality&lt;/td&gt;
&lt;td&gt;Handling of secrets and customer data, background checks, and support for your audits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exit and handover&lt;/td&gt;
&lt;td&gt;A handover period, final documentation, access removal and a reasonable notice period&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Commitment&lt;/td&gt;
&lt;td&gt;Minimum term, how to scale hours up or down, and what happens to unused hours&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A provider that resists the exit clause is telling you how the relationship will end. A good one plans for its own replacement from the first week.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first 90 days of a DevOps as a Service engagement
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Days 1 to 14: access and assessment.&lt;/strong&gt; Set up individual access, review cloud accounts, repositories, pipelines, monitoring, incident history and the cloud bill. The output should be a written list of risks ranked by impact, not a new architecture.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Days 15 to 45: reduce the biggest risks.&lt;/strong&gt; Typical first fixes: backups that are actually restorable, removing shared admin access, moving unmanaged production resources into infrastructure as code, alerts on customer-facing symptoms, and a rollback path for deployments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Days 46 to 75: speed up delivery.&lt;/strong&gt; Faster, more reliable pipelines, preview or staging environments that match production, and fewer manual release steps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Days 76 to 90: review and plan.&lt;/strong&gt; Compare the delivery metrics, incident count and cloud spend against day 1. Agree on the next quarter's priorities and adjust the plan size up or down.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqe4ka0bo7dkovebogsfh.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqe4ka0bo7dkovebogsfh.webp" alt="Timeline of the first 90 days of a DevOps as a Service engagement: days 1 to 14 access and assessment, days 15 to 45 reduce the biggest risks, days 46 to 75 speed up delivery, days 76 to 90 review and plan." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A good engagement starts with a ranked risk list and earns the right to speed things up.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If the first two weeks produce a sales proposal for a large rebuild instead of a ranked risk list, slow down. A &lt;a href="https://meteorops.com/assessments/devops-maturity" rel="noopener noreferrer"&gt;DevOps maturity assessment&lt;/a&gt; is a cheap way to get a baseline before you commit to anything larger.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common mistakes with DevOps as a Service
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Outsourcing ownership along with the work.&lt;/strong&gt; Someone inside the company still has to make product and risk decisions about production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Treating the provider as a ticket queue.&lt;/strong&gt; If every change waits for a ticket to be picked up, delivery slows down. Ask for self-service paths for your developers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Letting infrastructure live in the provider's accounts.&lt;/strong&gt; Cloud accounts, domains, repositories and secrets stores should be yours from the start.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Buying tools before defining problems.&lt;/strong&gt; New platforms do not fix unclear ownership or missing runbooks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No exit plan.&lt;/strong&gt; If you could not switch providers in a month, you are locked in, whatever the contract says.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is DevOps as a Service?
&lt;/h3&gt;

&lt;p&gt;DevOps as a Service is an outsourced model where an external team builds and operates your delivery pipelines, cloud infrastructure, monitoring and related practices for an ongoing fee. Unlike buying DevOps tools, you are buying engineers' time and expertise, delivered inside your own accounts and repositories.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is DevOps as a Service the same as managed DevOps services?
&lt;/h3&gt;

&lt;p&gt;Mostly, yes. "Managed DevOps services" usually puts more emphasis on running existing systems against service levels, while "DevOps as a Service" also covers building new foundations. In practice, check the scope and response terms rather than the label.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does DevOps as a Service cost?
&lt;/h3&gt;

&lt;p&gt;It depends on the pricing model (hours plan, dedicated engineer, managed service or project) and the scope. Compare quotes against the full one-year cost of hiring: loaded salary, recruiting, ramp-up, on-call coverage and the specialist help a single hire would still need.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is DevOps as a Service worth it for a small team?
&lt;/h3&gt;

&lt;p&gt;For teams without a dedicated DevOps engineer, it usually is, because one hire cannot cover all the specialties or provide on-call coverage alone. It is less attractive if your workload is small enough for a few hours of advice a month, or large and constant enough for two full-time hires.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can a DevOps as a Service provider work alongside our in-house engineers?
&lt;/h3&gt;

&lt;p&gt;Yes, and that is often the best setup. The provider brings depth and coverage, while your engineers keep product context and ownership. Make sure work goes through the same repositories, reviews and backlog.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the risks of DevOps as a Service?
&lt;/h3&gt;

&lt;p&gt;The main risks are knowledge staying with the provider, broad access to production, and lock-in through provider-owned accounts or tools. Clear IP ownership, individual least-privilege access, documentation in your repositories and a written exit plan reduce all three.&lt;/p&gt;

&lt;h3&gt;
  
  
  How fast can a DevOps as a Service team start?
&lt;/h3&gt;

&lt;p&gt;A good provider can start within days of signing, once access is granted. Expect a short assessment first. Visible improvements usually come within the first month, and bigger changes such as migrations take longer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;DevOps as a Service gives a startup senior DevOps coverage without building a team: foundations, pipelines, monitoring, security and cost control, delivered in your own accounts. Choose it when the work is real but uneven, when you need breadth and coverage, or when production depends on one person. Hire when infrastructure is your product or the work is constant. Either way, keep ownership, access and the exit plan on your side.&lt;/p&gt;

&lt;p&gt;If you want senior engineers to take on your DevOps work this way, see how &lt;a href="https://meteorops.com/services/devops-outsourcing" rel="noopener noreferrer"&gt;MeteorOps DevOps outsourcing&lt;/a&gt; works.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>startup</category>
      <category>management</category>
      <category>leadership</category>
    </item>
    <item>
      <title>Observability Stack for Startups: What to Run at 5, 20 and 100 Engineers</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Wed, 11 Nov 2026 07:30:03 +0000</pubDate>
      <link>https://dev.to/meteorops/observability-stack-for-startups-what-to-run-at-5-20-and-100-engineers-14ai</link>
      <guid>https://dev.to/meteorops/observability-stack-for-startups-what-to-run-at-5-20-and-100-engineers-14ai</guid>
      <description>&lt;p&gt;&lt;em&gt;This guide was written by &lt;a href="https://meteorops.com/team/michael-zion" rel="noopener noreferrer"&gt;Michael Zion&lt;/a&gt;, CEO at MeteorOps, and first published on the &lt;a href="https://meteorops.com/blog/how-to-build-a-startup-observability-stack" rel="noopener noreferrer"&gt;MeteorOps blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;A five-person startup should start with error tracking, structured logs, the four golden signals (latency, traffic, errors, saturation) for each user-facing service, uptime checks, and three or four symptom-based alerts, all on one managed platform. Add distributed tracing with OpenTelemetry once requests cross several services. Self-hosting becomes worth it only when the bill outgrows a platform engineer's time.&lt;/p&gt;

&lt;p&gt;A startup observability stack should answer three questions quickly: what is broken, who is affected, and what changed recently. It does not mean buying the biggest platform or instrumenting every function on day one. It means collecting enough signals to debug production, often Kubernetes, serverless jobs, managed databases and queues, without tribal knowledge or emergency SSH sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to run at 5, 20 and 100 engineers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Signals to have&lt;/th&gt;
&lt;th&gt;Typical tooling&lt;/th&gt;
&lt;th&gt;Who owns it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;About 5 engineers, one or two services&lt;/td&gt;
&lt;td&gt;Error tracking, structured logs, golden-signal dashboards, uptime checks, 3 to 5 alerts routed to one channel or pager&lt;/td&gt;
&lt;td&gt;One managed platform on a free or entry tier (Grafana Cloud, Datadog, or your cloud's native monitoring) plus an error tracker such as Sentry&lt;/td&gt;
&lt;td&gt;Whoever is on call, with one engineer setting conventions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;About 20 engineers, several services and workers&lt;/td&gt;
&lt;td&gt;Add OpenTelemetry tracing at service boundaries, deploy markers, queue and database dashboards, an on-call rotation, alert runbooks&lt;/td&gt;
&lt;td&gt;Same platform on a paid tier, OpenTelemetry Collector in the cluster, log retention and sampling rules&lt;/td&gt;
&lt;td&gt;A named owner for standards, usually in a platform or DevOps role&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;About 100 engineers, many teams&lt;/td&gt;
&lt;td&gt;SLOs per service, per-team dashboards and alert routing, cost allocation, trace sampling strategy&lt;/td&gt;
&lt;td&gt;Either a commercial platform under negotiated pricing or a self-hosted stack (Prometheus or Mimir, Loki, Tempo, Grafana) run by a platform team&lt;/td&gt;
&lt;td&gt;A platform team that treats observability as an internal product&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What it costs: Grafana Cloud vs Datadog vs self-hosted
&lt;/h2&gt;

&lt;p&gt;List prices from the vendors' pricing pages as of October 2026. Real bills depend on hosts, active series, log volume and retention, so use these to compare shapes, not as quotes.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Grafana Cloud&lt;/th&gt;
&lt;th&gt;Datadog&lt;/th&gt;
&lt;th&gt;Self-hosted LGTM (Loki, Grafana, Tempo, Mimir or Prometheus)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free tier&lt;/td&gt;
&lt;td&gt;10k metric series, 50 GB logs, 50 GB traces, 14-day retention, 3 users&lt;/td&gt;
&lt;td&gt;Infrastructure only: up to 5 hosts, 1-day metric retention&lt;/td&gt;
&lt;td&gt;Software is free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paid entry&lt;/td&gt;
&lt;td&gt;Pro: $19 per month platform fee, same included usage, then pay as you go&lt;/td&gt;
&lt;td&gt;Infrastructure Pro: $15 per host per month billed annually ($18 on-demand)&lt;/td&gt;
&lt;td&gt;Compute and storage for the stack, often a few hundred dollars a month at startup scale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Metrics&lt;/td&gt;
&lt;td&gt;From $6.50 per 1k active series&lt;/td&gt;
&lt;td&gt;Included per host; custom metrics billed separately&lt;/td&gt;
&lt;td&gt;Storage and memory grow with series count&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logs&lt;/td&gt;
&lt;td&gt;From about $0.55 per GB (process, write and retain combined)&lt;/td&gt;
&lt;td&gt;$0.10 per GB ingested, plus $1.70 per million events indexed for 15 days&lt;/td&gt;
&lt;td&gt;Object storage, cheap to keep&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Traces / APM&lt;/td&gt;
&lt;td&gt;Same per-GB pricing as logs&lt;/td&gt;
&lt;td&gt;APM from $31 per host per month billed annually&lt;/td&gt;
&lt;td&gt;Object storage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hidden cost&lt;/td&gt;
&lt;td&gt;High-cardinality labels inflate series&lt;/td&gt;
&lt;td&gt;Per-host and indexing costs grow with every node and noisy log line&lt;/td&gt;
&lt;td&gt;Engineer time: upgrades, scaling, on-call for the monitoring itself&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sources: &lt;a href="https://grafana.com/pricing/" rel="noopener noreferrer"&gt;Grafana Cloud pricing&lt;/a&gt; and &lt;a href="https://www.datadoghq.com/pricing/" rel="noopener noreferrer"&gt;Datadog pricing&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the failures you need to diagnose
&lt;/h2&gt;

&lt;p&gt;Tool selection gets messy when teams begin with vendor feature matrices. Start with the incidents you expect to handle instead. A payments API returning intermittent 500s, a background worker falling behind its queue, a database connection pool saturating after a traffic spike, or a canary release increasing latency in one region all need different signals. Metrics are best for spotting trends and triggering alerts, logs explain discrete events, traces connect work across services, and deploy or configuration events show what changed. Mapping those failure modes first helps you decide where deep instrumentation is worth it and where a simple log line, counter, or managed cloud metric is enough.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs5famsdzxvw7h4qkqjq3.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs5famsdzxvw7h4qkqjq3.webp" alt="Four cards showing what each observability signal is for: metrics spot trends and trigger alerts, logs explain discrete events, traces connect work across services, and deploy and config events show what changed." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Map the failures you expect first, then pick the signal that answers each one.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For most startups, the first observability goals should be practical, boring, and tied to production outcomes. Prioritize the checks that shorten incidents and protect user experience before you chase perfect coverage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Find customer-impacting issues fast.&lt;/strong&gt; The team should know when users are seeing elevated error rates, slow requests, failed jobs, or broken workflows. Alerts should include enough context to point to a likely service, dependency, tenant, region, or recent deploy instead of merely announcing that “something is down.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connect symptoms to recent changes.&lt;/strong&gt; Deployments, configuration changes, feature flags, and infrastructure updates should be visible during incident review.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Debug without direct server access.&lt;/strong&gt; Engineers should not need to SSH into machines or manually inspect containers to understand production behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Support on-call without constant noise.&lt;/strong&gt; Alerts should point to real action, not every small fluctuation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep costs predictable.&lt;/strong&gt; Observability data can grow quickly, especially logs and high-cardinality metrics.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This keeps the stack tied to operational needs instead of tool sprawl. If you are still deciding how your engineering ownership model should work, it can help to define responsibilities early. A clear team model, like the one outlined in &lt;a href="https://www.meteorops.com/blog/how-to-build-a-devops-team" rel="noopener noreferrer"&gt;how to build a DevOps team&lt;/a&gt;, makes observability easier to operate because someone owns the standards, not just the dashboard links.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build around the four core signal types
&lt;/h2&gt;

&lt;p&gt;A useful observability stack usually combines logs, metrics, traces, and alerts. Each signal answers a different kind of question. Treating one as a replacement for all the others usually creates blind spots.&lt;/p&gt;

&lt;h3&gt;
  
  
  Logs
&lt;/h3&gt;

&lt;p&gt;Logs explain what happened inside an application or service. They are useful for debugging specific failures, understanding request context, and reviewing edge cases after an incident.&lt;/p&gt;

&lt;p&gt;Good startup logging practices include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use structured logs, such as JSON, instead of free-form text when possible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Include request IDs, user or tenant identifiers where appropriate, service name, environment, and error details.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoid logging secrets, tokens, payment data, or unnecessary personal data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set retention based on debugging needs and cost, not default settings.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The common failure mode is logging everything. That feels safe until costs rise or engineers cannot find the few lines that matter. Start with application errors, key business workflows, background jobs, authentication events, and integration failures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Metrics
&lt;/h3&gt;

&lt;p&gt;Metrics show trends and current health. They are best for questions like: error rate increased, memory usage is climbing, queue depth is growing, or request latency changed after deployment.&lt;/p&gt;

&lt;p&gt;Most startups should track a small set of service-level metrics first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Request rate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Error rate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Latency, especially p95 or p99 where available&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CPU and memory usage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Database connection usage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Queue depth and job failure rate&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Be careful with high-cardinality labels, such as user ID, request path with raw IDs, or tenant ID on every metric. They can make queries expensive and dashboards hard to use. Use detailed labels where they help diagnosis, but do not attach every possible field to every metric.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tracing
&lt;/h3&gt;

&lt;p&gt;Distributed tracing helps you follow a request across services, queues, databases, and external APIs. It becomes important when one user action touches several components and no single log line explains the delay.&lt;/p&gt;

&lt;p&gt;Tracing is especially useful when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A monolith is being split into services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Requests pass through an API gateway, service layer, and background workers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;External providers affect latency or reliability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Engineers cannot tell which service owns a failure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You do not need to trace every internal detail at first. Start with entry points, service boundaries, database calls, and external API calls. Make sure trace IDs appear in logs, so engineers can move between traces and log events during debugging.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs429xfz4rtzx1ow899ci.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs429xfz4rtzx1ow899ci.webp" alt="A request path from API gateway to service layer to background workers, with tracing marked at the entry point, the service boundary, database calls and external API calls, all sharing one trace ID that also appears in log lines." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Trace the boundaries first and put the trace ID in every log line.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Alerts
&lt;/h3&gt;

&lt;p&gt;Alerts turn signals into action. Bad alerts wake people up for conditions that do not matter. Good alerts point to user impact, clear ownership, and a response path.&lt;/p&gt;

&lt;p&gt;Early alerting should focus on symptoms rather than every possible cause:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;High error rate on a user-facing service&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sustained latency above an agreed threshold&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Critical background jobs failing repeatedly&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Queue backlog growing beyond normal recovery&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Database or infrastructure limits close to exhaustion&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdaxbts6jbl7ce96jpoyj.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdaxbts6jbl7ce96jpoyj.webp" alt="Comparison of a cause alert, a CPU spike that may or may not affect users, against five symptom alerts: high error rate on a user-facing service, sustained latency above threshold, critical jobs failing repeatedly, queue backlog growing, and database or infra limits near exhaustion." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Page on what users feel, not on causes like a CPU spike.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If alerts are already noisy, fix that before adding more. A practical guide to &lt;a href="https://www.meteorops.com/blog/how-to-handle-alert-fatigue" rel="noopener noreferrer"&gt;handling alert fatigue&lt;/a&gt; can help you separate useful pages from low-value notifications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose tools that match your stage
&lt;/h2&gt;

&lt;p&gt;The right observability tools depend on your architecture, cloud provider, team size, budget, and operational maturity. A two-person engineering team should not run a complex observability platform unless there is a strong reason. A larger team with multiple services may need stronger standards and deeper query options.&lt;/p&gt;

&lt;p&gt;Use these criteria when comparing options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Setup effort:&lt;/strong&gt; How long does it take to instrument one service and get useful dashboards?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Operational burden:&lt;/strong&gt; Who patches, scales, backs up, and maintains the observability components?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data model:&lt;/strong&gt; Can the tool connect logs, metrics, and traces through shared fields like service name, environment, and request ID?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost controls:&lt;/strong&gt; Can you manage retention, sampling, indexing, and ingestion limits?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developer workflow:&lt;/strong&gt; Can engineers find what they need without learning a complex query language on day one?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Integration fit:&lt;/strong&gt; Does it work cleanly with your cloud, deployment pipeline, container platform, and incident process?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Managed tools are often a good fit early because they reduce maintenance work. Open source tools can be a good fit when you have the skills and time to operate them well. The main risk is choosing based on what looks powerful in a demo, then discovering the team cannot keep it clean in production.&lt;/p&gt;

&lt;p&gt;Tool choice should follow the same discipline as the rest of your platform decisions. If you need a broader framework, use the same thinking you would apply when you &lt;a href="https://www.meteorops.com/blog/how-to-choose-the-right-devops-tools-for-your-team" rel="noopener noreferrer"&gt;choose DevOps tools for your team&lt;/a&gt;: match the tool to the team’s current workload, not an imagined future state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Instrument the application, not just the infrastructure
&lt;/h2&gt;

&lt;p&gt;Cloud dashboards can tell you that a container restarted, a database used more CPU, or a load balancer returned more 5xx responses. That is useful, but it rarely tells the whole story. Most startup incidents need application context.&lt;/p&gt;

&lt;p&gt;For example, a latency spike may come from a slow database query, a third-party API timeout, a feature flag path, a cache miss pattern, or a single tenant sending unusual traffic. Infrastructure metrics alone will not explain those differences.&lt;/p&gt;

&lt;p&gt;Good application instrumentation should include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Clear service names and environment names, such as production, staging, and development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Correlation IDs passed through requests, logs, and traces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Consistent error handling with useful messages and stack traces where appropriate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Custom metrics for important workflows, such as signup completion, checkout failure, import job duration, or notification delivery failure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deployment markers so teams can compare behavior before and after a release.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do this incrementally. Pick one important user flow, such as login, checkout, data import, or report generation. Add logs, metrics, and traces around that path. Then repeat for the next critical flow. This produces value faster than trying to instrument every service perfectly before anyone can use the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set sensible defaults before the stack grows
&lt;/h2&gt;

&lt;p&gt;Observability gets harder to clean up later. Naming, retention, labels, and alert conventions should be simple enough for every engineer to follow.&lt;/p&gt;

&lt;p&gt;Define these defaults early:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Service naming:&lt;/strong&gt; Use consistent names across logs, metrics, traces, dashboards, and alerts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Environment naming:&lt;/strong&gt; Avoid mixing production and non-production data in the same views unless the distinction is clear.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Log levels:&lt;/strong&gt; Decide what counts as debug, info, warning, error, and critical.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Retention:&lt;/strong&gt; Keep high-value data long enough for debugging and reviews, but avoid keeping noisy data by default.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sampling:&lt;/strong&gt; Sample traces where volume is high, but keep enough detail for failed and slow requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Alert routing:&lt;/strong&gt; Send pages to people who can act. Send lower-priority notifications somewhere that does not interrupt sleep.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dashboard ownership:&lt;/strong&gt; Every dashboard should have a purpose and an owner, or it will become stale.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your startup uses Azure DevOps or is still setting up delivery foundations, observability should sit beside source control, pipelines, and release practices. The setup advice in &lt;a href="https://www.meteorops.com/blog/how-to-set-up-ado-for-startups" rel="noopener noreferrer"&gt;Azure DevOps for startups&lt;/a&gt; can help keep those foundations organized.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid the common startup observability traps
&lt;/h2&gt;

&lt;p&gt;Most observability problems come from over-collecting, under-owning, or alerting on the wrong things.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Too many dashboards:&lt;/strong&gt; A dashboard is useful only if someone uses it during incidents or reviews. Keep the main views focused on service health, user impact, and recent changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Logs without structure:&lt;/strong&gt; Plain text logs are harder to query and correlate. Structured logs make production debugging faster.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Metrics with uncontrolled labels:&lt;/strong&gt; High-cardinality metrics can increase cost and slow down queries. Review labels before they spread across services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Alerts tied to causes instead of symptoms:&lt;/strong&gt; CPU spikes may or may not affect users. Error rates, failed jobs, and latency usually make better primary alerts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No incident feedback loop:&lt;/strong&gt; After each incident, ask which signal was missing, which alert was noisy, and which dashboard helped. Then adjust the stack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No cost review:&lt;/strong&gt; Observability bills can grow quietly. Review ingestion, retention, and indexing on a regular schedule.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A simple review after each incident is often the best way to improve. If engineers spent 30 minutes looking for the right log field, add the field. If an alert fired three times with no action taken, remove it, lower its priority, or rewrite it. If a trace made the root cause obvious, expand tracing to the next important workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcgrwatoqwwo5udesfp0v.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcgrwatoqwwo5udesfp0v.webp" alt="Incident review loop: 30 minutes hunting for a log field leads to adding the field, an alert that fired 3 times with no action is removed, lowered in priority or rewritten, and a trace that made the root cause obvious leads to expanding tracing to the next workflow." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Each incident review turns one gap or noisy alert into a concrete fix.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What observability should a five-person startup set up first?
&lt;/h3&gt;

&lt;p&gt;Error tracking, structured JSON logs with a request ID, the four golden signals for each user-facing service, an uptime check on the main user flow, and a handful of alerts on user-facing symptoms (error rate, latency, failed critical jobs). Use one managed platform so nobody has to run monitoring infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should a startup self-host Prometheus and Grafana?
&lt;/h3&gt;

&lt;p&gt;Usually not at first. Self-hosting is cheaper in software but costs engineer time for upgrades, storage, scaling and on-call for the monitoring itself. It starts to pay off when your managed bill is larger than a meaningful share of a platform engineer's time, or when data residency requires it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do we need distributed tracing from day one?
&lt;/h3&gt;

&lt;p&gt;No. Tracing pays off once a request crosses several services, queues or external APIs. Start with OpenTelemetry SDKs at service entry points and outbound calls, and put trace IDs in your logs so you can jump between them.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do we build one observability platform that combines alerts, logs, metrics and traces?
&lt;/h3&gt;

&lt;p&gt;Standardize on OpenTelemetry for instrumentation, send everything through an OpenTelemetry Collector, and use shared resource attributes (&lt;code&gt;service.name&lt;/code&gt;, &lt;code&gt;deployment.environment&lt;/code&gt;) so the backend can link logs, metrics and traces. Grafana Cloud and Datadog both accept OTLP, which keeps you portable.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do we keep observability costs predictable?
&lt;/h3&gt;

&lt;p&gt;Set log retention and indexing rules per environment, drop debug logs in production, keep high-cardinality values (user IDs, raw URLs) out of metric labels, sample traces while keeping errors and slow requests, and review the bill monthly with the engineers who generate the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Build your startup observability stack around the questions your team needs to answer in production. Start with structured logs, essential metrics, targeted tracing, and alerts tied to real user impact. Keep the setup small enough to operate, but consistent enough to scale.&lt;/p&gt;

&lt;p&gt;The goal is not to collect every signal. The goal is to shorten the path between “something is wrong” and “we know what changed, who is affected, and what to fix next.”&lt;/p&gt;

</description>
      <category>devops</category>
      <category>sre</category>
      <category>startup</category>
      <category>performance</category>
    </item>
    <item>
      <title>Cluster Autoscaler vs Karpenter: Node Autoscaling Without Cost Surprises</title>
      <dc:creator>Michael Zion</dc:creator>
      <pubDate>Tue, 10 Nov 2026 07:30:07 +0000</pubDate>
      <link>https://dev.to/meteorops/cluster-autoscaler-vs-karpenter-node-autoscaling-without-cost-surprises-g9m</link>
      <guid>https://dev.to/meteorops/cluster-autoscaler-vs-karpenter-node-autoscaling-without-cost-surprises-g9m</guid>
      <description>&lt;p&gt;&lt;em&gt;This guide was written by &lt;a href="https://meteorops.com/team/michael-zion" rel="noopener noreferrer"&gt;Michael Zion&lt;/a&gt;, CEO at MeteorOps, and first published on the &lt;a href="https://meteorops.com/blog/how-to-set-up-kubernetes-autoscaling-without-creating-cost-surprises" rel="noopener noreferrer"&gt;MeteorOps blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;Cluster Autoscaler adds and removes nodes in node groups you define in advance. Karpenter skips node groups and launches whichever instance type best fits the pending pods, then consolidates underused nodes. On AWS, Karpenter usually packs workloads tighter and handles Spot better. Cluster Autoscaler is the portable choice that works on every major cloud. Either way, cap total capacity explicitly.&lt;/p&gt;

&lt;p&gt;Node autoscaling is where Kubernetes cost surprises usually come from. A sensible pod autoscaler plus an unbounded node autoscaler can turn one traffic spike into a much larger bill that never scales back down. This guide compares the two node autoscalers, shows the configuration that bounds each one, and covers the workload-level guardrails that matter with either.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cluster Autoscaler vs Karpenter at a glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Cluster Autoscaler&lt;/th&gt;
&lt;th&gt;Karpenter&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;How it adds capacity&lt;/td&gt;
&lt;td&gt;Raises the desired size of an existing node group (an Auto Scaling group, managed node group or VM scale set)&lt;/td&gt;
&lt;td&gt;Creates instances directly from pending pod requirements, choosing from many instance types&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Instance choice&lt;/td&gt;
&lt;td&gt;Fixed per node group; you pre-create groups for each shape&lt;/td&gt;
&lt;td&gt;Any type allowed by NodePool requirements (family, size, architecture, zone, Spot or On-Demand)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scale-down&lt;/td&gt;
&lt;td&gt;Removes nodes below a utilization threshold (default 50%) after they stay unneeded for a while (default 10 minutes)&lt;/td&gt;
&lt;td&gt;Consolidation deletes empty nodes and replaces underused ones with cheaper, smaller nodes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spot handling&lt;/td&gt;
&lt;td&gt;Mixed-instance node groups plus a separate interruption handler&lt;/td&gt;
&lt;td&gt;Built-in Spot and On-Demand selection, with interruption handling through an SQS queue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disruption controls&lt;/td&gt;
&lt;td&gt;PDBs and the &lt;code&gt;cluster-autoscaler.kubernetes.io/safe-to-evict: "false"&lt;/code&gt; annotation&lt;/td&gt;
&lt;td&gt;PDBs, NodePool disruption budgets, and the &lt;code&gt;karpenter.sh/do-not-disrupt: "true"&lt;/code&gt; annotation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost ceiling&lt;/td&gt;
&lt;td&gt;Node group max sizes and &lt;code&gt;--max-nodes-total&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;spec.limits&lt;/code&gt; on each NodePool (CPU and memory)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Clouds&lt;/td&gt;
&lt;td&gt;AWS, GCP, Azure and many others&lt;/td&gt;
&lt;td&gt;AWS (v1 stable since 2024); on Azure through AKS Node Auto Provisioning, which is built on Karpenter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Main risk&lt;/td&gt;
&lt;td&gt;Many node groups to maintain; slow, coarse scaling&lt;/td&gt;
&lt;td&gt;Unbounded NodePools; churn from aggressive consolidation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg9kgztyxe5l92gubao2s.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg9kgztyxe5l92gubao2s.webp" alt="Two lanes compare node autoscalers: Cluster Autoscaler turns pending pods into a larger node group with a fixed node shape, capped by max size and --max-nodes-total; Karpenter creates best-fit instances directly, capped by NodePool spec.limits." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Both tools react to pending pods, but only the ceiling you set stops the growth.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Bound Karpenter with NodePool limits and disruption budgets
&lt;/h2&gt;

&lt;p&gt;A Karpenter NodePool without &lt;code&gt;limits&lt;/code&gt; can keep launching nodes as long as pods are pending. Always set a CPU and memory ceiling, choose the consolidation policy, and add a disruption budget so consolidation never drains too much of the cluster at once.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
  name: general
spec:
  template:
    spec:
      nodeClassRef:
        group: karpenter.k8s.aws
        kind: EC2NodeClass
        name: default
      requirements:
        - key: karpenter.sh/capacity-type
          operator: In
          values: ["spot", "on-demand"]
        - key: karpenter.k8s.aws/instance-category
          operator: In
          values: ["c", "m", "r"]
        - key: kubernetes.io/arch
          operator: In
          values: ["amd64", "arm64"]
      expireAfter: 720h          # replace nodes every 30 days
  limits:
    cpu: "200"                   # hard ceiling for this NodePool
    memory: 400Gi
  disruption:
    consolidationPolicy: WhenEmptyOrUnderutilized
    consolidateAfter: 5m
    budgets:
      - nodes: "10%"             # never disrupt more than 10% of nodes at once
      - nodes: "0"               # no voluntary disruption during business peak
        schedule: "0 9 * * mon-fri"
        duration: 8h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcujvf8ugb2dtlmgcbu62.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcujvf8ugb2dtlmgcbu62.webp" alt="Timeline of a weekday under the example NodePool budgets: up to 10% of nodes can be disrupted at once outside business hours, and 0 nodes from 09:00 to 17:00 under the schedule 0 9 * * mon-fri with duration 8h." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Consolidation keeps saving money at night but leaves the cluster alone during the business peak.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When both Spot and On-Demand are allowed, Karpenter prefers Spot and falls back to On-Demand when Spot capacity is unavailable. Allowing both architectures lets it pick cheaper Graviton instances when your images are multi-arch. Mark pods that must not be moved by consolidation (long batch jobs, singletons during a migration) with &lt;code&gt;karpenter.sh/do-not-disrupt: "true"&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Bound Cluster Autoscaler with node group sizes and scale-down settings
&lt;/h2&gt;

&lt;p&gt;Cluster Autoscaler can only grow node groups up to their configured maximum, so the max size of each group is your cost ceiling. The flags below make scale-down and expansion choices explicit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;command:
  - ./cluster-autoscaler
  - --cloud-provider=aws
  - --node-group-auto-discovery=asg:tag=k8s.io/cluster-autoscaler/enabled,k8s.io/cluster-autoscaler/my-cluster
  - --expander=least-waste            # pick the group that wastes the least CPU and memory
  - --balance-similar-node-groups     # spread across zones evenly
  - --max-nodes-total=60              # cluster-wide ceiling
  - --scale-down-utilization-threshold=0.5
  - --scale-down-unneeded-time=10m
  - --skip-nodes-with-system-pods=true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run one node group per zone for workloads with zonal volumes, and keep the number of node shapes small. If you need many instance types to chase Spot capacity, that is usually the point where Karpenter becomes simpler to operate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which one should you use?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Karpenter&lt;/strong&gt; on EKS when workloads vary in shape, you want Spot with automatic fallback, or you are paying for half-empty nodes that Cluster Autoscaler will not consolidate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Cluster Autoscaler&lt;/strong&gt; when you run on several clouds, on GKE (which has its own node auto-provisioning), when a few uniform node groups already fit your workloads, or when your team prefers predictable, fixed node shapes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;On AKS&lt;/strong&gt;, use the built-in cluster autoscaler or Node Auto Provisioning rather than installing either tool yourself.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not run both against the same nodes. When migrating from Cluster Autoscaler to Karpenter, create the NodePool, scale Cluster Autoscaler to zero replicas, then cordon and drain the old node groups gradually while PDBs protect critical workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understand Which Kubernetes Layer Is Scaling
&lt;/h2&gt;

&lt;p&gt;Kubernetes autoscaling usually involves several independent control loops. They react to different signals and can amplify one another when configured carelessly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Horizontal Pod Autoscaler (HPA):&lt;/strong&gt; Changes the number of replicas for a workload, usually from CPU, memory, or a custom metric.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vertical Pod Autoscaler (VPA):&lt;/strong&gt; Recommends or changes CPU and memory requests for pods. Its operating mode needs careful review because changing requests can restart or reschedule workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cluster Autoscaler:&lt;/strong&gt; Adjusts the number of nodes when pods cannot be scheduled or nodes are underused, depending on its configuration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Karpenter:&lt;/strong&gt; Provisions and removes nodes based on pending pod requirements and configured constraints.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Managed node pool autoscaling:&lt;/strong&gt; Changes the size of a cloud provider’s node group according to its own minimum and maximum settings.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These layers do not share a single cost budget. An HPA can increase replicas, which creates unschedulable pods, which causes a node autoscaler to add nodes. If the HPA never scales down, or if pod requests are much larger than actual usage, the node count can remain high after traffic falls.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fysucbyukij03hzi5pptt.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fysucbyukij03hzi5pptt.webp" alt="Chain diagram: a traffic spike makes the HPA add replicas, which creates unschedulable pods, which makes the node autoscaler add nodes; nodes stay after traffic falls when the HPA never scales down or requests are much larger than usage." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Each loop does its own job correctly, and the bill grows anyway.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Start by writing down the scaling path for each important workload:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;What metric increases the replica count?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is the minimum and maximum replica count?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What CPU and memory requests does each replica reserve?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Which node pool can run the workload?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What causes a new node to be created?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What prevents the workload from consuming unlimited capacity?&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you cannot answer these questions, changing a maximum replica count is not a cost-control strategy. It is a guess.&lt;/p&gt;
&lt;h2&gt;
  
  
  Set Resource Requests Before Setting Replica Limits
&lt;/h2&gt;

&lt;p&gt;Autoscaling decisions depend on resource requests. The HPA commonly evaluates CPU utilization as a percentage of the CPU request, not as a percentage of the node's total capacity. A container with a request of 500 millicores running at 400 millicores is at 80% requested CPU, even if the node still has substantial unused capacity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwhl6swclrsfnay546ha0.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwhl6swclrsfnay546ha0.webp" alt="A container with a 500 millicore CPU request using 400 millicores is at 80% requested CPU, even though the node around it has substantial unused capacity." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Inaccurate requests skew every scaling decision the HPA makes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That makes inaccurate requests expensive in both directions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Requests that are too low:&lt;/strong&gt; The scheduler packs too many pods onto a node, and the workload may experience throttling or memory pressure before the HPA reacts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Requests that are too high:&lt;/strong&gt; Each replica reserves more node capacity than it needs, so scaling out creates nodes sooner and keeps them larger than necessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Missing requests:&lt;/strong&gt; CPU-based utilization may be unsuitable or unavailable for the workload, and scheduling becomes less predictable.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use measured usage from representative periods, including deployments, batch activity, and peak traffic. Do not set requests from a single quiet hour. For memory, leave enough room for normal working-set variation because memory pressure can terminate a pod before a CPU-based HPA responds.&lt;/p&gt;

&lt;p&gt;A minimal workload definition should make the resource assumptions explicit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  replicas: 2
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: example/api:1.0.0
          resources:
            requests:
              cpu: "250m"
              memory: "256Mi"
            limits:
              cpu: "1"
              memory: "512Mi"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The image name in this example is illustrative. Replace it with the image and version used by your workload. The important part is that requests and limits reflect a tested operating range rather than arbitrary defaults.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bound the pod autoscaler too
&lt;/h2&gt;

&lt;p&gt;Node autoscalers react to pending pods, so an unbounded Horizontal Pod Autoscaler drives node cost directly. Give every HPA a deliberate &lt;code&gt;maxReplicas&lt;/code&gt;, slow scale-down (a stabilization window of about 5 minutes), and a metric that reflects real demand. A slow downstream dependency can raise CPU, add replicas, and add nodes without helping users at all. Our &lt;a href="https://meteorops.com/blog/how-to-configure-kubernetes-hpa-without-causing-scaling-flaps" rel="noopener noreferrer"&gt;Kubernetes HPA guide&lt;/a&gt; covers the configuration in detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put hard limits around namespaces and node growth
&lt;/h2&gt;

&lt;p&gt;Pod limits do not automatically create a cloud cost limit. If an HPA can create ten times as many replicas, a node autoscaler may add enough capacity to schedule them. You need limits at both the workload and cluster levels.&lt;/p&gt;

&lt;p&gt;For each node pool or provisioner, define:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A minimum size that supports normal operation and planned disruption.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A maximum size that reflects the approved capacity and cost envelope.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The instance types or node sizes that the workload may use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scheduling rules that keep specialized workloads away from general-purpose capacity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A scale-down policy that removes genuinely unused nodes without disrupting critical workloads.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use a &lt;strong&gt;ResourceQuota&lt;/strong&gt; in each namespace to prevent one team or environment from consuming all available capacity. Pair it with a &lt;strong&gt;LimitRange&lt;/strong&gt; when you need default requests and limits for containers that omit them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v1
kind: ResourceQuota
metadata:
  name: application-quota
  namespace: production
spec:
  hard:
    requests.cpu: "20"
    requests.memory: 40Gi
    limits.cpu: "40"
    limits.memory: 80Gi
    pods: "50"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A quota is a scheduling guardrail, not a guarantee that the cloud bill will stay below a specific amount. Node overhead, system workloads, daemon sets, storage, load balancers, and other services still consume resources. Leave capacity for those components when choosing quota values.&lt;/p&gt;

&lt;p&gt;Review node autoscaling alongside workload placement. A pod with a restrictive node selector, taint requirement, or topology rule may force the provisioner to create a new node even when another node has spare capacity. This can be the correct availability decision, but it should be visible in the cost review.&lt;/p&gt;

&lt;p&gt;Teams operating several clusters should document their node-pool limits and ownership clearly. For example, importing or consolidating clusters can expose inconsistent autoscaling rules that were previously hidden by separate cloud accounts or environments. A documented migration plan, such as the approach described in this &lt;a href="https://meteorops.com/case-studies/import-multiple-high-scale-kubernetes-clusters-into-pulumi" rel="noopener noreferrer"&gt;Kubernetes cluster import case study&lt;/a&gt;, can help keep infrastructure policy explicit during that work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test Failure Modes Before Production Traffic Finds Them
&lt;/h2&gt;

&lt;p&gt;Autoscaling should be tested as a system rather than as an isolated HPA object. A useful test starts with a known workload and observes every step: metric change, replica change, pending pods, node creation, application recovery, and scale-down.&lt;/p&gt;

&lt;p&gt;Run these checks in a non-production environment or during an approved production exercise:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Increase request load until the HPA reaches several replica levels.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm that new pods become ready and that readiness probes prevent traffic from reaching unready instances.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Observe whether pending pods trigger node growth as expected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stop the load and measure how long replicas and nodes take to fall.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check whether scale-down causes evictions, queue loss, connection failures, or latency spikes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repeat the test while a deployment, node drain, or dependency slowdown is occurring.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Watch these signals during the test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;HPA desired replicas and current replicas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pending pods and their scheduling events.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Node count, node utilization, and unschedulable nodes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CPU throttling and memory pressure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Request latency, error rate, queue depth, and saturation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replica and node count after demand returns to normal.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not judge success by node utilization alone. A cluster can look efficient while users experience high latency because the application is waiting on a database or another service. Conversely, a low-utilization node may be necessary because the workload has strict placement rules or requires spare capacity for disruption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a Cost Review That Matches Scaling Behavior
&lt;/h2&gt;

&lt;p&gt;Cost control fails when engineers review the bill after the fact and cannot connect it to a scaling event. Record the decisions that can increase capacity and assign an owner to each one.&lt;/p&gt;

&lt;p&gt;At minimum, review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Changes to HPA minimum and maximum replicas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Changes to CPU and memory requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Changes to node-pool or provisioner limits.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New taints, tolerations, selectors, or topology constraints.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Changes to custom metrics and their collection intervals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Namespaces that approach their resource quotas.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use separate limits for development, staging, and production. A staging environment that inherits production replica limits can create unnecessary spend during load tests or a stuck job. Development clusters often need a firm upper bound because an accidental deployment can otherwise remain active until someone notices.&lt;/p&gt;

&lt;p&gt;When a workload needs more capacity, ask which constraint is actually failing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If requests are too high, recalibrate them from representative usage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the HPA reacts to the wrong signal, change the metric rather than raising the maximum.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If pods cannot fit efficiently, review placement rules and node shapes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the workload has a legitimate sustained increase, update the capacity plan and budget deliberately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If several clusters use different policies, standardize the policy before copying another configuration.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fikkh7pc4zb7gevdkn01k.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fikkh7pc4zb7gevdkn01k.webp" alt="Decision map for a workload that needs more capacity: requests too high, recalibrate from representative usage; HPA reacts to the wrong signal, change the metric not the maximum; pods cannot fit efficiently, review placement rules and node shapes; legitimate sustained increase, update the capacity plan and budget; clusters use different policies, standardize the policy first." width="800" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Raising a limit is the right answer only for a legitimate sustained increase.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For teams managing AWS and Kubernetes together, infrastructure changes should be reviewed as one capacity decision rather than as separate application and cloud changes. The practices in this &lt;a href="https://meteorops.com/case-studies/improve-and-simplify-aws-and-kubernetes-infrastructure-management" rel="noopener noreferrer"&gt;AWS and Kubernetes management case study&lt;/a&gt; are relevant to that type of review. Managed Kubernetes services such as &lt;a href="https://meteorops.com/technologies/azure-kubernetes-service-aks" rel="noopener noreferrer"&gt;Azure Kubernetes Service&lt;/a&gt; can reduce control-plane administration, but they do not remove the need to bound workload and node scaling.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the Configuration Needs a Larger Review
&lt;/h2&gt;

&lt;p&gt;Get a second review when autoscaling has become difficult to explain, when several teams share a cluster, or when a single traffic event can materially affect infrastructure spend. The review should examine manifests, metrics, scheduling events, quotas, node limits, and recent cost changes together.&lt;/p&gt;

&lt;p&gt;Useful deliverables include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A diagram showing the HPA, scheduler, node autoscaler, node pools, and external dependencies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A table listing minimum and maximum replicas for each production workload.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A resource-request review based on observed usage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A namespace quota and ownership map.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A test record showing scale-up and scale-down behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An escalation rule for reaching a capacity or spending threshold.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Infrastructure teams can also compare patterns used in production Kubernetes environments, including the operational approach described in this &lt;a href="https://meteorops.com/case-studies/scalable-biotech-cloud-infrastructure-with-apache-airflow-kubernetes-aws-and-terraform" rel="noopener noreferrer"&gt;scalable Kubernetes and cloud infrastructure case study&lt;/a&gt;. Treat those patterns as material for review, not as a substitute for testing your own workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is Karpenter better than Cluster Autoscaler?
&lt;/h3&gt;

&lt;p&gt;On AWS it is usually more cost-efficient, because it picks right-sized instances per workload, uses Spot with fallback, and consolidates underused nodes. Cluster Autoscaler is simpler to reason about, supports every major cloud, and is fine when a few uniform node groups fit your workloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Karpenter work on Azure or GCP?
&lt;/h3&gt;

&lt;p&gt;On Azure, yes: AKS Node Auto Provisioning is built on Karpenter and is managed for you. There is no supported Karpenter provider for GKE; use GKE's cluster autoscaler and node auto-provisioning there.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I stop Karpenter from overspending?
&lt;/h3&gt;

&lt;p&gt;Set &lt;code&gt;spec.limits&lt;/code&gt; for CPU and memory on every NodePool, restrict instance categories and sizes in &lt;code&gt;requirements&lt;/code&gt;, enable consolidation, keep accurate pod requests, and alert on node count and spend. Without limits, any burst of pending pods can launch new nodes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is my Cluster Autoscaler not scaling down?
&lt;/h3&gt;

&lt;p&gt;Common causes: pods with local storage or the &lt;code&gt;safe-to-evict: "false"&lt;/code&gt; annotation, PDBs that allow 0 disruptions, kube-system pods without PDBs, nodes above the utilization threshold, or pods that cannot fit on any other node because of affinity, taints or zonal volumes. Check the autoscaler logs and the &lt;code&gt;cluster-autoscaler-status&lt;/code&gt; ConfigMap.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I run Karpenter and Cluster Autoscaler together?
&lt;/h3&gt;

&lt;p&gt;Only on separate sets of nodes, and only temporarily during a migration. If both manage the same capacity they make conflicting decisions. Scale Cluster Autoscaler to zero once Karpenter NodePools are serving the workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Pick the node autoscaler that fits your cloud and workload mix, then set autoscaling limits in layers. Give workloads accurate resource requests, bound HPA replicas, cap node-pool growth, use namespace quotas, and test the complete path from demand to cloud capacity. Then review scaling changes as capacity decisions with clear ownership. This approach keeps autoscaling useful during real demand without allowing an HPA or node provisioner to define your cloud bill by accident.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>aws</category>
      <category>devops</category>
      <category>sre</category>
    </item>
  </channel>
</rss>
