Update some readme.md files in client-go

Kubernetes-commit: 1c424fddc2a564588fc5b32731cf4c0e52f86ef7
This commit is contained in:
aaa 2019-04-09 06:56:52 -04:00 committed by Kubernetes Publisher
parent ca8df85b17
commit 90da71b8c3
4 changed files with 13 additions and 13 deletions

View File

@ -7,7 +7,7 @@ library install, don't mind getting HEAD (which may be less stable than a
particular release), then simply: particular release), then simply:
```sh ```sh
$ go get k8s.io/client-go@master go get k8s.io/client-go@master
``` ```
This will record a dependency on `k8s.io/client-go` in your go module. This will record a dependency on `k8s.io/client-go` in your go module.
@ -24,12 +24,12 @@ If you are using a version of go prior to 1.11, or do not wish to use
go modules, you can download `k8s.io/client-go` to your `$GOPATH` instead: go modules, you can download `k8s.io/client-go` to your `$GOPATH` instead:
```sh ```sh
$ go get -u k8s.io/client-go/... go get -u k8s.io/client-go/...
$ go get -u k8s.io/apimachinery/... go get -u k8s.io/apimachinery/...
$ cd $GOPATH/src/k8s.io/client-go cd $GOPATH/src/k8s.io/client-go
$ git checkout v11.0.0 git checkout v11.0.0
$ cd $GOPATH/src/k8s.io/apimachinery cd $GOPATH/src/k8s.io/apimachinery
$ git checkout kubernetes-1.14.0 git checkout kubernetes-1.14.0
``` ```
This downloads a version of `k8s.io/client-go` prior to v1.12.0, This downloads a version of `k8s.io/client-go` prior to v1.12.0,

View File

@ -37,7 +37,7 @@ kubectl create clusterrolebinding default-view --clusterrole=view --serviceaccou
Then, run the image in a Pod with a single instance Deployment: Then, run the image in a Pod with a single instance Deployment:
$ kubectl run --rm -i demo --image=in-cluster --image-pull-policy=Never kubectl run --rm -i demo --image=in-cluster --image-pull-policy=Never
There are 4 pods in the cluster There are 4 pods in the cluster
There are 4 pods in the cluster There are 4 pods in the cluster

View File

@ -8,14 +8,14 @@ Run the following three commands in separate terminals. Each terminal needs a un
```bash ```bash
# first terminal # first terminal
$ go run *.go -kubeconfig=/my/config -logtostderr=true -id=1 go run *.go -kubeconfig=/my/config -logtostderr=true -id=1
# second terminal # second terminal
$ go run *.go -kubeconfig=/my/config -logtostderr=true -id=2 go run *.go -kubeconfig=/my/config -logtostderr=true -id=2
# third terminal # third terminal
$ go run *.go -kubeconfig=/my/config -logtostderr=true -id=3 go run *.go -kubeconfig=/my/config -logtostderr=true -id=3
``` ```
> You can ignore the `-kubeconfig` flag if you are running these commands in the Kubernetes cluster. > You can ignore the `-kubeconfig` flag if you are running these commands in the Kubernetes cluster.
Now kill the existing leader. You will see from the terminal outputs that one of the remaining two processes will be elected as the new leader. Now kill the existing leader. You will see from the terminal outputs that one of the remaining two processes will be elected as the new leader.

View File

@ -22,7 +22,7 @@ Run this application with:
Running this application will use the kubeconfig file and then authenticate to the Running this application will use the kubeconfig file and then authenticate to the
cluster, and print the number of pods in the cluster every 10 seconds: cluster, and print the number of pods in the cluster every 10 seconds:
$ ./app ./app
There are 3 pods in the cluster There are 3 pods in the cluster
There are 3 pods in the cluster There are 3 pods in the cluster
There are 3 pods in the cluster There are 3 pods in the cluster