Errata

Kubernetes Patterns

Errata for Kubernetes Patterns, Second Edition

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page Chapter 3
Figure 3-1, Figure 3-2, Figure 3-3, Figure 3-4

All figures show the upgrade from tag 1.0 to 1.1, however, the tag 1.1 for the container image `k8spatterns/random-generator` doesn't exist in Docker Hub. The examples give off the impression that tag 1.1 does exist.

I suggest push a tag 1.1 or using tag 2.0 in the figures for more clarity.

Note from the Author or Editor:
Thanks for the heads up, I will push a new version 1.1 to Docker Hub so that this figures refer to real images.

These images though meant to be illustrative (there is no concrete image meantioned in the figure or its description) but I agree since we use `k8spatterns/random-generator` before and after this figure it makes sense to offer this version of the image, too.

Benjamin Muschko  May 17, 2023  May 26, 2023
Page 31
Example 3-1

The `spec.selector` section doesn't use the correct indentation. It is missing 2 spaces. The creation of the object from the code snippet won't work.

Note from the Author or Editor:
Thanks! Will be fixed in the next reprint.

Benjamin Muschko  May 11, 2023  May 26, 2023
Page 31
Example 3-1

The Pod template of the Deployment defines a readiness probe. The file checked in the example does not exist. Therefore, the replicas never "become ready".

```
$ kubectl get pods -l app=random-generator
NAME READY STATUS RESTARTS AGE
random-generator-7dc6fcb869-jsqsf 0/1 Running 0 38s
random-generator-7dc6fcb869-sccx7 0/1 Running 0 38s
random-generator-7dc6fcb869-zkdxj 0/1 Running 0 38s

$ kubectl exec -it random-generator-7dc6fcb869-jsqsf -- /bin/sh
# stat /random-generator-ready
stat: cannot statx '/random-generator-ready': No such file or directory
```

Note from the Author or Editor:
Sorry, this was a last minute change in the image where we moved all operations that happened in the root directory ("/") to one that is more easily accessible (to avoid issues on the certain installation on minikube as it has been reported). Actually the check should go to `/tmp/random-generator-ready`. I'm going to fix this in text. Thanks!

Benjamin Muschko  May 17, 2023  May 26, 2023
Page 43
Example 4-1

The `spec.containers[].ports[].protocol` attribute doesn't use the correct indentation. It is missing 2 spaces. The creation of the object from the code snippet won't work.

Note from the Author or Editor:
Thanks for the find! We actually had this issue already in the first edition, it's fixed now for the next reprint / e-versions.

Benjamin Muschko  May 11, 2023  May 26, 2023
Page 47
Example 4-4

The configuration attributes (e.g. `initialDelaySeconds`, `periodSeconds` etc.) for the startup and liveness probe definitions don't use the correct indentation. They have 2 additional spaces. The creation of the object from the code snippet won't work.

Note from the Author or Editor:
Thanks you, I fixed i for the next versions.

Benjamin Muschko  May 11, 2023  May 26, 2023
Page 56
Example 5-3

There should be a `restartPolicy: OnFailure` as this example demonstrates a Pod that runs for a certain time, much like a step in a CI pipeline. It does not make sense to restart the Pod (which is the default) as this leads to a CrashLoopBackOff error.

Roland Huss  May 17, 2023  May 26, 2023
Page 139,140
Examples 13-8 and 13-9

Both examples use an outdated API version for Ingress: `networking.kubernetes.io:v1beta1` instead of `networking.kubernetes.io:v1`, so these examples only work up to Kubernetes 1.21.

The examples have been fixed for the new API versions (the examples in the GitHub repo already contain the update, too)

Roland Huss  Mar 21, 2023  May 26, 2023
Page 156, 162
Examples 15-1 and 16-1

The image "axeclbr/git" in the example is not available on Docker Hub anymore.

It has been replaced by "bitnami/git" and for the Sidecar example the git pull loop needed to be updated because of this.

The example repository contains the updated images, too.

Roland Huss  Mar 28, 2023  May 26, 2023
Printed, PDF
Page 233
Example 24-6

In the example, the field "example:" must be "examples:" (plural instead of singular). This is fixed in the latest update.

Roland Huß
Roland Huß
 
Mar 20, 2023  May 26, 2023
Printed, PDF
Page 234
Example 24-7

An AuthorizationPolicy with an empty selector and a DENY action overrules any ALLOW action. For a default deny-all policy, in Istio, you need to provide an empty spec section (spec: {}). This is different from how the deny-all rule is specified for a NetworkPolicy.

This has been fixed now.

Roland Huß
Roland Huß
 
Mar 20, 2023  May 26, 2023
PDF
Page 256
Heading of subsection

The title must be "Authorization Policies," not "Authentication Policies". While the content correctly talks about Istio's AuthorizationPolicy resource, this has been confused in the heading and two other places within that subsection. Fixed with the latest update.

Roland Huß
Roland Huß
 
Mar 20, 2023  May 26, 2023