Skip to content

Commit 18ef004

Browse files
authored
Merge pull request #35095 from mjpytlak/bz1886814
BZ:1886814 Updated image repository from MyBox to RedHat
2 parents ef1f1f8 + 15e356f commit 18ef004

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

modules/nodes-containers-init-creating.adoc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// * nodes/nodes-containers-init.adoc
44

55
[id="nodes-containers-init-creating_{context}"]
6-
= Creating Init Containers
6+
= Creating Init Containers
77

88
The following example outlines a simple Pod which has two Init Containers. The first waits for `myservice` and the second waits for `mydb`. After both containers complete, the pod begins.
99

@@ -22,15 +22,15 @@ metadata:
2222
spec:
2323
containers:
2424
- name: myapp-container
25-
image: busybox
25+
image: registry.access.redhat.com/ubi8/ubi:latest
2626
command: ['sh', '-c', 'echo The app is running! && sleep 3600']
2727
initContainers:
2828
- name: init-myservice
29-
image: busybox
30-
command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;']
29+
image: registry.access.redhat.com/ubi8/ubi:latest
30+
command: ['sh', '-c', 'until getent hosts myservice; do echo waiting for myservice; sleep 2; done;']
3131
- name: init-mydb
32-
image: busybox
33-
command: ['sh', '-c', 'until nslookup mydb; do echo waiting for mydb; sleep 2; done;']
32+
image: registry.access.redhat.com/ubi8/ubi:latest
33+
command: ['sh', '-c', 'until getent hosts mydb; do echo waiting for mydb; sleep 2; done;']
3434
----
3535

3636
. Create a YAML file for the `myservice` service.
@@ -66,7 +66,7 @@ spec:
6666
. Run the following command to create the `myapp-pod`:
6767
+
6868
[source,terminal]
69-
----
69+
----
7070
$ oc create -f myapp.yaml
7171
----
7272
+
@@ -90,7 +90,7 @@ NAME READY STATUS RESTARTS AGE
9090
myapp-pod 0/1 Init:0/2 0 5s
9191
----
9292
+
93-
Note that the pod status indicates it is waiting
93+
Note that the pod status indicates it is waiting
9494

9595
. Run the following commands to create the services:
9696
+
@@ -117,4 +117,3 @@ $ oc get pods
117117
NAME READY STATUS RESTARTS AGE
118118
myapp-pod 1/1 Running 0 2m
119119
----
120-

0 commit comments

Comments
 (0)