Is it possible to run garden in a different kubern...
# 🤖|ask-kapa
m
Please stand by @swift-spring-8620 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- Yes, it is possible to run Garden in a different Kubernetes context. You can specify the context in your project's
garden.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:
Copy code
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:
Copy code
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.
Sources: - Local Kubernetes Provider Configuration () - Remote Kubernetes Example Project () - Kaniko Example Project () ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------