Will spinnaker support targeting multiple Kubernetes clusters?
Asked Answered
N

2

5

We use a separate VPC per environment. Does or will spinnaker support targeting different Kubernetes clusters? Will adding environments ad-hoc be viable?

Neruda answered 29/3, 2016 at 16:40 Comment(0)
T
10

Spinnaker supports multiple Kubernetes clusters, each is added as an 'account' in Spinnaker configuration. The configured accounts are presented as options at deployment time, and the Server Groups for each application are rolled up under the account they belong to.

It is possible to change that configuration and refresh it at runtime, but it would involve editing the on-disk yaml file that backs the Clouddriver component of Spinnaker and triggering the /config-refresh endpoint.

Tersina answered 29/3, 2016 at 17:4 Comment(1)
Is this still the state of the product? I'm wondering if there's a way to import existing kubernetes clusters (say, built with GKE) to be managed by an existing Spinnaker instance, or if all clusters must be designated at configuration time (or runtime, with the workaround by cfieber)Penknife
A
1

You can use configuration similar to this. Here I am adding 2 k8s account with context as k8s selector.

  kubernetes:
    enabled: true
    accounts:
    - name: scratch-k8s-account
      requiredGroupMembership: []
      context: k8s-poc1.dev-domain.net
      namespaces: []
      omitNamespaces: []
      dockerRegistries:
      - accountName: poc-ecr
        namespaces: []
      kubeconfigFile: /home/ubuntu/.kops/config
    - name: dev-k8s-account
      requiredGroupMembership: []
      context: k8s-poc2.dev-domain.net
      namespaces: []
      omitNamespaces: []
      dockerRegistries:
      - accountName: poc-ecr
        namespaces: []
      kubeconfigFile: /home/ubuntu/.kops/config
    primaryAccount: scratch-k8s-account
Amata answered 28/6, 2017 at 1:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.