Consul을 사용한 고가용성 Vault 클러스터

Consul을 사용한 고가용성 Vault 클러스터

중요 참고: 이 차트는 Helm 2와 호환되지 않습니다. 이 차트에는 Helm 3.6+를 사용하세요.

호환성 정보: Consul 1.14.0부터 Kubernetes의 Consul은 기본적으로 클라이언트 에이전트 대신 Consul Dataplane을 사용합니다. Vault는 현재 Consul Dataplane을 지원하지 않습니다. Consul on Kubernetes 배포가 계속 클라이언트 에이전트를 사용하도록 Consul 1.14.0 업그레이드 가이드를 따르세요.

아래 values.yaml을 사용해 Consul을 고가용성 스토리지 백엔드로, Google Cloud KMS를 자동 봉인 해제로 사용하는 다섯 서버 Vault 클러스터를 설정할 수 있습니다.

본문

server:
  extraEnvironmentVars:
    GOOGLE_REGION: global
    GOOGLE_PROJECT: myproject
    GOOGLE_APPLICATION_CREDENTIALS: /vault/userconfig/my-gcp-iam/myproject-creds.json

  volumes:
    - name: userconfig-my-gcp-iam
      secret:
        defaultMode: 420
        secretName: my-gcp-iam

  volumeMounts:
    - mountPath: /vault/userconfig/my-gcp-iam
      name: userconfig-my-gcp-iam
      readOnly: true

  affinity: |
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchLabels:
              app: {{ template "vault.name" . }}
              release: "{{ .Release.Name }}"
              component: server
          topologyKey: kubernetes.io/hostname

  service:
    enabled: true

  ha:
    enabled: true
    replicas: 5

    config: |
      ui = true

      listener "tcp" {
        tls_disable = 1
        address = "[::]:8200"
        cluster_address = "[::]:8201"
      }

      storage "consul" {
        path = "vault"
        address = "HOST_IP:8500"
      }

      seal "gcpckms" {
         project     = "myproject"
         region      = "global"
         key_ring    = "vault-unseal-kr"
         crypto_key  = "vault-unseal-key"
      }

      service_registration "kubernetes" {}

출처: 문서

더 알아보기 (Learn more)