mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
modified to drop the leading '/'
Since it doesn't work @ head.
This commit is contained in:
parent
b98b8295f4
commit
46ac0aa81d
@ -42,13 +42,13 @@ Create a file named `redis-master.json` describing a single pod, which runs a re
|
||||
Once you have that pod file, you can create the redis pod in your Kubernetes cluster using the `kubecfg` CLI:
|
||||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-master.json create /pods
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-master.json create pods
|
||||
```
|
||||
|
||||
Once that's up you can list the pods in the cluster, to verify that the master is running:
|
||||
|
||||
```shell
|
||||
cluster/kubecfg.sh list /pods
|
||||
cluster/kubecfg.sh list pods
|
||||
```
|
||||
|
||||
You'll see a single redis master pod. It will also display the machine that the pod is running on.
|
||||
@ -92,7 +92,7 @@ This will cause all pods to see the redis master apparently running on localhost
|
||||
Once you have that service description, you can create the service with the `kubecfg` cli:
|
||||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-master-service.json create /services
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-master-service.json create services
|
||||
Name Label Query Port
|
||||
---------- ---------- ----------
|
||||
redismaster name=redis-master 10000
|
||||
@ -131,7 +131,7 @@ Create a file named `redis-slave-controller.json` that contains:
|
||||
Then you can create the service by running:
|
||||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-slave-controller.json create /replicationControllers
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-slave-controller.json create replicationControllers
|
||||
Name Image(s) Selector Replicas
|
||||
---------- ---------- ---------- ----------
|
||||
redisSlaveController brendanburns/redis-slave name=redisslave 2
|
||||
@ -146,7 +146,7 @@ redis-server --slaveof $SERVICE_HOST $REDISMASTER_SERVICE_PORT
|
||||
Once that's up you can list the pods in the cluster, to verify that the master and slaves are running:
|
||||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh list /pods
|
||||
$ cluster/kubecfg.sh list pods
|
||||
Name Image(s) Host Labels
|
||||
---------- ---------- ---------- ----------
|
||||
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
||||
@ -178,7 +178,7 @@ This time the selector for the service is `name=redis-slave`, because that ident
|
||||
Now that you have created the service specification, create it in your cluster with the `kubecfg` CLI:
|
||||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-slave-service.json create /services
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-slave-service.json create services
|
||||
Name Label Query Port
|
||||
---------- ---------- ----------
|
||||
redisslave name=redisslave 10001
|
||||
@ -216,7 +216,7 @@ Create a file named `frontend-controller.json`:
|
||||
With this file, you can turn up your frontend with:
|
||||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/frontend-controller.json create /replicationControllers
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/frontend-controller.json create replicationControllers
|
||||
Name Image(s) Selector Replicas
|
||||
---------- ---------- ---------- ----------
|
||||
frontendController brendanburns/php-redis name=frontend 3
|
||||
@ -225,7 +225,7 @@ frontendController brendanburns/php-redis name=frontend 3
|
||||
Once that's up you can list the pods in the cluster, to verify that the master, slaves and frontends are running:
|
||||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh list /pods
|
||||
$ cluster/kubecfg.sh list pods
|
||||
Name Image(s) Host Labels
|
||||
---------- ---------- ---------- ----------
|
||||
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
||||
|
Loading…
Reference in New Issue
Block a user