Skip to content

Commit

Permalink
Merge pull request #11407 from mburke5678/enterprise-3.7
Browse files Browse the repository at this point in the history
[enterprise-3.7] Don't use nginx image for the Pod example
  • Loading branch information
mburke5678 authored Aug 7, 2018
2 parents e0449d0 + 2077822 commit 47f12f6
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 64 deletions.
4 changes: 2 additions & 2 deletions admin_guide/managing_pods.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ annotations. For example, to limit both pod egress and ingress bandwidth to 10M/
"spec": {
"containers": [
{
"image": "nginx",
"name": "nginx"
"image": "openshift/hello-openshift",
"name": "hello-openshift"
}
]
},
Expand Down
1 change: 0 additions & 1 deletion architecture/additional_concepts/storage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -584,5 +584,4 @@ spec:
- name: mypd
persistentVolumeClaim:
claimName: myclaim
----
9 changes: 5 additions & 4 deletions architecture/core_concepts/pods_and_services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,13 @@ labels:
====



Consider:

- A pod consisting of an *nginx* container, with the label
*role=webserver*.
- A pod consisting of an *Apache httpd* container, with the same label
*role=webserver*.
* A pod consisting of an *nginx* container, with the label *role=webserver*.

* A pod consisting of an *Apache httpd* container, with the same label *role=webserver*.

A service or replication controller that is defined to use pods with the
*role=webserver* label treats both of these pods as part of the same group.
Expand Down
8 changes: 4 additions & 4 deletions cli_reference/cli_by_example_content.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,15 @@
[options="nowrap"]
----
// Create a route based on service nginx. The new route will re-use nginx's labels
$ oc expose svc/nginx
// Create a route based on service ruby-hello-world. The new route will re-use the ruby-hello-world labels
$ oc expose svc/ruby-hello-world
// Create a route and specify your own label and route name
$ oc expose svc/nginx -l name=myroute --name=fromdowntown
$ oc expose svc/ruby-hello-world -l name=myroute --name=fromdowntown
ifdef::openshift-enterprise,openshift-origin,openshift-dedicated[]
// Create a route and specify a hostname
$ oc expose svc/nginx --hostname=www.example.com
$ oc expose svc/ruby-hello-world --hostname=www.example.com
endif::[]
// Expose a deployment configuration as a service and use the specified port
Expand Down
2 changes: 1 addition & 1 deletion dev_guide/application_lifecycle/new_app.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ be grouped together. To group the image built from a source repository with
other images, specify its builder image in the group:

----
$ oc new-app nginx+mysql
$ oc new-app ruby+mysql
----

To deploy an image built from source and an external image together:
Expand Down
22 changes: 11 additions & 11 deletions dev_guide/compute_resources.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ apiVersion: v1
kind: Pod
spec:
containers:
- image: nginx
name: nginx
- image: openshift/hello-openshift
name: hello-openshift
resources:
requests:
cpu: 100m <1>
Expand Down Expand Up @@ -182,22 +182,22 @@ endif::[]
To view compute resources for a pod:

----
$ oc describe pod nginx-tfjxt
Name: nginx-tfjxt
$ oc describe pod ruby-hello-world-tfjxt
Name: ruby-hello-world-tfjxt
Namespace: default
Image(s): nginx
Image(s): ruby-hello-world
Node: /
Labels: run=nginx
Labels: run=ruby-hello-world
Status: Pending
Reason:
Message:
IP:
Replication Controllers: nginx (1/1 replicas created)
Replication Controllers: ruby-hello-world (1/1 replicas created)
Containers:
nginx:
ruby-hello-world:
Container ID:
Image: nginx
Image ID:
Image: ruby-hello-world
QoS Tier:
cpu: Burstable
memory: Burstable
Expand Down Expand Up @@ -311,13 +311,13 @@ To specify compute resources via the CLI:

ifdef::openshift-origin,openshift-enterprise,openshift-dedicated[]
----
$ oc run nginx --image=nginx --limits=cpu=200m,memory=400Mi --requests=cpu=100m,memory=200Mi
$ oc run ruby-hello-world --image=ruby-hello-world --limits=cpu=200m,memory=400Mi --requests=cpu=100m,memory=200Mi
----
endif::[]

ifdef::openshift-online[]
----
$ oc run nginx --image=nginx --limits=memory=400Mi
$ oc run ruby-hello-world --image=ruby-hello-world --limits=memory=400Mi
----
endif::[]

