mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 10:18:13 +00:00 
			
		
		
		
	update example explorer for best practices
This commit is contained in:
		| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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: {} | ||||
		Reference in New Issue
	
	Block a user
	 jijun2
					jijun2