Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thesattiraju committed Jul 31, 2019
1 parent 44a9e65 commit bfb5e62
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions k8s-set-context/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ Please refer to https://kubernetes.io/docs/concepts/configuration/organize-clust


## Steps to get Service account:

#### k8s-url: Run in your local shell to get server K8s URL
```sh
# k8s-url: Run in your local shell to get server K8s URL
kubectl config view --minify -o jsonpath={.clusters[0].cluster.server}
# k8s-secret: Run following sequential commands to get the secret value:
```
#### k8s-secret: Run following sequential commands to get the secret value:
Get service account secret names by running
```sh
kubectl get serviceAccounts <service-account-name> -n <namespace> -o=jsonpath={.secrets[*].name}
```

Use the output of the above command
```sh
kubectl get secret <service-account-secret-name> -n <namespace> -o json
```

0 comments on commit bfb5e62

Please sign in to comment.