From 1c424fddc2a564588fc5b32731cf4c0e52f86ef7 Mon Sep 17 00:00:00 2001 From: aaa <1693291525@qq.com> Date: Tue, 9 Apr 2019 06:56:52 -0400 Subject: [PATCH] Update some readme.md files in client-go --- staging/src/k8s.io/client-go/INSTALL.md | 14 +++++++------- .../in-cluster-client-configuration/README.md | 2 +- .../client-go/examples/leader-election/README.md | 8 ++++---- .../out-of-cluster-client-configuration/README.md | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/staging/src/k8s.io/client-go/INSTALL.md b/staging/src/k8s.io/client-go/INSTALL.md index 9236f334a3..db97efc515 100644 --- a/staging/src/k8s.io/client-go/INSTALL.md +++ b/staging/src/k8s.io/client-go/INSTALL.md @@ -7,7 +7,7 @@ library install, don't mind getting HEAD (which may be less stable than a particular release), then simply: ```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. @@ -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: ```sh -$ go get -u k8s.io/client-go/... -$ go get -u k8s.io/apimachinery/... -$ cd $GOPATH/src/k8s.io/client-go -$ git checkout v11.0.0 -$ cd $GOPATH/src/k8s.io/apimachinery -$ git checkout kubernetes-1.14.0 +go get -u k8s.io/client-go/... +go get -u k8s.io/apimachinery/... +cd $GOPATH/src/k8s.io/client-go +git checkout v11.0.0 +cd $GOPATH/src/k8s.io/apimachinery +git checkout kubernetes-1.14.0 ``` This downloads a version of `k8s.io/client-go` prior to v1.12.0, diff --git a/staging/src/k8s.io/client-go/examples/in-cluster-client-configuration/README.md b/staging/src/k8s.io/client-go/examples/in-cluster-client-configuration/README.md index 6f42ca3575..5aaf495689 100644 --- a/staging/src/k8s.io/client-go/examples/in-cluster-client-configuration/README.md +++ b/staging/src/k8s.io/client-go/examples/in-cluster-client-configuration/README.md @@ -37,7 +37,7 @@ kubectl create clusterrolebinding default-view --clusterrole=view --serviceaccou 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 diff --git a/staging/src/k8s.io/client-go/examples/leader-election/README.md b/staging/src/k8s.io/client-go/examples/leader-election/README.md index cded1f63b3..7a182c6ecc 100644 --- a/staging/src/k8s.io/client-go/examples/leader-election/README.md +++ b/staging/src/k8s.io/client-go/examples/leader-election/README.md @@ -8,14 +8,14 @@ Run the following three commands in separate terminals. Each terminal needs a un ```bash # first terminal -$ go run *.go -kubeconfig=/my/config -logtostderr=true -id=1 +go run *.go -kubeconfig=/my/config -logtostderr=true -id=1 # second terminal -$ go run *.go -kubeconfig=/my/config -logtostderr=true -id=2 +go run *.go -kubeconfig=/my/config -logtostderr=true -id=2 # 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. -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. \ No newline at end of file +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. diff --git a/staging/src/k8s.io/client-go/examples/out-of-cluster-client-configuration/README.md b/staging/src/k8s.io/client-go/examples/out-of-cluster-client-configuration/README.md index c2bccfb63b..b81e6be73a 100644 --- a/staging/src/k8s.io/client-go/examples/out-of-cluster-client-configuration/README.md +++ b/staging/src/k8s.io/client-go/examples/out-of-cluster-client-configuration/README.md @@ -22,7 +22,7 @@ Run this application with: 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: - $ ./app + ./app There are 3 pods in the cluster There are 3 pods in the cluster There are 3 pods in the cluster