@@ -20,7 +20,7 @@ You need [go](https://golang.org/doc/install) in your path, please make sure it
...
@@ -20,7 +20,7 @@ You need [go](https://golang.org/doc/install) in your path, please make sure it
### Starting the cluster
### Starting the cluster
In a separate tab of your terminal, run:
In a separate tab of your terminal, run the following (since one needs sudo access to start/stop kubernetes daemons, it is easier to run the entire script as root):
```
```
cd kubernetes
cd kubernetes
...
@@ -31,12 +31,10 @@ This will build and start a lightweight local cluster, consisting of a master
...
@@ -31,12 +31,10 @@ This will build and start a lightweight local cluster, consisting of a master
and a single minion. Type Control-C to shut it down.
and a single minion. Type Control-C to shut it down.
You can use the cluster/kubectl.sh script to interact with the local cluster.
You can use the cluster/kubectl.sh script to interact with the local cluster.
You must set the KUBERNETES_PROVIDER and KUBERNETES_MASTER environment variables to let other programs
You must set the KUBERNETES_PROVIDER environment variable.
know how to reach your master.
```
```
export KUBERNETES_PROVIDER=local
export KUBERNETES_PROVIDER=local
export KUBERNETES_MASTER=http://localhost:8080
```
```
### Running a container
### Running a container
...
@@ -66,6 +64,19 @@ cluster/kubectl.sh get services
...
@@ -66,6 +64,19 @@ cluster/kubectl.sh get services
cluster/kubectl.sh get replicationControllers
cluster/kubectl.sh get replicationControllers
```
```
### Running a user defined pod
Note the difference between a [container](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/containers.md)
and a [pod](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/pods.md). Since you only asked for the former, kubernetes will create a wrapper pod for you.
However you can't view the nginx start page on localhost. To verify that nginx is running you need to run `curl` within the docker container (try `docker exec`).
You can control the specifications of a pod via a user defined manifest, and reach nginx through your browser on the port specified therein: