@@ -183,7 +176,7 @@ cluster in a project, and a validation error will occur if otherwise.
...
@@ -183,7 +176,7 @@ cluster in a project, and a validation error will occur if otherwise.
---
---
For example, let's say the following clusters exist in a project:
For example, let's say the following Kubernetes clusters exist in a project:
| Cluster | Environment scope |
| Cluster | Environment scope |
| ---------- | ------------------- |
| ---------- | ------------------- |
...
@@ -231,8 +224,7 @@ With GitLab Premium, you can associate more than one Kubernetes clusters to your
...
@@ -231,8 +224,7 @@ With GitLab Premium, you can associate more than one Kubernetes clusters to your
project. That way you can have different clusters for different environments,
project. That way you can have different clusters for different environments,
like dev, staging, production, etc.
like dev, staging, production, etc.
To add another cluster, follow the same steps as described in [adding a
Simply add another cluster, like you did the first time, and make sure to
Kubernetes cluster](#adding-a-kubernetes-cluster) and make sure to
[set an environment scope](#setting-the-environment-scope) that will
[set an environment scope](#setting-the-environment-scope) that will
differentiate the new cluster with the rest.
differentiate the new cluster with the rest.
...
@@ -240,45 +232,42 @@ differentiate the new cluster with the rest.
...
@@ -240,45 +232,42 @@ differentiate the new cluster with the rest.
The Kubernetes cluster integration exposes the following
The Kubernetes cluster integration exposes the following
[deployment variables](../../../ci/variables/README.md#deployment-variables) in the
[deployment variables](../../../ci/variables/README.md#deployment-variables) in the
GitLab CI/CD build environment:
GitLab CI/CD build environment.
-`KUBE_URL` - Equal to the API URL.
| Variable | Description |
-`KUBE_TOKEN` - The Kubernetes token.
| -------- | ----------- |
-`KUBE_NAMESPACE` - The Kubernetes namespace is auto-generated if not specified.
| `KUBE_URL` | Equal to the API URL. |
The default value is `<project_name>-<project_id>`. You can overwrite it to
| `KUBE_TOKEN` | The Kubernetes token. |
use different one if needed, otherwise the `KUBE_NAMESPACE` variable will
| `KUBE_NAMESPACE` | The Kubernetes namespace is auto-generated if not specified. The default value is `<project_name>-<project_id>`. You can overwrite it to use different one if needed, otherwise the `KUBE_NAMESPACE` variable will receive the default value. |
receive the default value.
| `KUBE_CA_PEM_FILE` | Only present if a custom CA bundle was specified. Path to a file containing PEM data. |
-`KUBE_CA_PEM_FILE` - Only present if a custom CA bundle was specified. Path
| `KUBE_CA_PEM` | (**deprecated**) Only if a custom CA bundle was specified. Raw PEM data. |
to a file containing PEM data.
| `KUBECONFIG` | Path to a file containing `kubeconfig` for this deployment. CA bundle would be embedded if specified. |
-`KUBE_CA_PEM` (deprecated) - Only if a custom CA bundle was specified. Raw PEM data.
-`KUBECONFIG` - Path to a file containing `kubeconfig` for this deployment.
## Enabling or disabling the Kubernetes cluster integration
CA bundle would be embedded if specified.
## Enabling or disabling the Cluster integration
After you have successfully added your cluster information, you can enable the
After you have successfully added your cluster information, you can enable the
Cluster integration:
Kubernetes cluster integration:
1. Click the "Enabled/Disabled" switch
1. Click the "Enabled/Disabled" switch
1. Hit **Save** for the changes to take effect
1. Hit **Save** for the changes to take effect
You can now start using your Kubernetes cluster for your deployments.
You can now start using your Kubernetes cluster for your deployments.
To disable the Cluster integration, follow the same procedure.
To disable the Kubernetes cluster integration, follow the same procedure.
## Removing the Cluster integration
## Removing the Kubernetes cluster integration
NOTE: **Note:**
NOTE: **Note:**
You need Master [permissions] and above to remove a cluster integration.
You need Master [permissions] and above to remove a Kubernetes cluster integration.
NOTE: **Note:**
NOTE: **Note:**
When you remove a cluster, you only remove its relation to GitLab, not the
When you remove a cluster, you only remove its relation to GitLab, not the
cluster itself. To remove the cluster, you can do so by visiting the GKE
cluster itself. To remove the cluster, you can do so by visiting the GKE
dashboard or using `kubectl`.
dashboard or using `kubectl`.
To remove the Cluster integration from your project, simply click on the
To remove the Kubernetes cluster integration from your project, simply click on the
**Remove integration** button. You will then be able to follow the procedure
**Remove integration** button. You will then be able to follow the procedure
and [add a cluster](#adding-a-cluster) again.
and add a Kubernetes cluster again.
## What you can get with the Kubernetes integration
## What you can get with the Kubernetes integration