mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #15136 from jijun2/update-1006
Auto commit by PR queue bot
This commit is contained in:
commit
bf0622a2f8
@ -42,12 +42,12 @@ Currently, you can look at:
|
|||||||
* The filesystem to make sure the mounted volumes and files are also what you expect.
|
* The filesystem to make sure the mounted volumes and files are also what you expect.
|
||||||
* Perform DNS lookups, to see how DNS works.
|
* 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):
|
Example from command line (the DNS lookup looks better from a web browser):
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ kubectl create -f examples/explorer/pod.json
|
$ kubectl create -f examples/explorer/pod.yaml
|
||||||
$ kubectl proxy &
|
$ kubectl proxy &
|
||||||
Starting to serve on localhost:8001
|
Starting to serve on localhost:8001
|
||||||
|
|
||||||
|
@ -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": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
18
examples/explorer/pod.yaml
Normal file
18
examples/explorer/pod.yaml
Normal file
@ -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: {}
|
Loading…
Reference in New Issue
Block a user