@@ -9,13 +9,13 @@ draft: false
99When you see these kinds of errors it means that Kubernetes cannot find your Docker image.
1010The most common causes are:
1111
12- * The ` image ` value is your domain resource is set incorrectly, meaning Kubernetes will be
12+ * The ` image ` value in your domain resource is set incorrectly, meaning Kubernetes will be
1313 trying to pull the wrong image
1414* The image requires authentication or permission in order to pull it and you have not
1515 configured Kubernetes with the necessary credentials, for example in an ` imagePullSecret `
1616* You built the image on a machine that is not where your ` kubelet ` is running and Kubernetes
1717 cannot see the image, meaning you need to copy the image to the worker nodes or put it in
18- a Docker registry that is accessible the to worker nodes
18+ a Docker registry that is accessible the to all of the worker nodes
1919
2020Let's review what happens when Kubernetes starts a pod.
2121
@@ -24,22 +24,22 @@ Let's review what happens when Kubernetes starts a pod.
2424The definition of the pod contains a list of container specifications. Each container
2525specificiation contains the name (and optionally tag) of the image that should be used
2626to run that container. In the example above, there is a container called ` c1 ` which is
27- configured to use the docker image ` some.registry.com/owner/domain1:1.0 ` . This image
27+ configured to use the Docker image ` some.registry.com/owner/domain1:1.0 ` . This image
2828name is in the format ` registry address / owner / name : tag ` , so in this case the
2929registry is ` some.registry.com ` , then owner is ` owner ` , the image name is ` domain `
3030and the tag is ` 1.0 ` . Tags are a lot like version numbers, but they are not required
3131to be numbers or to be in any particular sequence or format. If you omit the tag, it
3232is assumed to be ` latest ` .
3333
3434{{% notice note %}}
35- The docker tag ` latest ` is confusing - it does not actually mean the latest version of
35+ The Docker tag ` latest ` is confusing - it does not actually mean the latest version of
3636the image that was created or published in the registry, it just literally means
3737whichever version the owner decided to call "latest". Docker and Kubernetes make
38- some assumptions about latest, and it generally recommended to avoid using it and instead
38+ some assumptions about latest, and it is generally recommended to avoid using it and instead
3939specify the actual version/tag that you really want.
4040{{% /notice %}}
4141
42- First, Kuberentes will check to see if the requested image is available in the local
42+ First, Kubernetes will check to see if the requested image is available in the local
4343Docker image store on whichever worker node the pod was scheduled on. If it is there,
4444then it will use that image to start the container. If it is not there, then Kubernetes
4545will attempt to pull the image from a remote Docker registry.
@@ -57,32 +57,32 @@ store and start the container.
5757#### Images that require authentication
5858
5959If the remote Docker registry requires authentication, then you will need to provide
60- the authentication details in a Kubernetes ` docker -registry` secret and tell Kubernetes
60+ the authentication details in a Kubernetes ` Docker -registry` secret and tell Kubernetes
6161to use that secret when pulling the image.
6262
6363To create a secret, you can use the following command:
6464
6565```
66- kubectl create secret docker -registry secret1 \
67- --docker -server=some.registry.com \
68- --docker -username=bob \
69- --docker -password=bigSecret \
70- --docker -email=bob@some.com \
66+ kubectl create secret Docker -registry secret1 \
67+ --Docker -server=some.registry.com \
68+ --Docker -username=bob \
69+ --Docker -password=bigSecret \
70+ --Docker -email=bob@some.com \
7171 --namespace=default
7272```
7373
74- In this command, you would replace ` secret1 ` with the name of the secret; the ` docker -server`
75- is set to the registry name, without the ` https:// ` prefix; the ` docker -username` , ` docker -password`
76- and ` docker -email` are set to match the credentials you use the authenticate to the remote
74+ In this command, you would replace ` secret1 ` with the name of the secret; the ` Docker -server`
75+ is set to the registry name, without the ` https:// ` prefix; the ` Docker -username` , ` Docker -password`
76+ and ` Docker -email` are set to match the credentials you use to authenticate to the remote
7777Docker registry; and the ` namespace ` must be set to the same namespace where you intend to
78- use the image
78+ use the image.
7979
8080{{% notice note %}}
81- Some registries may need a suffix making the ` docker -server` something like ` some.registry.com/v2 `
81+ Some registries may need a suffix making the ` Docker -server` something like ` some.registry.com/v2 `
8282for example. You will need to check with your registry provider's documentation to see if this is needed.
8383{{% /notice %}}
8484
85- Once the secret is created, you need to tell Kubernetes to use it. This is done by adding
85+ After the secret is created, you need to tell Kubernetes to use it. This is done by adding
8686an ` imagePullSecret ` to your Kubernetes YAML file. In the case of a WebLogic domain, you
8787add the secret name to the ` imagePullSecret ` in the domain custom resource YAML file.
8888
@@ -127,25 +127,25 @@ remote Docker registries or if your images require different authentication cred
127127
128128#### Manually copying the image to your worker nodes
129129
130- If you are not able to use a remote Docker registry, for example if you Kubernetes cluster is
130+ If you are not able to use a remote Docker registry, for example if your Kubernetes cluster is
131131in a secure network with no external access, you can manually copy the Docker images to the
132132cluster instead.
133133
134134On the machine where you created the image, export it into a tar file using this command:
135135
136136```
137- docker save domain1:1.0 > domain1.tar
137+ Docker save domain1:1.0 > domain1.tar
138138```
139139
140140Then copy that tar file to each worker node in your Kubernetes cluster and run this command
141141on each node:
142142
143143```
144- docker load < domain1.tar
144+ Docker load < domain1.tar
145145```
146146
147147#### Restart pods to clear the error
148148
149- After you have ensured the images are accessible on all worker nodes, you may need to restart
149+ After you have ensured that the images are accessible on all worker nodes, you may need to restart
150150the pods so that Kubernetes will attempt to pull the images again. You can do this by
151151deleting the pods themselves, or deleting the domain resource and then recreating it.
0 commit comments