Merge pull request #1495 from bboreham/update-incluster
Update out-of-date text about NewInCluster()reviewable/pr2036/r1^2
commit
58b75e9285
|
@ -182,9 +182,8 @@ From within a pod the recommended ways to connect to API are:
|
||||||
Kubernetes API to the localhost interface of the pod, so that other processes
|
Kubernetes API to the localhost interface of the pod, so that other processes
|
||||||
in any container of the pod can access it. See this [example of using kubectl proxy
|
in any container of the pod can access it. See this [example of using kubectl proxy
|
||||||
in a pod](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/kubectl-container/).
|
in a pod](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/kubectl-container/).
|
||||||
- use the Go client library, and create a client using the `client.NewInCluster()` factory.
|
- use the Go client library, and create a client using the `rest.InClusterConfig()` and `kubernetes.NewForConfig()` functions.
|
||||||
This handles locating and authenticating to the apiserver. See this [example of using Go client
|
They handle locating and authenticating to the apiserver. [example](https://github.com/kubernetes/client-go/blob/master/examples/in-cluster/main.go)
|
||||||
library in a pod](https://github.com/kubernetes/client-go/blob/master/examples/in-cluster/main.go).
|
|
||||||
|
|
||||||
In each case, the credentials of the pod are used to communicate securely with the apiserver.
|
In each case, the credentials of the pod are used to communicate securely with the apiserver.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue