Skip to content

Ability to group Kubernetes agents and run deployments for a group of Kubernetes clusters

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Some customers have multiple clusters for a given environment. For example, test environment has 2 clusters, where prod environment has 3 clusters.

Per this, if we want to deploy to Kubernetes cluster via Kubernetes agent, we would need to create an agent per cluster and then select each agent context to target a deployment to that Kubernetes cluster. We would either have to repeat deployment script for the number of Kubernetes clusters we want to deploy to or we would have to create multiple jobs each targeting a single deployment to one cluster.

Is it possible to group the agents for a given Kubernetes cluster environment such as dev test, production, and then specify this group in the CI/CD job to make a multi-cluster deployment?

  1. have a category or group for an agent? For example:

Test clusters have

  • test-agent1 in test1 cluster
  • test-agent2 in test2 cluster

Prod clusters have:

  • prod-agent1 in prod1 cluster
  • prod-agent2 in prod2 cluster
  • prod-agent3 in prod3 cluster
  1. In a CICD pipeline, can we select agent's group and deployment runs for each agent in that group?
deploy-test:
  environment:
    name: test
    kubernetes_agent:
      group: Test
  script:
    - helm install my-release . -f values.yaml 
    # this should select the context and run automatically for each k8s cluster where Test kubernetes agent belongs to; ie test-agent1 & test-agent2

deploy-prod:
  environment:
    name: production
    kubernetes_agent:
      group: Prod
  script:
    - helm install my-prod-release . -f values.yaml 
    # this should select the context and run automatically for each k8s cluster where Prod kubernetes agent belongs to; ie prod-agent1, prod-agent2 & prod-agent3
Edited by 🤖 GitLab Bot 🤖