Merge pull request #43841 from windsonsea/clusty

Clean up access-application-cluster/access-cluster
pull/44033/head
Kubernetes Prow Robot 2023-11-22 10:01:19 +01:00 committed by GitHub
commit fb8f9b844a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 66 additions and 58 deletions

View File

@ -83,7 +83,6 @@ The output is similar to this:
} }
``` ```
### Without kubectl proxy ### Without kubectl proxy
Use `kubectl apply` and `kubectl describe secret...` to create a token for the default service account with grep/cut: Use `kubectl apply` and `kubectl describe secret...` to create a token for the default service account with grep/cut:
@ -182,20 +181,30 @@ client libraries.
### Go client ### Go client
* To get the library, run the following command: `go get k8s.io/client-go@kubernetes-<kubernetes-version-number>`, see [INSTALL.md](https://github.com/kubernetes/client-go/blob/master/INSTALL.md#for-the-casual-user) for detailed installation instructions. See [https://github.com/kubernetes/client-go](https://github.com/kubernetes/client-go#compatibility-matrix) to see which versions are supported. * To get the library, run the following command: `go get k8s.io/client-go@kubernetes-<kubernetes-version-number>`,
* Write an application atop of the client-go clients. Note that client-go defines its own API objects, so if needed, please import API definitions from client-go rather than from the main repository, e.g., `import "k8s.io/client-go/kubernetes"` is correct. see [INSTALL.md](https://github.com/kubernetes/client-go/blob/master/INSTALL.md#for-the-casual-user)
for detailed installation instructions. See
[https://github.com/kubernetes/client-go](https://github.com/kubernetes/client-go#compatibility-matrix)
to see which versions are supported.
* Write an application atop of the client-go clients. Note that client-go defines its own API objects,
so if needed, please import API definitions from client-go rather than from the main repository,
e.g., `import "k8s.io/client-go/kubernetes"` is correct.
The Go client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/) The Go client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
as the kubectl CLI does to locate and authenticate to the apiserver. See this [example](https://git.k8s.io/client-go/examples/out-of-cluster-client-configuration/main.go). as the kubectl CLI does to locate and authenticate to the apiserver. See this
[example](https://git.k8s.io/client-go/examples/out-of-cluster-client-configuration/main.go).
If the application is deployed as a Pod in the cluster, please refer to the [next section](#accessing-the-api-from-a-pod). If the application is deployed as a Pod in the cluster, please refer to the [next section](#accessing-the-api-from-a-pod).
### Python client ### Python client
To use [Python client](https://github.com/kubernetes-client/python), run the following command: `pip install kubernetes`. See [Python Client Library page](https://github.com/kubernetes-client/python) for more installation options. To use [Python client](https://github.com/kubernetes-client/python), run the following command:
`pip install kubernetes`. See [Python Client Library page](https://github.com/kubernetes-client/python)
for more installation options.
The Python client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/) The Python client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
as the kubectl CLI does to locate and authenticate to the apiserver. See this [example](https://github.com/kubernetes-client/python/tree/master/examples). as the kubectl CLI does to locate and authenticate to the apiserver. See this
[example](https://github.com/kubernetes-client/python/tree/master/examples).
### Other languages ### Other languages
@ -220,7 +229,7 @@ For information about connecting to other services running on a Kubernetes clust
The redirect capabilities have been deprecated and removed. Please use a proxy (see below) instead. The redirect capabilities have been deprecated and removed. Please use a proxy (see below) instead.
## So Many Proxies ## So many proxies
There are several different proxies you may encounter when using Kubernetes: There are several different proxies you may encounter when using Kubernetes:
@ -266,4 +275,3 @@ There are several different proxies you may encounter when using Kubernetes:
Kubernetes users will typically not need to worry about anything other than the first two types. The cluster admin Kubernetes users will typically not need to worry about anything other than the first two types. The cluster admin
will typically ensure that the latter types are set up correctly. will typically ensure that the latter types are set up correctly.