mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Issue7094- Replace "kubernetes_auth" with kubectl config view
Removed the deprecated “kubenetes_auth” command and replaced it with the “kubectl config view” command (and corresponding example).
This commit is contained in:
parent
800de8cb7e
commit
6d41db6f92
@ -1,20 +1,36 @@
|
|||||||
# Accessing the Cluster
|
# Accessing the Cluster
|
||||||
|
|
||||||
## Using the Kubernetes proxy to access the cluster
|
## Using the Kubernetes proxy to access the cluster
|
||||||
Information about the cluster can be accessed by using a proxy URL and by providing the keys to the cluster.
|
Information about the cluster can be accessed by using a proxy URL and the cluster authentication keys.
|
||||||
For example, for a cluster that has cluster-level logging enabled using Elasticsearch you can fetch information about
|
For example, for a cluster that has cluster-level logging enabled (using Elasticsearch), you can retrieve information about the Elasticsearch logging on that cluster.
|
||||||
the Elasticsearch logging cluster.
|
|
||||||
|
|
||||||
First, you will need to obtain the keys (username and password) for your cluster:
|
|
||||||
|
|
||||||
|
To retrieve the configuration details about your cluster, including the address of the Kubernetes master cluster and the cluster's authentication keys (username, password, and access token), run the following command:
|
||||||
```
|
```
|
||||||
$ cat ~/.kube/kubernetes-satnam2_kubernetes/kubernetes_auth
|
$ kubectl config view
|
||||||
{
|
{
|
||||||
"User": "admin",
|
clusters:
|
||||||
"Password": "4mty0Vl9nNFfwLJz",
|
- cluster:
|
||||||
"CAFile": "/Users/satnam/.kube/kubernetes-satnam2_kubernetes/kubernetes.ca.crt",
|
certificate-authority-data: REDACTED
|
||||||
"CertFile": "/Users/satnam/.kube/kubernetes-satnam2_kubernetes/kubecfg.crt",
|
server: https://104.197.5.247
|
||||||
"KeyFile": "/Users/satnam/.kube/kubernetes-satnam2_kubernetes/kubecfg.key"
|
name: kubernetes_logging
|
||||||
|
contexts:
|
||||||
|
- context:
|
||||||
|
cluster: kubernetes_logging
|
||||||
|
user: kubernetes_logging
|
||||||
|
name: kubernetes_logging
|
||||||
|
current-context: kubernetes_logging
|
||||||
|
kind: Config
|
||||||
|
preferences: {}
|
||||||
|
users:
|
||||||
|
- name: kubernetes_logging
|
||||||
|
user:
|
||||||
|
client-certificate-data: REDACTED
|
||||||
|
client-key-data: REDACTED
|
||||||
|
token: cvIH2BYtNS85QG0KSLHgl5Oba4YNQOrx
|
||||||
|
- name: kubernetes_logging-basic-auth
|
||||||
|
user:
|
||||||
|
password: MqkkhyhEbfkiYOwF
|
||||||
|
username: admin
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user