github.com/buildtool/build-tools@v0.2.29-0.20240322150259-6a1d0a553c23/www/docs/config/targets.md (about) 1 # Targets 2 3 `targets` specifies the different 'deployment targets' to use for the project. 4 The target match Kubernetes cluster [configurations](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#define-clusters-users-and-contexts) 5 to deploy projects. 6 Setting up Kubernetes contexts and namespaces is not handled by these tools. 7 8 The only required configuration is `context` and `<name>` must be unique. 9 10 ```yaml 11 targets: 12 <name>: 13 context: 14 namespace: 15 kubeconfig: 16 ``` 17 18 | Parameter | Default | Description | 19 | :------------ | :-------------------------------------------- | :--------------------------------------------------- | 20 | `context` | | Which context in the Kubernetes configuration to use | 21 | `namespace` | `default` | Specific namespace to deploy to | 22 | `kubeconfig` | value of `KUBECONFIG` environment variable | Full path to a specific kubeconfig file to use | 23 24 The `KUBECONFIG_CONTENT` environment variable (probably most useful in CI/CD pipelines) can be used to provide the 25 content of a "kubeconfig" file. If set, buildtools will create a temporary file with that content to use as the `kubeconfig` value. 26 `KUBECONFIG_CONTENT` can be either a base64 encoded string or plain text. 27 28 When deploying from inside a cluster, set `context: in-cluster` and make sure that the Pod has the appropriate 29 permissions. 30 31 **Note:** the `kubeconfig` parameter in config file overrides both the `KUBECONFIG` and `KUBECONFIG_CONTENT` environment 32 variables if set. 33 34 ## Examples 35 36 ````yaml 37 targets: 38 local: 39 context: docker-desktop 40 namespace: default 41 local-test: 42 context: docker-desktop 43 namespace: test 44 ````