Update README

This commit is contained in:
Shashank Barsin 2019-09-24 14:03:25 +05:30
parent 6e0c9646e7
commit fcbdd768c2

View File

@ -1,9 +1,9 @@
# Kubernetes set context
Used for setting the target K8s cluster context which will be used by other actions like [`azure/k8s-actions/k8s-deploy`](https://github.com/Azure/k8s-actions/tree/master/k8s-deploy), [`azure/k8s-actions/k8s-create-secret`](https://github.com/Azure/k8s-actions/tree/master/k8s-create-secret) etc. or run any kubectl commands.
Used for setting the target K8s cluster context which will be used by other actions like [`azure/k8s-deploy`](https://github.com/Azure/k8s-deploy/tree/master), [`azure/k8s-create-secret`](https://github.com/Azure/k8s-create-secret/tree/master) etc. or run any kubectl commands.
```yaml
- uses: azure/k8s-actions/k8s-set-context@master
- uses: azure/k8s-set-context@v1
with:
kubeconfig: '<your kubeconfig>'v# Use secret (https://developer.github.com/actions/managing-workflows/storing-secrets/)
context: '<context name>' # Optional, uses the current-context from kubeconfig by default
@ -11,7 +11,7 @@ Used for setting the target K8s cluster context which will be used by other acti
```
```yaml
- uses: azure/k8s-actions/k8s-set-context@master
- uses: azure/k8s-set-context@v1
with:
k8s-url: '<your kubernetes cluster url>'
k8s-secret: '<service account token>' # token value from the result of the below script
@ -22,7 +22,7 @@ Use secret (https://developer.github.com/actions/managing-workflows/storing-secr
PS: `kubeconfig` takes precedence (i.e. kubeconfig would be created using the value supplied in kubeconfig)
Refer to the action metadata file for details about all the inputs https://github.com/Azure/k8s-actions/blob/master/k8s-set-context/action.yml
Refer to the action metadata file for details about all the inputs https://github.com/Azure/k8s-set-context/blob/master/action.yml
## Steps to get Kubeconfig of a K8s cluster: