doc/user/project/deploy_boards.md
{{< details >}}
{{< /details >}}
{{< history >}}
{{< /history >}}
[!flag] On GitLab Self-Managed, by default this feature is not available. To make it available, an administrator can enable the feature flag named
certificate_based_clusters.
GitLab deploy boards offer a consolidated view of the current health and status of each CI environment running on Kubernetes, 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 workflow they already use without any need to access Kubernetes.
[!warning] This feature was deprecated in GitLab 14.5. An epic exists to add this functionality to the agent.
If you have a Kubernetes cluster, you can Auto Deploy applications to production environments by using Auto DevOps.
With deploy boards you can gain more insight into deploys with benefits such as:
Here's an example of a deploy board of the production environment.
The squares represent pods in your Kubernetes cluster that are associated with the given environment. Hovering above each square you can see the state of a deploy rolling out. The percentage is the percent of the pods that are updated to the latest release.
Deploy boards are tightly coupled with Kubernetes, so you should be familiar with:
The deploy board is a visual representation of the Kubernetes pods for a specific environment, so there are a lot of use cases. To name a few:
To display the deploy boards for a specific environment you should:
Have defined an environment with a deploy stage.
Have a Kubernetes cluster up and running.
[!note] If you're using OpenShift, ensure that you're using the
Deploymentresource instead ofDeploymentConfiguration. Otherwise, the deploy boards don't render correctly. For more information, read the OpenShift docs and GitLab issue #4584.
Configure GitLab Runner with the docker or
kubernetes executor.
Configure the Kubernetes integration in your project for the
cluster. The Kubernetes namespace is of particular note as you need it
for your deployment scripts (exposed by the KUBE_NAMESPACE deployment variable).
Ensure Kubernetes annotations of app.gitlab.com/env: $CI_ENVIRONMENT_SLUG
and app.gitlab.com/app: $CI_PROJECT_PATH_SLUG are applied to the
deployments, replica sets, and pods, where $CI_ENVIRONMENT_SLUG and
$CI_PROJECT_PATH_SLUG are the values of the CI/CD variables. GitLab uses these variables to
lookup the proper environment in a cluster/namespace which may have more
than one. These resources should be contained in the namespace defined in
the Kubernetes service setting. You can use an Auto deploy .gitlab-ci.yml
template which has predefined stages and commands to use, and automatically
applies the annotations. Each project must have a unique namespace in
Kubernetes as well. The image below demonstrates how this is shown inside
Kubernetes.
If you use GCP to manage clusters, you can see the deployment details in GCP itself by navigating to Workloads > deployment name > Details:
Once all of these previous instructions are set up and the pipeline has run at least once, go to the environments page under Operate > Environments.
Deploy boards are visible by default. You can explicitly select the triangle next to their respective environment name to hide them.
The following example is an extract of a Kubernetes manifest deployment file, using the two annotations app.gitlab.com/env and app.gitlab.com/app to enable the deploy boards:
apiVersion: apps/v1
kind: Deployment
metadata:
name: "APPLICATION_NAME"
annotations:
app.gitlab.com/app: ${CI_PROJECT_PATH_SLUG}
app.gitlab.com/env: ${CI_ENVIRONMENT_SLUG}
spec:
replicas: 1
selector:
matchLabels:
app: "APPLICATION_NAME"
template:
metadata:
labels:
app: "APPLICATION_NAME"
annotations:
app.gitlab.com/app: ${CI_PROJECT_PATH_SLUG}
app.gitlab.com/env: ${CI_ENVIRONMENT_SLUG}
The annotations are applied to the deployments, replica sets, and pods. By changing the number of replicas, like kubectl scale --replicas=3 deploy APPLICATION_NAME -n ${KUBE_NAMESPACE}, you can follow the instances' pods from the board.
[!note] The YAML file is static. If you apply it using
kubectl apply, you must manually provide the project and environment slugs, or create a script to replace the variables in the YAML before applying.
A popular CI strategy, where a small portion of the fleet is updated to the new version of your application.
Read more about Canary Deployments.