Expand Down
2 changes: 1 addition & 1 deletion dev_guide/persistent_volumes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spec:
containers:
-
name: "myfrontend"
image: "nginx"
image: openshift/hello-openshift
ports:
-
containerPort: 80
Expand Down
10 changes: 5 additions & 5 deletions install_config/storage_examples/privileged_pod_storage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ xref:../../install_config/persistent_storage/index.adoc#install-config-persisten
** xref:../persistent_storage/persistent_storage_glusterfs.adoc#creating-gluster-endpoints[Endpoints and services]: *_gluster-endpoints-service.yaml_* and *_gluster-endpoints.yaml_*
** xref:../persistent_storage/persistent_storage_glusterfs.adoc#gfs-creating-persistent-volume[Persistent volumes]: *_gluster-pv.yaml_*
** xref:../../architecture/additional_concepts/storage.adoc#persistent-volume-claims[Persistent volume claims]: *_gluster-pvc.yaml_*
** xref:create-priv-pvc[Privileged pods]: *_gluster-nginx-pod.yaml_*
** xref:create-priv-pvc[Privileged pods]: *_gluster-S3-pod.yaml_*
* A user with the
xref:../../admin_guide/manage_rbac.adoc#managing-role-bindings[*cluster-admin*] role binding. For this guide, that user is called `admin`.

Expand Down Expand Up @@ -112,7 +112,7 @@ $ oc create -f gluster-pvc.yaml -n <project_name>
[source,yaml]
----
apiVersion: v1
id: gluster-nginx-pvc
id: gluster-S3-pvc
kind: Pod
metadata:
name: gluster-nginx-priv
Expand Down Expand Up @@ -141,15 +141,15 @@ to that mount point.
As regular user, create a pod from the definition:
+
----
$ oc create -f gluster-nginx-pod.yaml
$ oc create -f gluster-S3-pod.yaml
----

. Verify that the pod created successfully:
+
----
$ oc get pods
NAME READY STATUS RESTARTS AGE
gluster-nginx-pod 1/1 Running 0 36m
gluster-S3-pod 1/1 Running 0 36m
----
+
It can take several minutes for the pod to create.
Expand Down Expand Up @@ -186,7 +186,7 @@ metadata:
+
----
$ oc rsh <pod_name>
[root@gluster-nginx-pvc /]# mount
[root@gluster-S3-pvc /]# mount
----

. Examine the output for the Gluster volume:
Expand Down
62 changes: 31 additions & 31 deletions install_config/storage_examples/shared_storage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ read-write access:
apiVersion: v1
kind: Pod
metadata:
name: nginx-nfs-pod <1>
name: hello-openshift-nfs-pod <1>
labels:
name: nginx-nfs-pod
name: hello-openshift-nfs-pod
spec:
containers:
- name: nginx-nfs-pod
image: fedora/nginx <2>
- name: hello-openshift-nfs-pod
image: openshift/hello-openshift <2>
ports:
- name: web
containerPort: 80
Expand Down Expand Up @@ -215,7 +215,7 @@ Save the pod definition to a file, for example *_nfs.yaml_*, and create the pod:
====
----
# oc create -f nfs.yaml
pod "nginx-nfs-pod" created
pod "hello-openshift-nfs-pod" created
----
====

Expand All @@ -224,31 +224,31 @@ Verify that the pod was created:
====
----
# oc get pods
NAME READY STATUS RESTARTS AGE
nginx-nfs-pod 1/1 Running 0 4s
NAME READY STATUS RESTARTS AGE
hello-openshift-nfs-pod 1/1 Running 0 4s
----
====

More details are shown in the `oc describe pod` command:

