mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #4322 from bprashanth/nginx_port_collision
Modify nginx port to avoid collision with api server
This commit is contained in:
commit
418f336731
@ -11,7 +11,7 @@
|
|||||||
"image": "dockerfile/nginx",
|
"image": "dockerfile/nginx",
|
||||||
"ports": [{
|
"ports": [{
|
||||||
"containerPort": 80,
|
"containerPort": 80,
|
||||||
"hostPort": 8080
|
"hostPort": 8081
|
||||||
}],
|
}],
|
||||||
"livenessProbe": {
|
"livenessProbe": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
@ -19,7 +19,7 @@
|
|||||||
"initialDelaySeconds": 30,
|
"initialDelaySeconds": 30,
|
||||||
"httpGet": {
|
"httpGet": {
|
||||||
"path": "/index.html",
|
"path": "/index.html",
|
||||||
"port": "8080"
|
"port": "8081"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
@ -96,7 +96,7 @@ Where pod.json contains something like:
|
|||||||
"image": "dockerfile/nginx",
|
"image": "dockerfile/nginx",
|
||||||
"ports": [{
|
"ports": [{
|
||||||
"containerPort": 80,
|
"containerPort": 80,
|
||||||
"hostPort": 8080
|
"hostPort": 8081
|
||||||
}],
|
}],
|
||||||
"livenessProbe": {
|
"livenessProbe": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
@ -104,7 +104,7 @@ Where pod.json contains something like:
|
|||||||
"initialDelaySeconds": 30,
|
"initialDelaySeconds": 30,
|
||||||
"httpGet": {
|
"httpGet": {
|
||||||
"path": "/index.html",
|
"path": "/index.html",
|
||||||
"port": "8080"
|
"port": "8081"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
@ -128,6 +128,9 @@ and delete the pod you just created:
|
|||||||
cluster/kubectl.sh delete pods php
|
cluster/kubectl.sh delete pods php
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Since this pod is scheduled on a minion running in GCE, you will have to enable incoming tcp traffic via the port specified in the
|
||||||
|
pod manifest before you see the nginx welcome page. After doing so, it should be visible at http://<external ip of minion running nginx>:<port from manifest>.
|
||||||
|
|
||||||
Look in `examples/` for more examples
|
Look in `examples/` for more examples
|
||||||
|
|
||||||
### Tearing down the cluster
|
### Tearing down the cluster
|
||||||
|
Loading…
Reference in New Issue
Block a user