Update documentation
This commit is contained in:
parent
348a67ac39
commit
cd64206540
21
README.md
21
README.md
@ -20,7 +20,10 @@ In both these approaches it is recommended to store these contents (kubeconfig f
|
|||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
<tr>
|
||||||
|
<td><code>method</code><br/>Method</td>
|
||||||
|
<td>(Optional) Acceptable values: kubeconfig/service-account. Default value: kubeconfig</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>kubeconfig</code><br/>Kubectl config</td>
|
<td><code>kubeconfig</code><br/>Kubectl config</td>
|
||||||
<td>(Relevant for kubeconfig approach) Configuration file to be used with kubectl</td>
|
<td>(Relevant for kubeconfig approach) Configuration file to be used with kubectl</td>
|
||||||
@ -46,8 +49,9 @@ In both these approaches it is recommended to store these contents (kubeconfig f
|
|||||||
```yaml
|
```yaml
|
||||||
- uses: azure/k8s-set-context@v1
|
- uses: azure/k8s-set-context@v1
|
||||||
with:
|
with:
|
||||||
kubeconfig: '<your kubeconfig>' # Use secret (https://developer.github.com/actions/managing-workflows/storing-secrets/)
|
method: kubeconfig
|
||||||
context: '<context name>' #If left unspecified, current-context from kubeconfig is used as default
|
kubeconfig: <your kubeconfig> # Use secret (https://developer.github.com/actions/managing-workflows/storing-secrets/)
|
||||||
|
context: <context name> #If left unspecified, current-context from kubeconfig is used as default
|
||||||
id: setcontext
|
id: setcontext
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -75,8 +79,9 @@ Please refer to documentation on fetching [kubeconfig for any generic K8s cluste
|
|||||||
```yaml
|
```yaml
|
||||||
- uses: azure/k8s-set-context@v1
|
- uses: azure/k8s-set-context@v1
|
||||||
with:
|
with:
|
||||||
k8s-url: '<URL of the clsuter's API server >'
|
method: service-account
|
||||||
k8s-secret: '<secret associated with the service account>'
|
k8s-url: <URL of the clsuter's API server>
|
||||||
|
k8s-secret: <secret associated with the service account>
|
||||||
id: setcontext
|
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:
|
For fetching Secret object required to connect and authenticate with the cluster, the following sequence of commands need to be run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
kubectl get secret <service-account-secret-name> -n <namespace> -o json
|
kubectl get serviceAccounts <service-account-name> -n <namespace> -o 'jsonpath={.secrets[*].name}'
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl get secret <service-account-secret-name> -n <namespace> -o yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user