mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #11399 from mikedanese/fixup-meteor
update meteor example according to config best practices.
This commit is contained in:
commit
3ae4a021ef
@ -151,16 +151,18 @@ kubectl create -f examples/meteor/mongo-service.json
|
||||
|
||||
Wait until Mongo is started completely and then start up your Meteor app:
|
||||
```
|
||||
kubectl create -f examples/meteor/meteor-controller.json
|
||||
kubectl create -f examples/meteor/meteor-service.json
|
||||
kubectl create -f examples/meteor/meteor-controller.json
|
||||
```
|
||||
|
||||
Note that [`meteor-service.json`](meteor-service.json) creates a load balancer, so
|
||||
your app should be available through the IP of that load balancer once
|
||||
the Meteor pods are started. You can find the IP of your load balancer
|
||||
the Meteor pods are started. We also created the service before creating the rc to
|
||||
aid the scheduler in placing pods, as the scheduler ranks pod placement according to
|
||||
service anti-affinity (among other things). You can find the IP of your load balancer
|
||||
by running:
|
||||
```
|
||||
kubectl get services/meteor --template="{{range .status.loadBalancer.ingress}} {{.ip}} {{end}}"
|
||||
kubectl get service meteor --template="{{range .status.loadBalancer.ingress}} {{.ip}} {{end}}"
|
||||
```
|
||||
|
||||
You will have to open up port 80 if it's not open yet in your
|
||||
|
@ -9,9 +9,6 @@
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 2,
|
||||
"selector": {
|
||||
"name": "meteor"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"labels": {
|
||||
@ -26,12 +23,9 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "http-server",
|
||||
"hostPort": 80,
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 8080
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -25,11 +25,9 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "mongo",
|
||||
"containerPort": 27017,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 27017
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "mongo-disk",
|
||||
|
@ -10,7 +10,6 @@
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"protocol": "TCP",
|
||||
"port": 27017,
|
||||
"targetPort": "mongo"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user