'How to use kubeconfig as environment variable in GitLab
I'm creating a GitLab CI/CD pipeline to deploy an application to Azure Kubernetes Services.
- How can I specify a kubeconfig file as environment variable?
- How can be used in the pipeline?
Solution 1:[1]
Use the Project/Settings/CICD/Variables section
and add a variable there with type "File"
Then you can use it in the pipeline:
before_script:
- export KUBECONFIG=$KUBECONFIG_FILE
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | jenigen |
