Errata

Kubernetes: Up and Running

Errata for Kubernetes: Up and Running, 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 Apendix A
Setting Up Networking

"You may also need to edit /etc/defaults/isc-dhcp-server to set theINTERFACES environment variable to eth0."


The path should be "/etc/default/isc-dhcp-server"
default not defaults

Note from the Author or Editor:
Confirmed and modified in Atlas, no further changes needed.

Stefaan Verscheure  Sep 10, 2020 
Page 9.7
Autoscaling a ReplicaSet

heapster is deprecated should be replaced by "metrics-server"

Note from the Author or Editor:
Confirmed and fixed in Atlas, no further action required.

Anonymous  Nov 18, 2019 
Page 18
1st paragraph

section 3 of Dockerfile should read

#Copy package files and install dependencies
COPY package*.json ./
RUN npm install
RUN npm install express

Note from the Author or Editor:
Confirmed and fixed in Atlas, nothing further needed.

mark baldry  Nov 15, 2019 
Page 53
Running Commands in Your Container with exec

Running the command this way is deprecated: kubectl exec kuard date

kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.

Note from the Author or Editor:
This will be fixed in future editions.

Ileriayo Adebiyi  Jan 23, 2022 
Page 67
Applying Labels, code block 1,2 and 3

Using kubectl run with the --replicas flag to create a deployment has been deprecated.
Update the commands to
- first, create a deployment
e.g., kubectl create deployment alpaca-prod --image=gcr.io/kuar-demo/kuard-amd64:blue --replicas=3

- and then label the deployment:
e.g., kubectl label deployment alpaca-prod --overwrite ver=1 app=alpaca env=prod

Note from the Author or Editor:
This will be fixed in an upcoming edition.

Note that relabeling the deployment doesn't quite achieve the same thing since only the Deployment is labelled, not the pods that it creates.

Ileriayo Adebiyi  Jan 31, 2022 
Page 76
The Service Object

The kubectl run command doesn't have a --replicas flag anymore and thus the CLI commands fail.

Note from the Author or Editor:
This will be replaced with kubectl create deployment ...

Ileriayo Adebiyi  Jan 23, 2022 
Page 91
First kubectl command

The location of the Contour Ingress manifest resource should be updated:

