Skip to content

Commit

Permalink
Merge pull request #11414 from mburke5678/enterprise-3.2
Browse files Browse the repository at this point in the history
[enterprise-3.2] Don't use nginx image for the Pod example
  • Loading branch information
mburke5678 authored Aug 7, 2018
2 parents 13e9cfe + 4acc27f commit 5df9cfb
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 57 deletions.
1 change: 0 additions & 1 deletion architecture/additional_concepts/storage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,5 @@ spec:
- name: mypd
persistentVolumeClaim:
claimName: myclaim
----
====
7 changes: 3 additions & 4 deletions architecture/core_concepts/pods_and_services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,9 @@ 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 @@ -455,15 +455,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
20 changes: 10 additions & 10 deletions dev_guide/compute_resources.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,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 @@ -168,22 +168,22 @@ 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 @@ -277,7 +277,7 @@ To specify compute resources via the CLI:

====
----
$ 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
----
====

Expand Down
2 changes: 1 addition & 1 deletion dev_guide/new_app.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ other images, specify its builder image in the group:

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

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 @@ -112,7 +112,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_authorization_policy.adoc#managing-role-bindings[*cluster-admin*] role binding. For this guide, that user is called `admin`.

Expand Down Expand Up @@ -111,7 +111,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 @@ -140,15 +140,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 @@ -185,7 +185,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 @@ -189,13 +189,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 @@ -223,7 +223,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 @@ -232,31 +232,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 @@ -278,15 +278,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 @@ -303,25 +303,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 @@ -331,7 +331,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 @@ -363,10 +363,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

0 comments on commit 5df9cfb

Please sign in to comment.