From f77ebe2b0697de91559fbf49110212190fd8d0eb Mon Sep 17 00:00:00 2001 From: jijun2 Date: Tue, 6 Oct 2015 00:03:04 -0400 Subject: [PATCH] update example explorer for best practices --- examples/explorer/README.md | 4 ++-- examples/explorer/pod.json | 36 ------------------------------------ examples/explorer/pod.yaml | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 38 deletions(-) delete mode 100644 examples/explorer/pod.json create mode 100644 examples/explorer/pod.yaml diff --git a/examples/explorer/README.md b/examples/explorer/README.md index 0830f7c88e9..e141f2d1c82 100644 --- a/examples/explorer/README.md +++ b/examples/explorer/README.md @@ -42,12 +42,12 @@ Currently, you can look at: * The filesystem to make sure the mounted volumes and files are also what you expect. * Perform DNS lookups, to see how DNS works. -`pod.json` is supplied as an example. You can control the port it serves on with the -port flag. +`pod.yaml` is supplied as an example. You can control the port it serves on with the -port flag. Example from command line (the DNS lookup looks better from a web browser): ```console -$ kubectl create -f examples/explorer/pod.json +$ kubectl create -f examples/explorer/pod.yaml $ kubectl proxy & Starting to serve on localhost:8001 diff --git a/examples/explorer/pod.json b/examples/explorer/pod.json deleted file mode 100644 index 25cb803eeb8..00000000000 --- a/examples/explorer/pod.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "kind": "Pod", - "apiVersion": "v1", - "metadata": { - "name": "explorer" - }, - "spec": { - "containers": [ - { - "name": "explorer", - "image": "gcr.io/google_containers/explorer:1.0", - "args": [ - "-port=8080" - ], - "ports": [ - { - "containerPort": 8080, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "name": "test-volume", - "mountPath": "/mount/test-volume" - } - ] - } - ], - "volumes": [ - { - "name": "test-volume", - "emptyDir": {} - } - ] - } -} diff --git a/examples/explorer/pod.yaml b/examples/explorer/pod.yaml new file mode 100644 index 00000000000..fbb73a05305 --- /dev/null +++ b/examples/explorer/pod.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Pod +metadata: + name: explorer +spec: + containers: + - name: explorer + image: gcr.io/google_containers/explorer:1.0 + args: ["-port=8080"] + ports: + - containerPort: 8080 + protocol: TCP + volumeMounts: + - mountPath: /mount/test-volume + name: test-volume + volumes: + - name: test-volume + emptyDir: {}