Previous (didn't work):
```
kubectl apply -f https://j.hept.io/contour-deployment-rbac
```

New (working):
```
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
```

Note from the Author or Editor:
Confirmed and fixed in Atlas, no further action needed.

Alex Chan  Dec 28, 2019 
Page 91
kubectl get command near the bottom of the page

The command to fetch the Contour service is not correct. It now appears to be:
kubectl get -n projectcontour service contour -o wide




Note from the Author or Editor:
Confirmed and fixed in Atlas.

Andy Smith  Jul 30, 2020 
Page 91
second kubectl command

Change namespace from heptio-contour to projectcontour

kubectl get -n projectcontour service contour -o wide

Note from the Author or Editor:
This is due to the project changing over time, this will be reflected in future editions.

Denys van Kempen  Nov 12, 2021 
Page 93
1

The first column of the output of command 'kubectl get services -o wide' needs to be updated to the following:

NAME
alpaca
bandicoot
be-default
kubernetes

The current output incorrectly shows '-prod' appended to 'alpaca' and 'bandicoot'.

Note from the Author or Editor:
Confirmed and fixed in atlas.

zul kifal irshad  Apr 20, 2020 
Page 93
Paragraph "Simplest Usage"

In Example 8-1. simple-ingress.yaml, the backend serviceName is set to "alpaca".
However, when the command "kubectl describe ingress simple-ingress" is executed, the "be-default:8080" is shown as the Default backend, instead of "alpaca" that would be the expected/correct value here, as also confirmed by the following paragraph (in page 94), which explains that:
"This sets things up so that any HTTP request that hits the Ingress controller is forwarded on to the alpaca service."

Note from the Author or Editor:
Fixed in future editions.

Ioannis Kolaxis  Sep 13, 2021 
Page 107
Creating a ReplicaSet

The example 9-1 describing a simple ReplicaSet seems to be invalid, when you try to create the ReplicaSet the k8s responds:

no matches for kind "ReplicaSet" in version "v1beta1"

You can use `apiVersion: apps/v1` instead of `extensions/v1beta1` but you still need to inform the `spec.selector` to make it work.


My env: MacOS 10.15.2, minikube v1.7.3, kubectl GitVersion:"v1.15.5", k8s GitVersion:"v1.16.2"

Note from the Author or Editor:
Confirmed and fixed in Atlas.

Anonymous  Feb 22, 2020 
Page 108
"Finding a ReplicaSet" from a Pod section

The annotation "kubernetes.io/created-by" described by the author has been deprecated in 2017 and is no longer created automatically. See the relevent GitHub issue https://github.com/kubernetes/kubernetes/issues/44407 and merged Pull Request https://github.com/kubernetes/kubernetes/pull/50536 .

Note from the Author or Editor:
Confirmed and fixed in Atlas.

Karol Szczepanski  Jan 09, 2020 
Page 114
Codeblock under "Your First Deployment"

The Deployment object is now in the "apiVersion: apps/v1" rather than "apiVersion: extensions/v1beta1".

Note from the Author or Editor:
This will be fixed in future editions.

Ileriayo Adebiyi  Feb 14, 2022 
Page 140
Bottom of the page

This command won't run as expected with the current image `kuard-amd64:blue`:

```
$ kubectl run -i oneshot \
--image=gcr.io/kuar-demo/kuard-amd64:blue \
--restart=OnFailure \
-- --keygen-enable \
--keygen-exit-on-complete \
--keygen-num-to-gen 10
```

It fails because it tries to execute `--keygen-enable` as executable inside the image. I got it working by supplying the `/kuard` executable explicitly:

```
$ kubectl run -i oneshot \
--image=gcr.io/kuar-demo/kuard-amd64:blue \
--restart=OnFailure \
-- /kuard --keygen-enable \
--keygen-exit-on-complete \
--keygen-num-to-gen 10
```

Note from the Author or Editor:
Confirmed and fixed in Atlas.

Christian Zeller  Mar 01, 2020 
Page 143
The kubectl command near the bottom of page 143

Book says to use:

$ kubectl get pod -a -l job-name=oneshot

This gives:

Error: unknown shorthand flag: 'a' in -a
See 'kubectl get --help' for usage.

Correct command appears to be using a capital -A instead of -a:

$ kubectl get pod -A -l job-name=oneshot

Note from the Author or Editor:
Confirmed and fixed in Atlas.

Eric Dorsey  Mar 09, 2020 
Page 147
top

ReplicaSet definition doesn't conform to newer K8s release. The file should look like this:

piVersion: apps/v1
kind: ReplicaSet
metadata:
labels:
¦ app: work-queue
¦ component: queue
¦ chapter: jobs
name: queue
spec:
selector:
¦ matchLabels:
¦ ¦ chapter: jobs
replicas: 1
template:
¦ metadata:
¦ ¦ labels:
¦ ¦ ¦ app: work-queue
¦ ¦ ¦ component: queue
¦ ¦ ¦ chapter: jobs
¦ spec:
¦ ¦ containers:
¦ ¦ - name: queue
¦ ¦ ¦ image: "gcr.io/kuar-demo/kuard-amd64:1"
¦ ¦ ¦ imagePullPolicy: Always

Note from the Author or Editor:
Confirmed and fixed in Atlas.

Carsten Wieschiolek  Jul 17, 2020 
Page 162
1st line

The provided regular expression for ConfigMap/Secret key naming does not seem to be correct. Indeed, all closing square brackets appear to have been replaced by opening square brackets.

Therefore, the current printed expression :

^[.[?[a-zAZ0-9[([.[?[a-zA-Z0-9[+[-_a-zA-Z0-9[?)*$

Should instead resemble something like the following :

^[.]?[a-zAZ0-9]([.]?[a-zA-Z0-9]+[-_a-zA-Z0-9]?)*$

Note from the Author or Editor:
Confirmed and fixed in Atlas, no additional changes needed.

Fabien Malfoy  Oct 17, 2019 
Page 187
Bottom of the page, example 15-10

Missing entry in YAML: "spec.selector.matchLabels.app: mongo"

Note from the Author or Editor:
Confirmed and fixed in Atlas.

Dimitri Hautot  Jan 20, 2020 
Page 189
Middle of the page, in the bird outline

The StatefulSet definition was made in file mongo-simple.yaml, not mongo.yaml.

Note from the Author or Editor:
Fixed in Atlas.

Dimitri Hautot  Jan 20, 2020 
Page 218
Example 17-11. redis.yaml

The config yaml after
- emptyDir:
name: data
are redundant. Looks like it's from 1st edition(the redis version is from 1st edtion) and somehow remains there.

Note from the Author or Editor:
Fixed in Atlas.

Ken Chen  May 31, 2020 
Page 229
3rd paragraph

langauges --> languages

Note from the Author or Editor:
Fixed in Atlas.

Dimitri Hautot  Jan 22, 2020