microscopic-river-74022
11/28/2023, 5:56 AMmicroscopic-river-74022
11/28/2023, 5:57 AMgarden.yml configuration file. For example, if you are using the kubernetes or local-kubernetes plugin, you can set the context field in the respective provider configuration.
Here's an example of how you might set the context for a local-kubernetes provider:
yml
apiVersion: garden.io/v1
kind: Project
environments:
- name: local
providers:
- name: local-kubernetes
environments: [local]
context: minikube
In this example, the context is set to minikube, which means Garden will connect to the local Kubernetes instance running on Minikube. If you have multiple local Kubernetes installations, Garden will choose the one that is set as the current context in your kubectl configuration.
For a remote Kubernetes cluster, you would set the context to the name of your configured kubectl context for the remote cluster. Here's an example:
yml
apiVersion: garden.io/v1
kind: Project
name: kaniko
environments:
- name: local
- name: remote
providers:
- name: local-kubernetes
environments: [local]
- name: kubernetes
environments: [remote]
context: my-remote-cluster
In this example, the context for the kubernetes provider is set to my-remote-cluster, which is the name of the kubectl context for the remote Kubernetes cluster.