{"id":390,"date":"2026-12-05T12:00:00","date_gmt":"2026-12-05T12:00:00","guid":{"rendered":"https:\/\/rezachegini.com\/?p=390"},"modified":"2026-12-05T19:16:54","modified_gmt":"2026-12-05T19:16:54","slug":"ckad-prep-part-5-the-selector-that-matched-13-pods","status":"publish","type":"post","link":"https:\/\/rezachegini.com\/?p=390","title":{"rendered":"CKAD Prep, Part 5: The Selector That Matched 13 Pods"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Where we are<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Hi, I&#8217;m Reza. I&#8217;m sharing my preparation for the CKAD exam, practiced on a <code>K3s<\/code> cluster in my home lab. I am a junior engineer looking for my first SRE, DevOps or Cloud job, and these posts are my lab notes \u2014 what I tried, what worked, and where I went wrong.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Parts 3 and 4, labels decided everything: which pods a ReplicaSet owns, and which ReplicaSets a Deployment makes. Part 5 is the third level of the same idea: labels and selectors themselves. Three things to do:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>D1: work in another namespace without switching to it, and count every pod in the cluster.<\/li>\n\n\n\n<li>D2: query pods with every kind of selector, and change labels on running pods.<\/li>\n\n\n\n<li>D3: annotations, which look like labels but can&#8217;t be selected on.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The most important result is in D2. I asked for pods where <code>env<\/code> is not <code>dev<\/code>. The precise answer is 2 pods. The query returned 13:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"400\" src=\"https:\/\/rezachegini.com\/wp-content\/uploads\/2026\/12\/ckad-prep-part-5-diagram.png\" alt=\"The selector env!=dev matched 13 pods; adding the existence check env,env!=dev narrows it to p1 and p2, and counting all pods gives 79.\" class=\"wp-image-389\" srcset=\"https:\/\/rezachegini.com\/wp-content\/uploads\/2026\/12\/ckad-prep-part-5-diagram.png 711w, https:\/\/rezachegini.com\/wp-content\/uploads\/2026\/12\/ckad-prep-part-5-diagram-300x169.png 300w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A pod with no <code>env<\/code> label at all also has an <code>env<\/code> that &#8220;isn&#8217;t dev&#8221;. More on that below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">D1: working across namespaces<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The task: create a namespace <code>finance<\/code> with a pod <code>ledger<\/code> (<code>redis:7<\/code>) in it, without switching my default namespace away from <code>core<\/code>. Then list some pods across all namespaces, and count every pod in the cluster.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">One file, two documents<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>apiVersion: v1\nkind: Namespace\nmetadata:\n  name: finance\n---\napiVersion: v1\nkind: Pod\nmetadata:\n  name: ledger\n  namespace: finance\n  labels:\n    app: ledger\nspec:\n  containers:\n    - name: ledger\n      image: redis:7<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Order matters. <code>apply<\/code> handles documents from top to bottom, so the namespace must exist before the pod that lives in it. A file with the pod first fails.<\/li>\n\n\n\n<li><code>namespace: finance<\/code> puts the pod in <code>finance<\/code>, even though my context says <code>core<\/code>. That&#8217;s how you work in another namespace without switching to it.<\/li>\n\n\n\n<li>If the file and the flag disagree, <code>kubectl<\/code> refuses. With <code>-n core<\/code> on the command line, you get the namespace and the flag don&#8217;t agree.<\/li>\n\n\n\n<li><code>app: ledger<\/code> isn&#8217;t required by the task. I add a label to every workload, so it can always be selected later.<\/li>\n\n\n\n<li><code>redis:7<\/code> runs <code>redis-server<\/code> by default, a long-running process, so it needs no command (unlike <code>busybox<\/code>, which needs <code>sleep 3600<\/code>).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The apply said <code>namespace\/finance unchanged<\/code>. That&#8217;s not an error: the namespace already existed, and I ran the file twice \u2014 once to test it, once for real. <code>Unchanged<\/code> means the object was already as described.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The priority, from strongest to weakest: <code>metadata.namespace<\/code> in the file, then the <code>-n<\/code> flag, then the namespace in the context. If the file says <code>finance<\/code>, the flag can&#8217;t move the pod.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The pod exists, but I can&#8217;t see it<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -n finance\nkubectl config view --minify | grep namespace<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A plain <code>get pods<\/code> looks in <code>core<\/code>, so it doesn&#8217;t show <code>ledger<\/code>. That&#8217;s the lab&#8217;s number one time-waster for me: the object exists, I&#8217;m just looking in the wrong namespace. <code>-n finance<\/code> is the fix, and <code>config view --minify<\/code> shows the namespace my context defaults to.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Listing across namespaces<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -A -l 'app in (web,api)'<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-A<\/code> is <code>--all-namespaces<\/code>. It adds a <code>NAMESPACE<\/code> column.<\/li>\n\n\n\n<li><code>app in (web,api)<\/code> is a set-based selector: <code>app<\/code> is <code>web<\/code> or <code>api<\/code>.<\/li>\n\n\n\n<li>The quotes are needed. Without them, bash reads <code>(<\/code> as shell syntax and fails.<\/li>\n\n\n\n<li><code>-l app=web,app=api<\/code> would match nothing. In a label selector, a comma always means AND, and <code>app<\/code> can&#8217;t be both <code>web<\/code> and <code>api<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The result: 5 <code>api-*<\/code> pods and <code>web<\/code>, all in <code>core<\/code>. <code>ledger<\/code> (<code>app=ledger<\/code>) is correctly left out.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Counting every pod: 79<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -A --no-headers | wc -l &gt; \/opt\/ckad\/00\/count.txt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The answer was 79. Why so many? <code>kube-system<\/code> (<code>CoreDNS<\/code>, <code>Traefik<\/code>, <code>metrics-server<\/code>, <code>local-path-provisioner<\/code>) is the biggest group, then the long list of default, completed and failed pods from earlier tasks. My own live pods are a small part of it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;All pods&#8221; really means all of them, in any phase: <code>Running<\/code>, <code>Completed<\/code>, <code>Error<\/code>, <code>Pending<\/code>. Counting only <code>Running<\/code> pods is a different question:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -A --field-selector=status.phase=Running --no-headers | wc -l<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">So read the task carefully. And remember <code>--no-headers<\/code>, or the count is 80.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One more thing: namespaces don&#8217;t isolate network traffic. Pods in <code>finance<\/code> and <code>core<\/code> can still talk to each other. <code>NetworkPolicies<\/code> do that, and they select pods by labels \u2014 which is where this part of the lab is heading.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">D2: selectors, and the != trap<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The task: three pods with <code>env<\/code> and <code>tier<\/code> labels, a set of queries, then change labels on the running pods. Three pods, one namespace (<code>core<\/code>):<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The starting labels:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>p1<\/code>: <code>env=prod<\/code>, <code>tier=fe<\/code><\/li>\n\n\n\n<li><code>p2<\/code>: <code>env=prod<\/code>, <code>tier=be<\/code><\/li>\n\n\n\n<li><code>p3<\/code>: <code>env=dev<\/code>, <code>tier=fe<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">All three are <code>nginx<\/code> pods, in one file with three documents. Only the labels differ. <code>env<\/code> and <code>tier<\/code> are the example keys for every query below, and the trap is about what happens to a pod that doesn&#8217;t have the key at all.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The queries<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -l env=prod<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Equality. <code>env<\/code> is exactly <code>prod<\/code>: <code>p1<\/code> and <code>p2<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -l env=prod,tier=fe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A comma means AND. Both must be true: only <code>p1<\/code>. There&#8217;s no OR in equality syntax. For OR on one key, use <code>in<\/code> (below).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -l 'env!=dev'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Inequality. This returned <code>p1<\/code>, <code>p2<\/code>, and 11 more: the 5 <code>api-*<\/code> pods, the 2 <code>shop-*<\/code> pods, <code>broken<\/code>, <code>printer<\/code>, <code>sleeper<\/code> and <code>web<\/code>. None of them have <code>env<\/code> at all, but &#8220;isn&#8217;t dev&#8221; is true for a missing key. That is the trap: <code>!=<\/code> also matches pods that don&#8217;t have the key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The quotes are needed, because <code>!<\/code> means something in bash (history expansion).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -l 'env,env!=dev'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>env<\/code> on its own is an existence check: the key is there, with any value. ANDed with <code>env!=dev<\/code>, it gives exactly <code>p1<\/code> and <code>p2<\/code>. That is the precise answer to the task: <code>env<\/code> is not <code>dev<\/code>, among pods that have <code>env<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>env notin (dev)<\/code> has the same problem as <code>!=<\/code>. Only adding the existence check fixes it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -l 'tier in (fe,be)'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Set-based <code>in<\/code>: <code>tier<\/code> is <code>fe<\/code> or <code>be<\/code>. That&#8217;s <code>p1<\/code>, <code>p2<\/code> and <code>p3<\/code>. <code>web<\/code> has <code>tier=frontend<\/code>, and values are compared exactly, so <code>web<\/code> doesn&#8217;t match.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">All the forms, and which ones match a missing key<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>env=prod<\/code>: <code>env<\/code> is <code>prod<\/code>. Pods with no <code>env<\/code>: not matched.<\/li>\n\n\n\n<li><code>env!=dev<\/code>: <code>env<\/code> isn&#8217;t <code>dev<\/code>. Pods with no <code>env<\/code>: matched.<\/li>\n\n\n\n<li><code>env in (prod,staging)<\/code>: <code>env<\/code> is one of these. Pods with no <code>env<\/code>: not matched.<\/li>\n\n\n\n<li><code>env notin (dev)<\/code>: <code>env<\/code> isn&#8217;t one of these. Pods with no <code>env<\/code>: matched.<\/li>\n\n\n\n<li><code>env<\/code>: <code>env<\/code> exists. Pods with no <code>env<\/code>: not matched.<\/li>\n\n\n\n<li><code>!env<\/code>: <code>env<\/code> doesn&#8217;t exist. Only pods with no <code>env<\/code>.<\/li>\n\n\n\n<li><code>a=1,b=2<\/code>: both are true (AND).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This trap matters most in places where matching a pod by accident has real effects: <code>NetworkPolicies<\/code>, <code>Services<\/code> and controllers all select by labels. A selector that matches pods you didn&#8217;t mean to include is a real bug, not just a wrong count.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Changing labels on running pods<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl label pod p3 env=staging --overwrite\nkubectl label pod p2 tier-<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Labels can change on a running pod. No restart, and no <code>Forbidden<\/code> like the CPU limit in Part 2.<\/li>\n\n\n\n<li><code>--overwrite<\/code> is required, because <code>env<\/code> already has a value. Without it: <code>error: 'env' already has a value<\/code>.<\/li>\n\n\n\n<li><code>key-<\/code>, with a trailing dash, removes the label. Output: <code>pod\/p2 unlabeled<\/code>. The same syntax works for annotations.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">And remember Part 3: changing a pod&#8217;s labels can move it into or out of a controller&#8217;s set. A pod&#8217;s labels are what its owner matches on. The lab&#8217;s pods are bare, so nothing broke here, but a ReplicaSet&#8217;s pods would be a different story.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Syncing the file<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Then I edited the file to match (<code>p3<\/code> is now <code>staging<\/code>, <code>p2<\/code> has no <code>tier<\/code> line) and applied it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>p1<\/code> unchanged.<\/li>\n\n\n\n<li><code>p2<\/code> configured, <code>p3<\/code> configured. The live labels already matched the file. But <code>apply<\/code> keeps its own record of what it last applied, and the file now says something different from that record. So it writes the change. That&#8217;s the <code>kubectl.kubernetes.io\/last-applied-configuration<\/code> annotation at work, and D3 explains it.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Why is deleting <code>tier<\/code> from the file enough? <code>apply<\/code> removes a field that was in its last-applied record and is now missing from the file. That&#8217;s how declarative config prunes fields. It only removes fields it manages. A field set by hand (<code>kubectl label<\/code>) isn&#8217;t in the record, so <code>apply<\/code> won&#8217;t remove it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NAME   READY   STATUS    RESTARTS   AGE   LABELS\np1     1\/1     Running   0          14m   env=prod,tier=fe\np2     1\/1     Running   0          15m   env=prod\np3     1\/1     Running   0          15m   env=staging,tier=fe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A side note: <code>printer<\/code> and <code>sleeper<\/code> from Part 1 now show <code>RESTARTS 47<\/code>. Their <code>sleep 3600<\/code> ends every hour, Kubernetes restarts them, and the count keeps climbing. That&#8217;s expected for a pod that keeps finishing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">D3: annotations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The task: add the annotations <code>owner=reza<\/code> and <code>ticket=CKAD-42<\/code> to Deployment <code>api<\/code>, then write <code>ticket<\/code>&#8216;s value to <code>\/opt\/ckad\/00\/ticket.txt<\/code>. The tricky part is where the annotation goes: on the Deployment itself, not on its pods.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where the annotation goes matters<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>metadata:\n  name: api\n  labels:\n    app: api\n    team: core\n  annotations:\n    owner: reza\n    ticket: CKAD-42<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>annotations<\/code> sits next to <code>labels<\/code>, under the Deployment&#8217;s own <code>metadata<\/code>. Not under <code>spec.template.metadata.labels<\/code>, which would put it on every pod.<\/li>\n\n\n\n<li>So the pod template doesn&#8217;t change. No new template hash, no new ReplicaSet, no restart. I checked: the ReplicaSet is still <code>api-7579bcc6c4<\/code>, from Part 4.<\/li>\n\n\n\n<li>Under the template, it would be different. Every pod would get the annotation, the hash would change, and a new ReplicaSet would roll out \u2014 for a change that has nothing to do with the pods.<\/li>\n\n\n\n<li>Values are strings. <code>CKAD-42<\/code> is fine as it is. A value like <code>42<\/code> or <code>true<\/code> would need quotes, the same rule as labels in Part 3.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">I edited the file and applied it (<code>configured<\/code>), so the repo matches the cluster with no sync step. On this one I made the change in the file first, then applied it \u2014 the right order. <code>kubectl annotate<\/code> would also have worked, but then the file wouldn&#8217;t match.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reading the annotation<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get deployments.apps api -o jsonpath='{.metadata.annotations.ticket}{\"\\n\"}' &gt; \/opt\/ckad\/00\/ticket.txt<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>deployments.apps<\/code> is the full name, <code>&lt;resource&gt;.&lt;group&gt;<\/code>. Same object as <code>deploy<\/code>. Tab completion tends to offer the plural form, which is why the command looks like that.<\/li>\n\n\n\n<li><code>annotations<\/code> is a map, and <code>ticket<\/code> is a key in it. Result: <code>CKAD-42<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">A key with dots in it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Kubernetes writes its own annotations too, and their keys have dots. To read the Deployment&#8217;s revision, the key is <code>deployment.kubernetes.io\/revision<\/code>, and dots in a <code>jsonpath<\/code> key need escaping:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get deployments.apps api -o jsonpath='{.metadata.annotations.deployment\\.kubernetes\\.io\/revision}{\"\\n\"}'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The key is literally <code>deployment.kubernetes.io\/revision<\/code>. Without the <code>\\.<\/code>, <code>jsonpath<\/code> reads it as <code>annotations<\/code> \u2192 <code>deployment<\/code> \u2192 <code>kubernetes<\/code> \u2192 <code>io\/revision<\/code>, a nested path that doesn&#8217;t exist. The result is a silent blank, not an error \u2014 the same failure mode as the wrong field name in Part 4.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Revision 4, not 5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The result was 4. I had predicted it might be 5, because of the ReplicaSet I deleted and rebuilt in Part 4. But a revision counts template changes, not ReplicaSets. Deleting and rebuilding the same template, with the same hash, doesn&#8217;t make a new revision. And the annotation on the Deployment&#8217;s own metadata didn&#8217;t change the template either.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Annotations:            deployment.kubernetes.io\/revision: 4\n                        owner: reza<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Labels vs annotations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Purpose: labels identify and select. Annotations attach information.<\/li>\n\n\n\n<li>Selectable: labels yes (with <code>-l<\/code>, <code>Services<\/code>, <code>ReplicaSets<\/code>). Annotations no.<\/li>\n\n\n\n<li>Size: label values are short (63 characters at most, limited characters). Annotations can hold any text, including long values.<\/li>\n\n\n\n<li>Who reads them: labels are read by controllers and <code>Services<\/code>. Annotations are read by tools: <code>kubectl<\/code>, deployers, dashboards.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Three annotations Kubernetes writes that keep showing up:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>deployment.kubernetes.io\/revision<\/code>: the Deployment&#8217;s current revision, and each ReplicaSet&#8217;s own number is in its annotation too.<\/li>\n\n\n\n<li><code>kubectl.kubernetes.io\/last-applied-configuration<\/code>: what <code>apply<\/code> compares against. That&#8217;s what made <code>p2<\/code> and <code>p3<\/code> configured in the sync step.<\/li>\n\n\n\n<li><code>kubernetes.io\/change-cause<\/code>: fills the <code>CHANGE-CAUSE<\/code> column in <code>kubectl rollout history<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What I learned<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>metadata.namespace<\/code> in the file beats the <code>-n<\/code> flag, which beats the context. If the file and the flag disagree, <code>apply<\/code> refuses.<\/li>\n\n\n\n<li>Put a namespace before the objects that live in it, in the same file.<\/li>\n\n\n\n<li>&#8220;All pods&#8221; means every phase, in every namespace. Running-only is a different question, and <code>--no-headers<\/code> changes the count by one.<\/li>\n\n\n\n<li>A comma in a selector means AND. For OR on one key, use <code>in<\/code>.<\/li>\n\n\n\n<li><code>!=<\/code> and <code>notin<\/code> also match pods that don&#8217;t have the key. Add an existence check: <code>env,env!=dev<\/code>.<\/li>\n\n\n\n<li>Quote selectors that contain <code>!<\/code> or <code>(<\/code>.<\/li>\n\n\n\n<li>Labels change live, with <code>--overwrite<\/code> for an existing key and <code>key-<\/code> to remove one. Then sync the file.<\/li>\n\n\n\n<li>Annotations can&#8217;t be selected on. On the Deployment&#8217;s metadata they change nothing. On the template, they roll out new pods.<\/li>\n\n\n\n<li>Escape dots in <code>jsonpath<\/code> keys: <code>deployment\\.kubernetes\\.io\/revision<\/code>. Otherwise it&#8217;s another silent blank.<\/li>\n\n\n\n<li>A revision is a template version. Rebuilding the same template doesn&#8217;t add one.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What is next<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Next in the lab: <code>Services<\/code>. A stable name and IP in front of pods that keep changing, a broken Service that selects the wrong pods, and the labels that decide who gets the traffic.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Where we are Hi, I&#8217;m Reza. I&#8217;m sharing my preparation for the CKAD exam, practiced on a K3s cluster in my home&hellip;<\/p>\n","protected":false},"author":2,"featured_media":388,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_rezaops_part":"5","_rezaops_linkedin_url":"https:\/\/www.linkedin.com\/pulse\/ckad-prep-part-5-selector-matched-13-pods-reza-chegini-jxocc\/","footnotes":""},"categories":[10,62,9,74],"tags":[230,224,68,5,3,229,231,6],"series":[226],"class_list":["post-390","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-home-lab","category-kubernetes","category-linux","tag-annotations","tag-ckad","tag-k3s","tag-kubectl","tag-kubernetes","tag-labels","tag-namespaces","tag-yaml","series-ckad-prep"],"jetpack_featured_media_url":"https:\/\/rezachegini.com\/wp-content\/uploads\/2026\/12\/ckad-prep-part-5-cover.png","_links":{"self":[{"href":"https:\/\/rezachegini.com\/index.php?rest_route=\/wp\/v2\/posts\/390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rezachegini.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rezachegini.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rezachegini.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rezachegini.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=390"}],"version-history":[{"count":1,"href":"https:\/\/rezachegini.com\/index.php?rest_route=\/wp\/v2\/posts\/390\/revisions"}],"predecessor-version":[{"id":391,"href":"https:\/\/rezachegini.com\/index.php?rest_route=\/wp\/v2\/posts\/390\/revisions\/391"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rezachegini.com\/index.php?rest_route=\/wp\/v2\/media\/388"}],"wp:attachment":[{"href":"https:\/\/rezachegini.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rezachegini.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rezachegini.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=390"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/rezachegini.com\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}