diff --git a/README.md b/README.md
index cd9a329a..baf652fb 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,10 @@ In both these approaches it is recommended to store these contents (kubeconfig f
Description |
-
+
+ method Method |
+ (Optional) Acceptable values: kubeconfig/service-account. Default value: kubeconfig |
+
kubeconfig Kubectl config |
(Relevant for kubeconfig approach) Configuration file to be used with kubectl |
@@ -46,8 +49,9 @@ In both these approaches it is recommended to store these contents (kubeconfig f
```yaml
- uses: azure/k8s-set-context@v1
with:
- kubeconfig: '' # Use secret (https://developer.github.com/actions/managing-workflows/storing-secrets/)
- context: '' #If left unspecified, current-context from kubeconfig is used as default
+ method: kubeconfig
+ kubeconfig: # Use secret (https://developer.github.com/actions/managing-workflows/storing-secrets/)
+ context: #If left unspecified, current-context from kubeconfig is used as default
id: setcontext
```
@@ -75,8 +79,9 @@ Please refer to documentation on fetching [kubeconfig for any generic K8s cluste
```yaml
- uses: azure/k8s-set-context@v1
with:
- k8s-url: ''
- k8s-secret: ''
+ method: service-account
+ k8s-url:
+ k8s-secret:
id: setcontext
```
@@ -89,7 +94,11 @@ kubectl config view --minify -o 'jsonpath={.clusters[0].cluster.server}'
For fetching Secret object required to connect and authenticate with the cluster, the following sequence of commands need to be run:
```sh
-kubectl get secret -n -o json
+kubectl get serviceAccounts -n -o 'jsonpath={.secrets[*].name}'
+```
+
+```sh
+kubectl get secret -n -o yaml
```
## Contributing