diff --git a/build/README.md b/build/README.md index b583f3ba323..c02146d8f41 100644 --- a/build/README.md +++ b/build/README.md @@ -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: * 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 * Cluster deployment scripts for various clouds * Tar file containing all server binaries diff --git a/docs/getting-started-guides/aws-coreos.md b/docs/getting-started-guides/aws-coreos.md index 240b61a6fa4..83132c1bf7f 100644 --- a/docs/getting-started-guides/aws-coreos.md +++ b/docs/getting-started-guides/aws-coreos.md @@ -14,7 +14,7 @@ The example below creates an elastic Kubernetes cluster with 3 worker nodes and ## Prerequisites -* [kubecfg CLI](aws/kubecfg.md) +* [kubectl CLI](aws/kubectl.md) * [aws CLI](http://aws.amazon.com/cli) * [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 ``` -[Skip to kubecfg client configuration](#configure-the-kubecfg-ssh-tunnel) +[Skip to kubectl client configuration](#configure-the-kubectl-ssh-tunnel) ### Manually @@ -121,9 +121,9 @@ aws ec2 run-instances --count 1 --image-id --key-name \ --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@ @@ -134,7 +134,7 @@ ssh -f -nNT -L 8080:127.0.0.1:8080 core@ 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 @@ -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 ``` -kubecfg list pods +kubectl get pods ``` > 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 ``` -kubecfg delete pods/hello +kubectl delete pods hello ``` diff --git a/docs/getting-started-guides/aws/kubecfg.md b/docs/getting-started-guides/aws/kubecfg.md deleted file mode 100644 index 2b6a24e0618..00000000000 --- a/docs/getting-started-guides/aws/kubecfg.md +++ /dev/null @@ -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@ -``` diff --git a/docs/getting-started-guides/aws/kubectl.md b/docs/getting-started-guides/aws/kubectl.md new file mode 100644 index 00000000000..0f93d2c46d6 --- /dev/null +++ b/docs/getting-started-guides/aws/kubectl.md @@ -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@ +``` diff --git a/docs/getting-started-guides/azure.md b/docs/getting-started-guides/azure.md index 1d9c75ac373..4eb1ef51cde 100644 --- a/docs/getting-started-guides/azure.md +++ b/docs/getting-started-guides/azure.md @@ -34,21 +34,26 @@ can tweak some of these parameters by editing `cluster/azure/config-default.sh`. ### 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. -``` -cd kubernetes -cluster/kubecfg.sh -p 8080:80 run dockerfile/nginx 2 myNginx +The `kubectl.sh` line below spins up two containers running +[Nginx](http://nginx.org/en/) running on port 80: + +```bash +cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=2 --port=80 ``` To stop the containers: -``` -cluster/kubecfg.sh stop myNginx + +```bash +cluster/kubectl.sh stop rc my-nginx ``` To delete the containers: -``` -cluster/kubecfg.sh rm myNginx + +```bash +cluster/kubectl.sh delete rc my-nginx ``` ### Running a container (more complete version) diff --git a/docs/getting-started-guides/gce.md b/docs/getting-started-guides/gce.md index 7c6c368dd7c..4cb4ce19905 100644 --- a/docs/getting-started-guides/gce.md +++ b/docs/getting-started-guides/gce.md @@ -50,23 +50,23 @@ field values: 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 `kubecfg.sh` line below spins up two containers running -[Nginx](http://nginx.org/en/) with port 80 mapped to 8080: +The `kubectl.sh` line below spins up two containers running +[Nginx](http://nginx.org/en/) running on port 80: ```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: ```bash -cluster/kubecfg.sh stop myNginx +cluster/kubectl.sh stop rc my-nginx ``` To delete the containers: ```bash -cluster/kubecfg.sh rm myNginx +cluster/kubectl.sh delete rc my-nginx ``` ### Running a container (more complete version) diff --git a/docs/getting-started-guides/locally.md b/docs/getting-started-guides/locally.md index a7120f42f3a..40e6cf6fd60 100644 --- a/docs/getting-started-guides/locally.md +++ b/docs/getting-started-guides/locally.md @@ -30,7 +30,7 @@ hack/local-up-cluster.sh 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/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 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! -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 services 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 diff --git a/docs/getting-started-guides/ubuntu_single_node.md b/docs/getting-started-guides/ubuntu_single_node.md index b244eb1275f..a84f11b7dd5 100644 --- a/docs/getting-started-guides/ubuntu_single_node.md +++ b/docs/getting-started-guides/ubuntu_single_node.md @@ -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. -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 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 diff --git a/docs/getting-started-guides/vagrant.md b/docs/getting-started-guides/vagrant.md index 4d27fd572ed..8f7ab7ba786 100644 --- a/docs/getting-started-guides/vagrant.md +++ b/docs/getting-started-guides/vagrant.md @@ -178,10 +178,9 @@ NAME IMAGE(S SELECTOR 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: @@ -231,7 +230,7 @@ NAME LABELS SELECTOR IP PORT $ cluster/kubectl.sh get replicationControllers 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. @@ -239,7 +238,7 @@ Check the [guestbook](../../examples/guestbook/README.md) application to learn h 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 NAME IMAGE(S) HOST LABELS STATUS 7813c8bd-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.2/10.245.2.2 name=myNginx Running