Cloud Native DevOps with Kubernetes, read against EKS
Cloud Native DevOps with Kubernetes, read against EKS
Cloud Native DevOps with Kubernetes by John Arundel and Justin Domingus (O'Reilly) is the first edition, released on 24 January 2019 and dated February 2019. The PDF has 344 pages: 16 chapters, an afterword and an index. It came out of the authors' consulting work, and it is openly opinionated. "Use managed Kubernetes if you can" is a section title, and the book's companion repository (
cloudnativedevops/demo ) carries one Go "Hello, 世界" service through every chapter. The text was written against Kubernetes 1.10 to 1.12, Docker Desktop's built-in cluster and Helm 2.9.1, and its cloud is Google's: the managed-service chapter calls GKE "the clear winner" (PDF p. 75), and the worked CD pipeline runs on Google Cloud Build.A second edition followed in 2022. This page reads only the first edition, because that is the PDF that was supplied. It does not say which of the corrections below the second edition fixed. Check your own copy.
Amazon EKS gets three paragraphs in the first edition (PDF p. 69). They say it is "not quite as seamless" as GKE, more expensive because it charges for the control plane, and "has some distance to go." Fargate is "scheduled to support EKS by 2019" (p. 78). So the AWS mapping on this page comes from this review, not from the book. For each chapter, the page says what EKS or an AWS service now does, what stays yours, and what no longer works as printed.
How it was read. The book's full extracted text was read straight through in chunks. Page numbers are PDF page numbers, found by counting form-feed characters in the extracted text. A line's PDF page is the number of form feeds before it plus one. The printed page number is the PDF page minus 27, so PDF p. 57 is printed page 30. Every command this page marks broken or fixed was run with kubectl 1.33.13 (client-side, against a stub discovery endpoint, with no cluster) or Helm 4.3.0. Every YAML snippet marked invalid was strictly decoded against the
k8s.io/api v0.32.1 types. AWS parameters were checked against the EKS, ECR, CloudWatch, Lambda and AWS Backup API models in botocore 1.43.107. Nothing was deployed.This page does not repeat the EKS basics. For those, see the Kubernetes Handbook read against AWS , Kubernetes on AWS, services only and the EKS cheat sheet .
What "cloud native" meant in 2019, and what it means now
The book defines cloud native by six properties: automatable, ubiquitous and flexible, resilient and scalable, dynamic, observable, and distributed (PDF pp. 42–43). Its best line borrows from Justin Garrison: cloud native "is the practice of accelerating your business by not running stuff that doesn't differentiate you" (p. 75). On AWS, that line is the whole argument for EKS over kops.
Later definitions mostly agree. They differ in emphasis:
source | its definition | what it adds to the book |
|---|---|---|
CNCF definition, quoted in Microsoft's Architecting Cloud Native .NET Applications | "Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach" | service meshes and declarative APIs are named; Microsoft adds Twelve-Factor plus API-first, telemetry and authentication as "factors 13–15" |
rootsongjc/awesome-cloud-native and exajobs/cloud-native-collection | "a behavior and design philosophy … any behavior or approach that improves resource utilization and application delivery efficiency in the cloud" | utilization: the book's cost chapter, promoted to the definition |
Jimmy Song, Kubernetes Handbook, "From cloud native to AI native" | Kubernetes as a programmable platform, "extensible without forking", moving through cloud-native, ML-native and AI-native stages | CRDs and operators as the centre. The book gives them one page (p. 197) |
Zhao Huabing on Envoy Gateway (2023) | Envoy was designed for dynamic, API-driven configuration (xDS), which a pod-churning cluster needs and a static NGINX config does not | the book's Envoy section (p. 202) points at this; Gateway API is where it ended up |
SNIA, Kubernetes in the Cloud (May 2019, presented by NetApp) | the same containers → orchestration → managed-service story, from the same months | a snapshot of the vendor landscape the book's chapter 3 describes, some of which no longer exists |
Cloud native on AWS services only walks the current CNCF landscape layer by layer. The landscape has turned over much faster than the definition. A 2016 InfoQ series on Kubernetes 1.3 still says "Minion" and introduces PetSet and beta Federation. An awesome list from about 2019 (wh211212/awesome-cloudnative) lists Weave Net, rkt, Conduit, Heapster-era monitoring, OpenTracing and Kubeless. Since then, Conduit has become Linkerd 2, OpenTracing has merged into OpenTelemetry, and rkt, Heapster and Kubeless have been retired. The book has the same problem: rkt as a runtime (p. 62), ksonnet, Draft, Weave Scope, PodPresets and Tiller. The shikanon CRI notes, written against Kubernetes 1.18, still describe a kubelet with dockershim built in. dockershim was removed in 1.24, and the EKS AMIs run containerd.
The map
chapter (PDF pages) | what it teaches | on EKS / AWS | stays yours |
|---|---|---|---|
1 Revolution in the Cloud (28–46) | cloud, DevOps, containers, the cloud-native definition, the "developer productivity engineering" team | Lambda and Fargate for the "funtainers" the book anticipates; the managed-service argument is EKS's argument | the organisational argument: distributed DevOps with a central platform team |
2 First Steps (48–58) | Docker Desktop, the demo app, Docker Hub, kubectl run , Minikube | Amazon ECR instead of Docker Hub; kind or minikube locally (no AWS equivalent) | the Dockerfile and the local loop |
3 Getting Kubernetes (60–79) | control plane, HA, the cost of self-hosting, managed services, installers | EKS runs the API servers and etcd; nodes from managed node groups, Karpenter, Auto Mode or Fargate | the decision not to self-host |
4 Kubernetes Objects (80–95) | Deployments, ReplicaSets, Pods, Services, Helm 2 | objects unchanged; type: LoadBalancer becomes an NLB via the AWS Load Balancer Controller; Helm 3 or 4, and EKS add-ons for cluster components | the manifests |
5 Managing Resources (96–121) | requests, limits, probes, PDBs, namespaces, quotas, cost | Karpenter consolidation, Spot through capacityType , Savings Plans; ENI-bound pod density | requests, limits, probes, PDBs: all of it |
6 Operating Clusters (122–137) | sizing, autoscaling, conformance, auditing, chaos | no master nodes; Karpenter or Auto Mode; control-plane logs to CloudWatch Logs (off by default); AWS FIS for chaos | capacity planning, the chaos discipline |
7 Kubernetes Power Tools (138–159) | kubectl techniques, debugging containers, contexts | aws eks update-kubeconfig writes the context; kubectl debug ; the EKS console's resources view | aliases, kubectx/kubens, jq |
8 Running Containers (160–178) | images, security contexts, PodSecurityPolicy, volumes | Pod Security Admission; EBS and EFS CSI drivers; ECR pulls through the node's IAM role | the security context on every container |
9 Managing Pods (180–204) | labels, affinity, taints, controllers, HPA, PodPresets, CRDs, Ingress, Istio, Envoy | topology.kubernetes.io/zone ; ALB via Ingress or Gateway API; ACM certificates; Istio self-managed; App Mesh has ended | labels, scheduling rules, controller choice |
10 Configuration and Secrets (206–224) | ConfigMaps, Secrets, Sops | Secrets envelope-encrypted with KMS by default (1.28+); Secrets Manager through the Secrets Store CSI driver; Sops with KMS still works | how configuration is shaped |
11 Security and Backups (226–245) | RBAC, image scanning, etcd, Velero, cluster monitoring | IAM plus access entries; ECR enhanced scanning (Inspector); etcd managed; Velero, or AWS Backup, whose API now has an EKS resource type | RBAC roles; restore drills |
12 Deploying Applications (246–262) | Helm charts, Helmfile, ksonnet, Kapitan, kustomize, kubeval | the Argo CD EKS capability; kubectl -k ; kubeconform | charts and overlays |
13 Development Workflow (264–273) | Skaffold, Draft, Telepresence, Knative, rollout strategies, Helm hooks | Argo Rollouts with ALB weighted target groups for canaries | strategies and migrations |
14 Continuous Deployment (274–288) | CD tools; a Cloud Build → GKE pipeline | CodeBuild, CodePipeline, ECR, then Argo CD; see CI/CD on AWS | the pipeline's shape: build once, promote the image |
15 Observability and Monitoring (290–303) | black-box checks, logs, metrics, tracing, health checks | CloudWatch Synthetics, Route 53 health checks, Container Insights, ADOT and X-Ray | what to instrument |
16 Metrics in Kubernetes (304–331) | RED and USE, percentiles, dashboards, alerting, tools | Amazon Managed Service for Prometheus with its managed scraper, Amazon Managed Grafana, CloudWatch | the dashboards and the alert policy |
Copy-paste hazards
Every row was run or decoded for this page unless it says otherwise. Most of these fail with a clear error. The dangerous ones succeed and do something other than what the book says.
book says | PDF page | what happens today | use instead |
|---|---|---|---|
kubectl run demo --image=… --port=9999 --labels app=demo → "deployment.apps created" | 57, 80, 83 | kubectl 1.33 creates a Pod, not a Deployment. The next step, kubectl port-forward deploy/demo , returns NotFound. --port=9999 also sets the wrong container port, because the app listens on 8888 | kubectl create deployment demo --image=cloudnatived/demo:hello --port=8888 |
kubectl run demo --image=… --dry-run -o yaml to generate a Deployment | 145 | warns that bare --dry-run is deprecated, then prints kind: Pod , apiVersion: v1 | kubectl create deployment … --dry-run=client -o yaml |
kubectl run demo … --expose --port 8888 → "service created, deployment created" | 150 | creates a Service and a Pod | fine for a throwaway test. For anything you keep, create a Deployment and kubectl expose it |
kubectl get … -o yaml --export | 145, 207 | error: unknown flag: --export | kubectl get -o yaml , then delete status , metadata.managedFields , uid and resourceVersion . Better: never apply what is not in git |
kubectl exec -it POD /bin/sh | 149, 152, 159 | error: exec [POD] [COMMAND] is not supported anymore. Use exec [POD] -- [COMMAND] instead | kubectl exec -it POD -- /bin/sh ; for a scratch image, kubectl debug -it POD --image=busybox:1.36 --target=demo |
kubectl get pods -a to find a failed hook Pod | 271 | error: unknown shorthand flag: 'a' in -a | kubectl get pods , which has listed completed and failed Pods by default for years |
apiVersion: extensions/v1beta1 , kind: Deployment | 86, 113, 145, 195, 248, 266, 267 | not served since 1.16 | apps/v1 , which requires spec.selector |
kind: Ingress in extensions/v1beta1 with backend.serviceName | 198–200 | not served since 1.22. In networking.k8s.io/v1 , backend is an unknown field | spec.ingressClassName: alb , pathType , backend.service.name and backend.service.port.number ; example in chapter 9 below |
policy/v1beta1 PodDisruptionBudget | 103 | not served since 1.25 | policy/v1 ; the spec is unchanged |
batch/v1beta1 CronJob | 194 | not served since 1.25 | batch/v1 , with timeZone if you need one; the EKS control plane runs in UTC |
autoscaling/v2beta1 HPA with targetAverageUtilization: 80 , scaling an extensions/v1beta1 Deployment | 195–196 | v2beta1 not served since 1.25. In autoscaling/v2 , targetAverageUtilization is an unknown field | autoscaling/v2 with target: {type: Utilization, averageUtilization: 80} and scaleTargetRef.apiVersion: apps/v1 ; or kubectl autoscale |
settings.k8s.io/v1alpha1 PodPreset | 196–197 | the API was removed in 1.20 | set it in the chart, or use a mutating policy (Kyverno, for example) |
PodSecurityPolicy ( policy/v1beta1 ), recommended "for larger infrastructures" | 172–173 | removed in 1.25. The printed volumes: - * is not valid YAML anyway, because * starts an alias | Pod Security Admission: label the namespace pod-security.kubernetes.io/enforce: restricted |
Pod-level securityContext with allowPrivilegeEscalation: false and runAsNonRoot: false | 172 | allowPrivilegeEscalation is a container-level field; strict decoding rejects it at Pod level. runAsNonRoot: false turns off the check the chapter just recommended | the container securityContext in chapter 8 below |
capabilities: drop: ["all"] | 172 | Pod Security Admission's restricted check compares against "ALL" exactly, so a lowercase all is rejected in a restricted namespace | drop: ["ALL"] |
podAffinity and podAntiAffinity with labelSelector: written as a list, and the required term written as a map | 187–188 | does not decode: requiredDuringScheduling… must be a list of terms, and labelSelector is an object | - labelSelector: {matchExpressions: [...]} with topologyKey beside it; or topologySpreadConstraints |
a queue-worker Job with completions: 1 , parallelism: 10 , said to "start 10 Pods" | 193 | the Job controller caps active Pods at remaining completions, so it runs one Pod (checked in job_controller.go ) | omit completions for a work queue, and leave parallelism: 10 |
"set the minReadySeconds field on the container" | 103 | unknown field on a container | spec.minReadySeconds on the Deployment |
cloud.google.com/gke-preemptible with DoesNotExist to keep critical Pods off preemptible nodes | 117 | succeeds on EKS and protects nothing. No EKS node carries that label, so every node matches, Spot included | karpenter.sh/capacity-type NotIn [spot] and eks.amazonaws.com/capacityType NotIn [SPOT] |
node affinity on failure-domain.beta.kubernetes.io/zone In [us-central1-a] | 185 | a deprecated label, and a GCP zone name. As a hard affinity on EKS the Pod stays Pending | topology.kubernetes.io/zone with your AWS zone names, or topologySpreadConstraints across zones |
Helm hook Job whose template: has name: but no metadata: | 270 | as printed it is not valid YAML. With name re-indented it is an unknown field under template | add metadata: under template ; consider backoffLimit: 0 and a longer deadline than 60 seconds for a migration |
kubectl apply -f helm-auth.yaml ; helm init --service-account tiller | 92 | Helm 4.3: unknown command "init" . Tiller went with Helm 3 | nothing to initialise; Helm uses your kubeconfig |
helm install --name demo ./k8s/demo ; helm install myrepo/myapp | 93, 251, 253 | unknown flag: --name ; without a name: must either provide a name or specify --generate-name | helm install demo ./k8s/demo |
Helmfile stable repo at kubernetes-charts.storage.googleapis.com ; stable/prometheus | 256–257 | the stable repository was retired in November 2020, and that URL no longer serves it | prometheus-community/kube-prometheus-stack , or AMP's managed scraper and Managed Grafana |
the kustomization with bases , commonLabels , patchesStrategicMerge and a trailing EOF | 260 | with the EOF line: invalid Kustomization . Without it: three deprecation warnings from kubectl 1.33's kustomize v5.6.0 | resources , labels and patches ; kustomize edit fix rewrites it |
echo xyzzy | base64 to build Secret data | 217 | gives eHl6enkK (with a newline). The book's own Secret shows eHl6enk= (without). Your password now ends in \n | printf %s xyzzy | base64 , or stringData , or kubectl create secret generic --from-literal |
go get -u go.mozilla.org/sops/cmd/sops | 222 | go get has not installed binaries since Go 1.18, and Sops moved to the getsops organisation | go install github.com/getsops/sops/v3/cmd/sops@latest , or a release binary (not run here) |
check RBAC or encryption with kubectl describe pod -n kube-system -l component=kube-apiserver | 217, 227 | on EKS there are no API-server Pods, so you get "No resources found". The book's rule ("if you don't see the flag, encryption is not enabled") gives the wrong answer | aws eks describe-cluster and read encryptionConfig ; RBAC is always on |
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article