Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A set of clarity fixes for the local cluster documentation #4300

Merged
merged 1 commit into from
Feb 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 19 additions & 4 deletions docs/getting-started-guides/locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You need [go](https://golang.org/doc/install) in your path, please make sure it

### 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
Expand All @@ -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.

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
know how to reach your master.
You must set the KUBERNETES_PROVIDER environment variable.

```
export KUBERNETES_PROVIDER=local
export KUBERNETES_MASTER=http://localhost:8080
```

### Running a container
Expand Down Expand Up @@ -66,6 +64,19 @@ cluster/kubectl.sh get services
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:

```
cluster/kubectl.sh create -f api/examples/pod.json
```

Congratulations!

### Troubleshooting
Expand All @@ -92,3 +103,7 @@ cd kubernetes
hack/build-go.sh
hack/local-up-cluster.sh
```

#### kubectl claims to start a container but `get pods` and `docker ps` don't show it.

One or more of the kubernetes daemons might've crashed. Tail the logs of each in /tmp.