text stringlengths 0 59.1k |
|---|
} |
``` |
Now your service is up. You can either use your browser or type the following commands. |
```sh |
$ curl https://<your-node-ip>:<your-port> -k |
$ curl https://104.198.1.26:30028 -k |
... |
<title>Welcome to nginx!</title> |
... |
``` |
Then we will update the configmap by changing `index.html` to `index2.html`. |
```sh |
kubectl create configmap nginxconfigmap --from-file=examples/staging/https-nginx/default.conf -o yaml --dry-run\ |
| sed 's/index.html/index2.html/g' | kubectl apply -f - |
configmap "nginxconfigmap" configured |
``` |
Wait a few seconds to let the change propagate. Now you should be able to either use your browser or type the following commands to verify Nginx has been reloaded with new configuration. |
```sh |
$ curl https://<your-node-ip>:<your-port> -k |
$ curl https://104.198.1.26:30028 -k |
... |
<title>Nginx reloaded!</title> |
... |
``` |
For more information on how to run this in a kubernetes cluster, please see the [user-guide](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/). |
<|endoftext|> |
# source: k8s_examples/_archived/nodesjs-mongodb/web-controller-demo.yaml type: yaml |
apiVersion: v1 |
kind: ReplicationController |
metadata: |
labels: |
name: web |
name: web-controller |
spec: |
replicas: 2 |
selector: |
name: web |
template: |
metadata: |
labels: |
name: web |
spec: |
containers: |
- image: node:0.10.40 |
command: ['/bin/sh', '-c'] |
args: ['cd /home && git clone https://github.com/ijason/NodeJS-Sample-App.git demo && cd demo/EmployeeDB/ && npm install && sed -i -- ''s/localhost/mongo/g'' app.js && node app.js'] |
name: web |
ports: |
- containerPort: 3000 |
name: http-server |
<|endoftext|> |
# source: k8s_examples/_archived/nodesjs-mongodb/web-service.yaml type: yaml |
apiVersion: v1 |
kind: Service |
metadata: |
name: web |
labels: |
name: web |
spec: |
type: LoadBalancer |
ports: |
- port: 80 |
targetPort: 3000 |
protocol: TCP |
selector: |
name: web |
<|endoftext|> |
# source: k8s_examples/_archived/nodesjs-mongodb/mongo-controller.yaml type: yaml |
apiVersion: v1 |
kind: ReplicationController |
metadata: |
labels: |
name: mongo |
name: mongo-controller |
spec: |
replicas: 1 |
template: |
metadata: |
labels: |
name: mongo |
spec: |
containers: |
- image: mongo |
name: mongo |
ports: |
- name: mongo |
containerPort: 27017 |
hostPort: 27017 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.