====
----
[root@ose70 nfs]# oc describe pod nginx-nfs-pod
Name: nginx-nfs-pod
[root@ose70 nfs]# oc describe pod hello-openshift-nfs-pod
Name: hello-openshift-nfs-pod
Namespace: default <1>
Image(s): fedora/nginx
Image(s): fedora/S3
Node: ose70.rh7/192.168.234.148 <2>
Start Time: Mon, 21 Mar 2016 09:59:47 -0400
Labels: name=nginx-nfs-pod
Labels: name=hello-openshift-nfs-pod
Status: Running
Reason:
Message:
IP: 10.1.0.4
Replication Controllers: <none>
Containers:
nginx-nfs-pod:
hello-openshift-nfs-pod:
Container ID: docker://a3292104d6c28d9cf49f440b2967a0fc5583540fc3b062db598557b93893bc6f
Image: fedora/nginx
Image: fedora/S3
Image ID: docker://403d268c640894cbd76d84a1de3995d2549a93af51c8e16e89842e4c3ed6a00a
QoS Tier:
cpu: BestEffort
Expand All @@ -270,15 +270,15 @@ Volumes:
Type: Secret (a secret that should populate this volume)
SecretName: default-token-a06zb
Events: <4>
FirstSeen LastSeen Count From SubobjectPath Reason Message
───────── ──────── ───── ──── ───────────── ────── ───────
4m 4m 1 {scheduler } Scheduled Successfully assigned nginx-nfs-pod to ose70.rh7
4m 4m 1 {kubelet ose70.rh7} implicitly required container POD Pulled Container image "openshift3/ose-pod:v3.1.0.4" already present on machine
4m 4m 1 {kubelet ose70.rh7} implicitly required container POD Created Created with docker id 866a37108041
4m 4m 1 {kubelet ose70.rh7} implicitly required container POD Started Started with docker id 866a37108041
4m 4m 1 {kubelet ose70.rh7} spec.containers{nginx-nfs-pod} Pulled Container image "fedora/nginx" already present on machine
4m 4m 1 {kubelet ose70.rh7} spec.containers{nginx-nfs-pod} Created Created with docker id a3292104d6c2
4m 4m 1 {kubelet ose70.rh7} spec.containers{nginx-nfs-pod} Started Started with docker id a3292104d6c2
FirstSeen LastSeen Count From SubobjectPath Reason Message
───────── ──────── ───── ──── ───────────── ────── ───────
4m 4m 1 {scheduler } Scheduled Successfully assigned hello-openshift-nfs-pod to ose70.rh7
4m 4m 1 {kubelet ose70.rh7} implicitly required container POD Pulled Container image "openshift3/ose-pod:v3.1.0.4" already present on machine
4m 4m 1 {kubelet ose70.rh7} implicitly required container POD Created Created with docker id 866a37108041
4m 4m 1 {kubelet ose70.rh7} implicitly required container POD Started Started with docker id 866a37108041
4m 4m 1 {kubelet ose70.rh7} spec.containers{hello-openshift-nfs-pod} Pulled Container image "fedora/S3" already present on machine
4m 4m 1 {kubelet ose70.rh7} spec.containers{hello-openshift-nfs-pod} Created Created with docker id a3292104d6c2
4m 4m 1 {kubelet ose70.rh7} spec.containers{hello-openshift-nfs-pod} Started Started with docker id a3292104d6c2
----
Expand All @@ -295,25 +295,25 @@ pod <name> -o yaml` command:

====
----
[root@ose70 nfs]# oc get pod nginx-nfs-pod -o yaml
[root@ose70 nfs]# oc get pod hello-openshift-nfs-pod -o yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
openshift.io/scc: restricted <1>
creationTimestamp: 2016-03-21T13:59:47Z
labels:
name: nginx-nfs-pod
name: nginx-nfs-pod
name: hello-openshift-nfs-pod
name: hello-openshift-nfs-pod
namespace: default <2>
resourceVersion: "2814411"
selflink: /api/v1/namespaces/default/pods/nginx-nfs-pod
selflink: /api/v1/namespaces/default/pods/hello-openshift-nfs-pod
uid: 2c22d2ea-ef6d-11e5-adc7-000c2900f1e3
spec:
containers:
- image: fedora/nginx
- image: fedora/S3
imagePullPolicy: IfNotPresent
name: nginx-nfs-pod
name: hello-openshift-nfs-pod
ports:
- containerPort: 80
name: web
Expand All @@ -323,7 +323,7 @@ spec:
privileged: false
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /usr/share/nginx/html
- mountPath: /usr/share/S3/html
name: nfsvol
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-a06zb
Expand Down Expand Up @@ -355,10 +355,10 @@ status:
type: Ready
containerStatuses:
- containerID: docker://a3292104d6c28d9cf49f440b2967a0fc5583540fc3b062db598557b93893bc6f
image: fedora/nginx
image: fedora/S3
imageID: docker://403d268c640894cbd76d84a1de3995d2549a93af51c8e16e89842e4c3ed6a00a
lastState: {}
name: nginx-nfs-pod
name: hello-openshift-nfs-pod
ready: true
restartCount: 0
state:
Expand Down
8 changes: 4 additions & 4 deletions release_notes/ocp_3_6_release_notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ metadata:
name: init-loop
spec:
containers:
- name: nginx
image: nginx
- name: hello-openshift
image: openshift/hello-openshift
ports:
- containerPort: 80
volumeMounts:
Expand All @@ -238,8 +238,8 @@ spec:

----
$ oc get -f init-containers.yaml
NAME READY STATUS RESTARTS AGE
nginx 0/1 Init:0/1 0 6m
NAME READY STATUS RESTARTS AGE
hello-openshift 0/1 Init:0/1 0 6m
----

[[ocp-36-multiple-schedulers-at-the-same-time]]
Expand Down

0 comments on commit 47f12f6

Please sign in to comment.