Commit 5cbd6b11 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs-align-k8s-info' into 'master'

Docs: Align CE and EE k8s doc to match

Closes #54771

See merge request gitlab-org/gitlab-ce!23758
parents 213891fa eb63ffaa
...@@ -140,13 +140,14 @@ To add an existing Kubernetes cluster to your project: ...@@ -140,13 +140,14 @@ To add an existing Kubernetes cluster to your project:
to grant access. to grant access.
- **Project namespace** (optional) - You don't have to fill it in; by leaving - **Project namespace** (optional) - You don't have to fill it in; by leaving
it blank, GitLab will create one for you. Also: it blank, GitLab will create one for you. Also:
- Each project should have a unique namespace. - Each project should have a unique namespace.
- The project namespace is not necessarily the namespace of the secret, if - The project namespace is not necessarily the namespace of the secret, if
you're using a secret with broader permissions, like the secret from `default`. you're using a secret with broader permissions, like the secret from `default`.
- You should **not** use `default` as the project namespace. - You should **not** use `default` as the project namespace.
- If you or someone created a secret specifically for the project, usually - If you or someone created a secret specifically for the project, usually
with limited permissions, the secret's namespace and project namespace may with limited permissions, the secret's namespace and project namespace may
be the same. be the same.
1. Finally, click the **Create Kubernetes cluster** button. 1. Finally, click the **Create Kubernetes cluster** button.
After a couple of minutes, your cluster will be ready to go. You can now proceed After a couple of minutes, your cluster will be ready to go. You can now proceed
...@@ -168,7 +169,7 @@ are trusted, so **only trusted users should be allowed to control your clusters* ...@@ -168,7 +169,7 @@ are trusted, so **only trusted users should be allowed to control your clusters*
The default cluster configuration grants access to a wide set of The default cluster configuration grants access to a wide set of
functionalities needed to successfully build and deploy a containerized functionalities needed to successfully build and deploy a containerized
application. Bare in mind that the same credentials are used for all the application. Bear in mind that the same credentials are used for all the
applications running on the cluster. applications running on the cluster.
## Access controls ## Access controls
...@@ -354,6 +355,18 @@ to reach your apps. This heavily depends on your domain provider, but in case ...@@ -354,6 +355,18 @@ to reach your apps. This heavily depends on your domain provider, but in case
you aren't sure, just create an A record with a wildcard host like you aren't sure, just create an A record with a wildcard host like
`*.example.com.`. `*.example.com.`.
## Multiple Kubernetes clusters **[PREMIUM]**
> Introduced in [GitLab Premium][ee] 10.3.
With GitLab Premium, you can associate more than one Kubernetes clusters to your
project. That way you can have different clusters for different environments,
like dev, staging, production, etc.
Simply add another cluster, like you did the first time, and make sure to
[set an environment scope](#setting-the-environment-scope) that will
differentiate the new cluster with the rest.
## Setting the environment scope **[PREMIUM]** ## Setting the environment scope **[PREMIUM]**
When adding more than one Kubernetes clusters to your project, you need When adding more than one Kubernetes clusters to your project, you need
...@@ -372,11 +385,11 @@ Also, jobs that don't have an environment keyword set will not be able to access ...@@ -372,11 +385,11 @@ Also, jobs that don't have an environment keyword set will not be able to access
For example, let's say the following Kubernetes clusters exist in a project: For example, let's say the following Kubernetes clusters exist in a project:
| Cluster | Environment scope | | Cluster | Environment scope |
| ---------- | ------------------- | | ----------- | ----------------- |
| Development| `*` | | Development | `*` |
| Staging | `staging/*` | | Staging | `staging` |
| Production | `production/*` | | Production | `production` |
And the following environments are set in [`.gitlab-ci.yml`](../../../ci/yaml/README.md): And the following environments are set in [`.gitlab-ci.yml`](../../../ci/yaml/README.md):
...@@ -393,14 +406,14 @@ deploy to staging: ...@@ -393,14 +406,14 @@ deploy to staging:
stage: deploy stage: deploy
script: make deploy script: make deploy
environment: environment:
name: staging/$CI_COMMIT_REF_NAME name: staging
url: https://staging.example.com/ url: https://staging.example.com/
deploy to production: deploy to production:
stage: deploy stage: deploy
script: make deploy script: make deploy
environment: environment:
name: production/$CI_COMMIT_REF_NAME name: production
url: https://example.com/ url: https://example.com/
``` ```
...@@ -410,18 +423,6 @@ The result will then be: ...@@ -410,18 +423,6 @@ The result will then be:
- The staging cluster will be used for the "deploy to staging" job. - The staging cluster will be used for the "deploy to staging" job.
- The production cluster will be used for the "deploy to production" job. - The production cluster will be used for the "deploy to production" job.
## Multiple Kubernetes clusters
> Introduced in [GitLab Premium][ee] 10.3.
With GitLab Premium, you can associate more than one Kubernetes clusters to your
project. That way you can have different clusters for different environments,
like dev, staging, production, etc.
Simply add another cluster, like you did the first time, and make sure to
[set an environment scope](#setting-the-environment-scope) that will
differentiate the new cluster with the rest.
## Deployment variables ## Deployment variables
The Kubernetes cluster integration exposes the following The Kubernetes cluster integration exposes the following
...@@ -463,6 +464,14 @@ builds is that they must have a matching ...@@ -463,6 +464,14 @@ builds is that they must have a matching
your build has no `environment:name` set, it will not be passed the Kubernetes your build has no `environment:name` set, it will not be passed the Kubernetes
credentials. credentials.
## Monitoring your Kubernetes cluster **[ULTIMATE]**
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4701) in [GitLab Ultimate][ee] 10.6.
When [Prometheus is deployed](#installing-applications), GitLab will automatically monitor the cluster's health. At the top of the cluster settings page, CPU and Memory utilization is displayed, along with the total amount available. Keeping an eye on cluster resources can be important, if the cluster runs out of memory pods may be shutdown or fail to start.
![Cluster Monitoring](https://docs.gitlab.com/ee/user/project/clusters/img/k8s_cluster_monitoring.png)
## Enabling or disabling the Kubernetes cluster integration ## Enabling or disabling the Kubernetes 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
...@@ -489,13 +498,16 @@ To remove the Kubernetes cluster integration from your project, simply click the ...@@ -489,13 +498,16 @@ To remove the Kubernetes cluster integration from your project, simply click 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 Kubernetes cluster again. and add a Kubernetes cluster again.
## View Kubernetes pod logs from GitLab **[ULTIMATE]**
Learn how to easily
[view the logs of running pods in connected Kubernetes clusters](https://docs.gitlab.com/ee/user/project/clusters/kubernetes_pod_logs.html).
## What you can get with the Kubernetes integration ## What you can get with the Kubernetes integration
Here's what you can do with GitLab if you enable the Kubernetes integration. Here's what you can do with GitLab if you enable the Kubernetes integration.
### Deploy Boards ### Deploy Boards **[PREMIUM]**
> Available in [GitLab Premium][ee].
GitLab's Deploy Boards offer a consolidated view of the current health and GitLab's Deploy Boards offer a consolidated view of the current health and
status of each CI [environment](../../../ci/environments.md) running on Kubernetes, status of each CI [environment](../../../ci/environments.md) running on Kubernetes,
...@@ -503,24 +515,22 @@ displaying the status of the pods in the deployment. Developers and other ...@@ -503,24 +515,22 @@ displaying the status of the pods in the deployment. Developers and other
teammates can view the progress and status of a rollout, pod by pod, in the teammates can view the progress and status of a rollout, pod by pod, in the
workflow they already use without any need to access Kubernetes. workflow they already use without any need to access Kubernetes.
[> Read more about Deploy Boards](https://docs.gitlab.com/ee/user/project/deploy_boards.html) [Read more about Deploy Boards](https://docs.gitlab.com/ee/user/project/deploy_boards.html)
### Canary Deployments ### Canary Deployments **[PREMIUM]**
> Available in [GitLab Premium][ee].
Leverage [Kubernetes' Canary deployments](https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#canary-deployments) Leverage [Kubernetes' Canary deployments](https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#canary-deployments)
and visualize your canary deployments right inside the Deploy Board, without and visualize your canary deployments right inside the Deploy Board, without
the need to leave GitLab. the need to leave GitLab.
[> Read more about Canary Deployments](https://docs.gitlab.com/ee/user/project/canary_deployments.html) [Read more about Canary Deployments](https://docs.gitlab.com/ee/user/project/canary_deployments.html)
### Kubernetes monitoring ### Kubernetes monitoring
Automatically detect and monitor Kubernetes metrics. Automatic monitoring of Automatically detect and monitor Kubernetes metrics. Automatic monitoring of
[NGINX ingress](../integrations/prometheus_library/nginx.md) is also supported. [NGINX ingress](../integrations/prometheus_library/nginx.md) is also supported.
[> Read more about Kubernetes monitoring](../integrations/prometheus_library/kubernetes.md) [Read more about Kubernetes monitoring](../integrations/prometheus_library/kubernetes.md)
### Auto DevOps ### Auto DevOps
...@@ -530,7 +540,7 @@ applications. ...@@ -530,7 +540,7 @@ applications.
To make full use of Auto DevOps(Auto Deploy, Auto Review Apps, and Auto Monitoring) To make full use of Auto DevOps(Auto Deploy, Auto Review Apps, and Auto Monitoring)
you will need the Kubernetes project integration enabled. you will need the Kubernetes project integration enabled.
[> Read more about Auto DevOps](../../../topics/autodevops/index.md) [Read more about Auto DevOps](../../../topics/autodevops/index.md)
### Web terminals ### Web terminals
...@@ -546,8 +556,6 @@ containers. To use this integration, you should deploy to Kubernetes using ...@@ -546,8 +556,6 @@ containers. To use this integration, you should deploy to Kubernetes using
the deployment variables above, ensuring any pods you create are labelled with the deployment variables above, ensuring any pods you create are labelled with
`app=$CI_ENVIRONMENT_SLUG`. GitLab will do the rest! `app=$CI_ENVIRONMENT_SLUG`. GitLab will do the rest!
## Read more
### Integrating Amazon EKS cluster with GitLab ### Integrating Amazon EKS cluster with GitLab
- Learn how to [connect and deploy to an Amazon EKS cluster](eks_and_gitlab/index.md). - Learn how to [connect and deploy to an Amazon EKS cluster](eks_and_gitlab/index.md).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment