Merge pull request #6713 from ahmetb/delete-kubectl-container
access-cluster.md: scrub kubectl-container references
This commit is contained in:
@@ -155,7 +155,7 @@ the `kubernetes` DNS name, which resolves to a Service IP which in turn
|
|||||||
will be routed to an apiserver.
|
will be routed to an apiserver.
|
||||||
|
|
||||||
The recommended way to authenticate to the apiserver is with a
|
The recommended way to authenticate to the apiserver is with a
|
||||||
[service account](/docs/tasks/configure-pod-container/configure-service-account/) credential. By kube-system, a pod
|
[service account](/docs/tasks/configure-pod-container/configure-service-account/) credential. By kube-system, a pod
|
||||||
is associated with a service account, and a credential (token) for that
|
is associated with a service account, and a credential (token) for that
|
||||||
service account is placed into the filesystem tree of each container in that pod,
|
service account is placed into the filesystem tree of each container in that pod,
|
||||||
at `/var/run/secrets/kubernetes.io/serviceaccount/token`.
|
at `/var/run/secrets/kubernetes.io/serviceaccount/token`.
|
||||||
@@ -169,17 +169,15 @@ at `/var/run/secrets/kubernetes.io/serviceaccount/namespace` in each container.
|
|||||||
|
|
||||||
From within a pod the recommended ways to connect to API are:
|
From within a pod the recommended ways to connect to API are:
|
||||||
|
|
||||||
- run a kubectl proxy as one of the containers in the pod, or as a background
|
- run `kubectl proxy` in a sidecar container in the pod, or as a background
|
||||||
process within a container. This proxies the
|
process within the container. This proxies the
|
||||||
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.
|
||||||
in a pod](https://github.com/kubernetes/examples/tree/{{page.githubbranch}}/staging/kubectl-container/).
|
|
||||||
- use the Go client library, and create a client using the `rest.InClusterConfig()` and `kubernetes.NewForConfig()` functions.
|
- use the Go client library, and create a client using the `rest.InClusterConfig()` and `kubernetes.NewForConfig()` functions.
|
||||||
They handle locating and authenticating to the apiserver. [example](https://git.k8s.io/client-go/examples/in-cluster-client-configuration/main.go)
|
They handle locating and authenticating to the apiserver. [example](https://git.k8s.io/client-go/examples/in-cluster-client-configuration/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.
|
||||||
|
|
||||||
|
|
||||||
## Accessing services running on the cluster
|
## Accessing services running on the cluster
|
||||||
|
|
||||||
The previous section was about connecting the Kubernetes API server. This section is about
|
The previous section was about connecting the Kubernetes API server. This section is about
|
||||||
|
|||||||
Reference in New Issue
Block a user