Merge pull request #4154 from brendandburns/docs

Remove kubecfg from all getting started docs.
This commit is contained in:
Brian Grant 2015-02-05 07:06:48 -08:00
commit 9f377b196e
9 changed files with 63 additions and 59 deletions

View File

@ -34,7 +34,7 @@ The `release.sh` script will build a release. It will build binaries, run tests
The main output is a tar file: `kubernetes.tar.gz`. This includes: The main output is a tar file: `kubernetes.tar.gz`. This includes:
* Cross compiled client utilities. * Cross compiled client utilities.
* Script (`cluster/kubecfg.sh`) for picking and running the right client binary based on platform. * Script (`cluster/kubectl.sh`) for picking and running the right client binary based on platform.
* Examples * Examples
* Cluster deployment scripts for various clouds * Cluster deployment scripts for various clouds
* Tar file containing all server binaries * Tar file containing all server binaries

View File

@ -14,7 +14,7 @@ The example below creates an elastic Kubernetes cluster with 3 worker nodes and
## Prerequisites ## Prerequisites
* [kubecfg CLI](aws/kubecfg.md) * [kubectl CLI](aws/kubectl.md)
* [aws CLI](http://aws.amazon.com/cli) * [aws CLI](http://aws.amazon.com/cli)
* [CoreOS image for AWS](https://coreos.com/docs/running-coreos/cloud-providers/ec2/#choosing-a-channel) * [CoreOS image for AWS](https://coreos.com/docs/running-coreos/cloud-providers/ec2/#choosing-a-channel)
@ -42,7 +42,7 @@ aws cloudformation describe-stack-events --stack-name kubernetes
aws cloudformation describe-stacks --stack-name kubernetes aws cloudformation describe-stacks --stack-name kubernetes
``` ```
[Skip to kubecfg client configuration](#configure-the-kubecfg-ssh-tunnel) [Skip to kubectl client configuration](#configure-the-kubectl-ssh-tunnel)
### Manually ### Manually
@ -121,9 +121,9 @@ aws ec2 run-instances --count 1 --image-id <ami_image_id> --key-name <keypair> \
--user-data file://node.yaml --user-data file://node.yaml
``` ```
### Configure the kubecfg SSH tunnel ### Configure the kubectl SSH tunnel
This command enables secure communication between the kubecfg client and the Kubernetes API. This command enables secure communication between the kubectl client and the Kubernetes API.
``` ```
ssh -f -nNT -L 8080:127.0.0.1:8080 core@<master-public-ip> ssh -f -nNT -L 8080:127.0.0.1:8080 core@<master-public-ip>
@ -134,7 +134,7 @@ ssh -f -nNT -L 8080:127.0.0.1:8080 core@<master-public-ip>
Once the worker instances have fully booted, they will be automatically registered with the Kubernetes API server by the kube-register service running on the master node. It may take a few mins. Once the worker instances have fully booted, they will be automatically registered with the Kubernetes API server by the kube-register service running on the master node. It may take a few mins.
``` ```
kubecfg list minions kubectl get nodes
``` ```
## Starting a simple pod ## Starting a simple pod
@ -167,16 +167,16 @@ Create a pod manifest: `pod.json`
} }
``` ```
### Create the pod using the kubecfg command line tool ### Create the pod using the kubectl command line tool
``` ```
kubecfg -c pod.json create pods kubectl create -f pod.json
``` ```
### Testing ### Testing
``` ```
kubecfg list pods kubectl get pods
``` ```
> Record the **Host** of the pod, which should be the private IP address. > Record the **Host** of the pod, which should be the private IP address.
@ -208,5 +208,5 @@ Visit the public IP address in your browser to view the running pod.
### Delete the pod ### Delete the pod
``` ```
kubecfg delete pods/hello kubectl delete pods hello
``` ```

View File

@ -1,28 +0,0 @@
# Install and configure kubecfg
## Download the kubecfg CLI tool
### Darwin
```
wget http://storage.googleapis.com/k8s/darwin/kubecfg
```
### Linux
```
wget http://storage.googleapis.com/k8s/linux/kubecfg
```
### Copy kubecfg to your path
```
chmod +x kubecfg
mv kubecfg /usr/local/bin/
```
### Create a secure tunnel for API communication
```
ssh -f -nNT -L 8080:127.0.0.1:8080 core@<master-public-ip>
```

View File

@ -0,0 +1,28 @@
# Install and configure kubecfg
## Download the kubecfg CLI tool
### Darwin
```
wget https://storage.googleapis.com/kubernetes-release/release/v0.9.2/bin/darwin/amd64/kubectl
```
### Linux
```
wget https://storage.googleapis.com/kubernetes-release/release/v0.9.2/bin/linux/amd64/kubectl
```
### Copy kubectl to your path
```
chmod +x kubectl
mv kubectl /usr/local/bin/
```
### Create a secure tunnel for API communication
```
ssh -f -nNT -L 8080:127.0.0.1:8080 core@<master-public-ip>
```

View File

@ -34,21 +34,26 @@ can tweak some of these parameters by editing `cluster/azure/config-default.sh`.
### Running a container (simple version) ### Running a container (simple version)
The `cluster/kubecfg.sh` command below spins up two containers, running [Nginx](http://nginx.org/en/) and with port 80 mapped to 8080: Once you have your instances up and running, the `hack/build-go.sh` script sets up
your Go workspace and builds the Go components.
``` The `kubectl.sh` line below spins up two containers running
cd kubernetes [Nginx](http://nginx.org/en/) running on port 80:
cluster/kubecfg.sh -p 8080:80 run dockerfile/nginx 2 myNginx
```bash
cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=2 --port=80
``` ```
To stop the containers: To stop the containers:
```
cluster/kubecfg.sh stop myNginx ```bash
cluster/kubectl.sh stop rc my-nginx
``` ```
To delete the containers: To delete the containers:
```
cluster/kubecfg.sh rm myNginx ```bash
cluster/kubectl.sh delete rc my-nginx
``` ```
### Running a container (more complete version) ### Running a container (more complete version)

View File

@ -50,23 +50,23 @@ field values:
Once you have your instances up and running, the `hack/build-go.sh` script sets up Once you have your instances up and running, the `hack/build-go.sh` script sets up
your Go workspace and builds the Go components. your Go workspace and builds the Go components.
The `kubecfg.sh` line below spins up two containers running The `kubectl.sh` line below spins up two containers running
[Nginx](http://nginx.org/en/) with port 80 mapped to 8080: [Nginx](http://nginx.org/en/) running on port 80:
```bash ```bash
cluster/kubecfg.sh -p 8080:80 run dockerfile/nginx 2 myNginx cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=2 --port=80
``` ```
To stop the containers: To stop the containers:
```bash ```bash
cluster/kubecfg.sh stop myNginx cluster/kubectl.sh stop rc my-nginx
``` ```
To delete the containers: To delete the containers:
```bash ```bash
cluster/kubecfg.sh rm myNginx cluster/kubectl.sh delete rc my-nginx
``` ```
### Running a container (more complete version) ### Running a container (more complete version)

View File

@ -30,7 +30,7 @@ hack/local-up-cluster.sh
This will build and start a lightweight local cluster, consisting of a master 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/kubecfg.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 and KUBERNETES_MASTER environment variables to let other programs
know how to reach your master. know how to reach your master.
@ -43,13 +43,13 @@ export KUBERNETES_MASTER=http://localhost:8080
Your cluster is running, and you want to start running containers! Your cluster is running, and you want to start running containers!
You can now use any of the cluster/kubecfg.sh commands to interact with your local setup. You can now use any of the cluster/kubectl.sh commands to interact with your local setup.
``` ```
cluster/kubectl.sh get pods cluster/kubectl.sh get pods
cluster/kubectl.sh get services cluster/kubectl.sh get services
cluster/kubectl.sh get replicationControllers cluster/kubectl.sh get replicationControllers
cluster/kubecfg.sh -p 8081:80 run dockerfile/nginx 1 myNginx cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=2 --port=80
## begin wait for provision to complete, you can monitor the docker pull by opening a new terminal ## begin wait for provision to complete, you can monitor the docker pull by opening a new terminal

View File

@ -25,7 +25,7 @@ $ sudo ./util.sh
After this the kubernetes and `etcd` services would be up and running. You can use `service start/stop/restart/force-reload` on the services. After this the kubernetes and `etcd` services would be up and running. You can use `service start/stop/restart/force-reload` on the services.
Launching and scheduling containers using kubecfg can also be used at this point, as explained mentioned in the [examples](https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/guestbook) Launching and scheduling containers using kubectl can also be used at this point, as explained mentioned in the [examples](https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/guestbook)
### 3. Customizing the ubuntu launch ### 3. Customizing the ubuntu launch
To customize the defaults you will need to tweak `/etc/default/kube*` files and restart the appropriate services. This is needed if the binaries are copied in a place other than `/opt/bin`. A run could look like To customize the defaults you will need to tweak `/etc/default/kube*` files and restart the appropriate services. This is needed if the binaries are copied in a place other than `/opt/bin`. A run could look like

View File

@ -178,10 +178,9 @@ NAME IMAGE(S SELECTOR REPLICAS
``` ```
Start a container running nginx with a replication controller and three replicas Start a container running nginx with a replication controller and three replicas
(note that this step uses the `kubecfg.sh` command instead of `kubectl.sh`):
``` ```
$ cluster/kubecfg.sh -p 8080:80 run dockerfile/nginx 3 myNginx $ cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=3 --port=80
``` ```
When listing the pods, you will see that three containers have been started and are in Waiting state: When listing the pods, you will see that three containers have been started and are in Waiting state:
@ -231,7 +230,7 @@ NAME LABELS SELECTOR IP PORT
$ cluster/kubectl.sh get replicationControllers $ cluster/kubectl.sh get replicationControllers
NAME IMAGE(S SELECTOR REPLICAS NAME IMAGE(S SELECTOR REPLICAS
myNginx dockerfile/nginx name=myNginx 3 myNginx dockerfile/nginx name=my-nginx 3
``` ```
We did not start any services, hence there are none listed. But we see three replicas displayed properly. We did not start any services, hence there are none listed. But we see three replicas displayed properly.
@ -239,7 +238,7 @@ Check the [guestbook](../../examples/guestbook/README.md) application to learn h
You can already play with resizing the replicas with: You can already play with resizing the replicas with:
``` ```
$ cluster/kubecfg.sh resize myNginx 2 $ cluster/kubectl.sh resize rc my-nginx --replicas=2
$ cluster/kubectl.sh get pods $ cluster/kubectl.sh get pods
NAME IMAGE(S) HOST LABELS STATUS NAME IMAGE(S) HOST LABELS STATUS
7813c8bd-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.2/10.245.2.2 name=myNginx Running 7813c8bd-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.2/10.245.2.2 name=myNginx Running