{"repo":"Azure/k8s-set-context","free":true,"listed":false,"github":"https://github.com/Azure/k8s-set-context","clone":"git clone https://github.com/Azure/k8s-set-context.git","description":"GitHub Action for setting context and retrieving Kubeconfig before deploying to Kubernetes clusters","language":"TypeScript","stars":103,"topics":["kubernetes","azure","k8s","kubeconfig","action","actions","github-action","github-actions"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Kubernetes set context This action can be used to set cluster context before other actions like azure/k8s-deploy and azure/k8s-create-secret . It should also be used before kubectl commands (in script) are run subsequently in the workflow. It is a requirement to use azure/login in your workflow before using this action when using the service-account or service-principal methods. There are three approaches for specifying the deployment target: - Kubeconfig file provided as input to the action - Service account approach where the secret associated with the service account is provided as input to the action - Service principal approach (only applicable for arc cluster) where service principal provided with 'creds' is used as input to action In all these approaches it is recommended to store these contents (kubeconfig file content or secret content) in a secret. Refer to the action metadata file for details about inputs. Note that different inputs are required for different method and cluster types. Use the below examples as a reference. Example usage Kubeconfig approach Please note that the input requires the contents of the kubeconfig file, and not its path. Following are the ways to fetch kubeconfig file onto your local development machine so that the same can be used in the action input shown above. Azure Kubernetes Service cluster Further details can be found in az aks get-credentials documentation. Generic Kubernetes cluster Please refer to documentation on fetching kubecon","default_branch":null,"files":null,"tree":[],"storefront":"/r/Azure","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Azure/k8s-set-context/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}