본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Helm으로 프로덕션 환경에 Kong Mesh 배포

원문 보기 위키 갱신

Helm으로 프로덕션 환경에 Kong Mesh 배포 (Deploy Kong Mesh in production with Helm)

이 문서는 Kubernetes에서 Helm 차트를 사용해 프로덕션 수준의 Kong Mesh를 배포하는 방법을 안내해요. 단일 존 제어 평면부터 멀티 존 글로벌·페더레이티드 제어 평면까지 상황별로 권장되는 values.yaml 설정을 소개해요. TLS 시크릿이나 라이선스처럼 설치 전에 미리 준비해야 하는 리소스가 있는지 (action) 주석을 꼼꼼히 확인하라고 짚어주고, 여기서 지정한 값들은 기본 Helm 설정을 덮어쓰며 helm 명령어나 다른 values.yaml로 다시 덮어쓸 수 있다는 점도 알려줘요

출처: 문서

본문

프로덕션 준비가 완료된 Kong Mesh를 설치하려면 서비스 메시가 안전하고, 신뢰할 수 있으며, 성능이 뛰어난지 확인해야 해요. Kubernetes에 Kong Mesh를 배포할 때는 여기서 제공하는 값들을 사용해 Kong Mesh 설치를 배포하세요.

이 페이지의 안내는 설치의 출발점이 되기 위한 거예요. 설치 단계를 실행하기 전에 사용할 수 있는 다른 옵션들의 지원 여부를 확인하려면 전체 Helm 구성 참조 문서를 읽어보는 것을 항상 권장해요. 여기서 제공하는 값들은 기본 참조 Helm 구성의 값들을 재정의하고, 이 값들은 다시 추가적인 values.yaml 파일이나 helm 명령의 인자에 의해 재정의될 수 있어요. 값이 계산되는 방식을 더 자세히 알아보려면 Helm 문서를 참고하세요.

이 페이지의 값들은 특정 기능이 활성화되었을 때 미리 생성해야 하는 리소스를 참조할 수 있어요. 파일 내용을 주의 깊게 읽고 (action) 키워드 근처의 메모에 따라 이러한 리소스를 준비하세요. 사전에 존재해야 하는 리소스가 필요한 기능을 비활성화하기로 결정했다면, 전체 Helm 구성 참조에 따라 해당 필드를 제거하거나 변경하세요.

단일 존 컨트롤 플레인

단일 존 컨트롤 플레인을 설치하세요:

helm install kong-mesh kong-mesh/kong-mesh --namespace kong-mesh-system -f ./values.single-zone-cp.yaml

권장 values.yaml 파일:

kuma:
  controlPlane:
    mode: "zone"

    tls:
      apiServer:
        # (action): please prepare the content of this secret before installing Kong Mesh
        # it contains the keys "tls.crt" and "tls.key", and the content items should be in "PEM" format
        # more details on preparing certificates: https://docs.konghq.com/mesh/latest/production/secure-deployment/certificates/
        secretName: kong-mesh-apiserver-tls

    apiServer:
      corsAllowedDomains:
        # change these values you want to access the control plane API server or Mesh GUI from a custom domain
        - https://localhost:5682
        # if you want to access the API server using the HTTP port, add the following line
        # - http://localhost:5681

    defaults:
      # change these values if you want to open the admin access rights of control plane API server to more groups
      adminRoleGroups:
        - mesh-system:admin
        - system:masters
        - kubeadm:cluster-admins

    envVars:
      # if you want to access the API server using the HTTP port, change the following switch to "true"
      KUMA_API_SERVER_HTTP_ENABLED: "false"

    secrets:
      # (action): please prepare the content of this secret before installing Kong Mesh
      # to obtain this license, please contact your Kong Account Manager and import it into your cluster:
      # kubectl create  -n kong-mesh-system secret generic kong-mesh-license --from-file license.json=$KMESH_LICENSE_FILE
      - Secret: kong-mesh-license
        Key: license.json
        Env: KMESH_LICENSE_INLINE

    # please tune the resource allocation according to your actual mesh size and traffic load after Kong Mesh is installed.
    # try to make the resource limits identical to requests to make components are assigned as a QoS class of Guaranteed
    # more details on sizing the CP: https://docs.konghq.com/mesh/latest/introduction/kuma-requirements/#sizing-your-control-plane
    resources:
      requests:
        cpu: 1000m
        memory: 1024Mi
      limits:
        cpu: 1000m
        memory: 1024Mi

    replicas: 2
    autoscaling:
      enabled: true

      metrics:
        - type: Resource
          resource:
            name: cpu
            target:
              type: Utilization
              averageUtilization: 50
        - type: Resource
          resource:
            name: memory
            target:
              type: Utilization
              averageUtilization: 50


    podDisruptionBudget:
      enabled: true

  cni:
    # -- Install Kuma with CNI instead of proxy init container
    enabled: false
    resources:
      requests:
        cpu: 100m
        memory: 100Mi
      limits:
        cpu: 100m
        memory: 100Mi

ratelimit:
  # -- Whether Ratelimit Service should be deployed
  enabled: false
  replicas: 2
  autoscaling:
    enabled: true
    minReplicas: 2
    maxReplicas: 5
    metrics:
      - type: Resource
        resource:
          name: cpu
          target:
            type: Utilization
            averageUtilization: 80

  # please tune the resource allocation according to your actual mesh size and traffic load after Kong Mesh is installed.
  # try to make the resource limits identical to requests to make components are assigned as a QoS class of Guaranteed
  resources:
    requests:
      cpu: 500m
      memory: 512Mi
    limits:
      cpu: 500m
      memory: 512Mi

  secrets:
    # (action): please prepare the content of this secret before installing Kong Mesh
    # the value should be set according to your redis server configuration
    # it is only required when the ratelimit component is enabled
    - Secret: ratelimit-redis-auth
      Key: redis-pass
      Env: REDIS_AUTH
global:
  ratelimit:
    servertls:
      enabled: true

멀티 존 글로벌 컨트롤 플레인

멀티 존 배포를 위한 글로벌 컨트롤 플레인을 설치하세요:

helm install kong-mesh kong-mesh/kong-mesh --namespace kong-mesh-system -f ./values.global-cp.yaml

권장 values.yaml 파일:

kuma:
  controlPlane:
    mode: "global"

    tls:
      apiServer:
        # (action): please prepare the content of this secret before installing Kong Mesh
        # it contains the keys "tls.crt" and "tls.key", and the content items should be in "PEM" format
        # more details on preparing certificates: https://docs.konghq.com/mesh/latest/production/secure-deployment/certificates/
        secretName: kong-mesh-apiserver-tls
      kdsGlobalServer:
        # (action): please prepare the content of this secret before installing Kong Mesh
        # it contains the keys "ca.crt", "tls.crt" and "tls.key", and the content items should be in "PEM" format
        # more details on preparing certificates: https://docs.konghq.com/mesh/latest/production/secure-deployment/certificates/
        secretName: kong-mesh-kds-global-server-tls

    apiServer:
      corsAllowedDomains:
        # change these values you want to access the control plane API server or Mesh GUI from a custom domain
        - https://localhost:5682
      # if you want to access the API server using the HTTP port, add the following line
      # - http://localhost:5681

    defaults:
      # change these values if you want to open the admin access rights of control plane API server to more groups
      adminRoleGroups:
        - mesh-system:admin
        - system:masters

    envVars:
      # if you want to access the API server using the HTTP port, change the following switch to "true"
      KUMA_API_SERVER_HTTP_ENABLED: "false"

    secrets:
      # (action): please prepare the content of this secret before installing Kong Mesh
      # to obtain this license, please contact your Kong Account Manager and import it into your cluster:
      # kubectl create  -n kong-mesh-system secret generic kong-mesh-license --from-file license.json=$KMESH_LICENSE_FILE
      - Secret: kong-mesh-license
        Key: license.json
        Env: KMESH_LICENSE_INLINE

    # please tune the resource allocation according to your actual mesh size and traffic load after Kong Mesh is installed
    # try to make the resource limits identical to requests to make components are assigned as a QoS class of Guaranteed
    # more details on sizing the CP: https://docs.konghq.com/mesh/latest/introduction/kuma-requirements/#sizing-your-control-plane
    resources:
      requests:
        cpu: 1000m
        memory: 1024Mi
      limits:
        cpu: 1000m
        memory: 1024Mi

    replicas: 2
    autoscaling:
      enabled: true

      metrics:
        - type: Resource
          resource:
            name: cpu
            target:
              type: Utilization
              averageUtilization: 50
        - type: Resource
          resource:
            name: memory
            target:
              type: Utilization
              averageUtilization: 50


    podDisruptionBudget:
      enabled: true

이 페이지의 값들은 특정 기능이 활성화되었을 때 미리 생성해야 하는 리소스를 참조할 수 있어요. 파일 내용을 주의 깊게 읽고 (action) 키워드 근처의 메모에 따라 이러한 리소스를 준비하세요. 사전에 존재해야 하는 리소스가 필요한 기능을 비활성화하기로 결정했다면, 전체 Helm 구성 참조에 따라 해당 필드를 제거하거나 변경하세요.

멀티존 연합 zone 컨트롤 플레인

멀티존 배포를 위해 연합 zone 컨트롤 플레인을 설치해요:

helm install kong-mesh kong-mesh/kong-mesh --namespace kong-mesh-system -f ./values.federated-zone-cp.yaml \
  --set 'kuma.controlPlane.zone=zone-prod' \
  --set 'kuma.controlPlane.kdsGlobalAddress=kds-global.example.com'

권장 values.yaml 파일이에요:

kuma:
  controlPlane:
    mode: "zone"
    # (action): please specify a name for the zone
    zone:

    tls:
      apiServer:
        # (action): please prepare the content of this secret before installing Kong Mesh
        # it contains the keys "tls.crt" and "tls.key", and the content items should be in "PEM" format
        # more details on preparing certificates: https://docs.konghq.com/mesh/latest/production/secure-deployment/certificates/
        secretName: kong-mesh-apiserver-tls
        kdsZoneClient:
          # (action): please prepare the content of this secret before installing Kong Mesh
          # the certificate can be extracted from the trusted global CP server
          # it should contain the key "ca.crt", and the content certificate should be in "PEM" format
          # more details on certificates verifying: https://docs.konghq.com/mesh/latest/production/secure-deployment/certificates/#control-plane-to-control-plane-multizone
          secretName: kong-mesh-kds-global-ca
          skipVerify: false

    apiServer:
      corsAllowedDomains:
        # change these values you want to access the control plane API server or Mesh GUI from a custom domain
        - https://localhost:5682
        # if you want to access the API server using the HTTP port, add the following line
        # - http://localhost:5681

    defaults:
      # change these values if you want to open the admin access rights of control plane API server to more groups
      adminRoleGroups:
        - mesh-system:admin
        - system:masters
        - kubeadm:cluster-admins

    # (action): please specify the address of the global CP
    # e.g. grpcs://my-global-cp.my-hostname.com:5685
    kdsGlobalAddress: ""

    envVars:
      KUMA_MULTIZONE_GLOBAL_KDS_AUTH_TYPE: zoneToken
      # if you want to access the API server using the HTTP port, change the following switch to "true"
      KUMA_API_SERVER_HTTP_ENABLED: "false"

    secrets:
      # (action): please prepare the content of this secret before installing Kong Mesh
      # the CP token is only required when installing a zone CP that is connecting to a global CP
      # to obtain this CP token, please generate it using the `kumactl` connecting to the global CP
      # kumactl generate zone-token --zone <zone-name> --scope cp --valid-for 43920h > $TOKEN_FLIE
      # kubectl create  -n kong-mesh-system secret generic kong-mesh-global-cp-token --from-file token=$TOKEN_FLIE
      - Secret: kong-mesh-global-cp-token
        Key: token
        Env: KUMA_MULTIZONE_ZONE_KDS_AUTH_TOKEN_INLINE

    # please tune the resource allocation according to your actual mesh size and traffic load after Kong Mesh is installed.
    # try to make the resource limits identical to requests to make components are assigned as a QoS class of Guaranteed
    # more detail on sizing the CP: https://docs.konghq.com/mesh/latest/introduction/kuma-requirements/#sizing-your-control-plane
    resources:
      requests:
        cpu: 1000m
        memory: 1024Mi
      limits:
        cpu: 1000m
        memory: 1024Mi

    replicas: 2
    autoscaling:
      enabled: true

      metrics:
        - type: Resource
          resource:
            name: cpu
            target:
              type: Utilization
              averageUtilization: 50
        - type: Resource
          resource:
            name: memory
            target:
              type: Utilization
              averageUtilization: 50


    podDisruptionBudget:
      enabled: true

  cni:
    # -- Install Kuma with CNI instead of proxy init container
    enabled: false
    resources:
      requests:
        cpu: 100m
        memory: 100Mi
      limits:
        cpu: 100m
        memory: 100Mi

  ingress:
    # -- If true, it deploys Ingress for cross cluster communication
    enabled: false
    # please tune the resource allocation according to your actual mesh size and traffic load after Kong Mesh is installed.
    # try to make the resource limits identical to requests to make components are assigned as a QoS class of Guaranteed
    resources:
      requests:
        cpu: 1000m
        memory: 1024Mi
      limits:
        cpu: 1000m
        memory: 1024Mi

    replicas: 2
    autoscaling:
      enabled: true
      metrics:
        - type: Resource
          resource:
            name: cpu
            target:
              type: Utilization
              averageUtilization: 50
        - type: Resource
          resource:
            name: memory
            target:
              type: Utilization
              averageUtilization: 50

    podDisruptionBudget:
      enabled: true

ratelimit:
  # -- Whether Ratelimit Service should be deployed
  enabled: false
  replicas: 2
  autoscaling:
    enabled: true
    minReplicas: 2
    maxReplicas: 5
    metrics:
      - type: Resource
        resource:
          name: cpu
          target:
            type: Utilization
            averageUtilization: 80

  # please tune the resource allocation according to your actual mesh size and traffic load after Kong Mesh is installed.
  # try to make the resource limits identical to requests to make components are assigned as a QoS class of Guaranteed
  resources:
    requests:
      cpu: 500m
      memory: 512Mi
    limits:
      cpu: 500m
      memory: 512Mi

  secrets:
    # (action): please prepare the content of this secret before installing Kong Mesh
    # the value should be set according to your redis server configuration
    # it is only required when the ratelimit component is enabled
    - Secret: ratelimit-redis-auth
      Key: redis-pass
      Env: REDIS_AUTH
global:
  ratelimit:
    servertls:
      enabled: true

이 페이지의 값들은 특정 기능이 활성화됐을 때 미리 생성해야 하는 리소스를 참조할 수 있어요. 파일 내용을 꼼꼼히 읽고 (action) 키워드 근처의 안내에 따라 이 리소스들을 준비하세요. 미리 존재해야 하는 리소스가 필요한 기능을 비활성화하기로 결정했다면, 전체 Helm 설정 참조에 따라 해당 필드를 제거하거나 변경하세요.

관련 리소스

더 알아보기 (Learn more)

  • Helm 설정에서 사용할 수 있는 전체 옵션을 확인하려면 이 참조 문서를 보세요 — Helm configuration reference
  • Kong Mesh 설치 과정 전체를 먼저 훑어보고 싶다면 이 문서를 참고해요 — Install Kong Mesh
  • 멀티 존 구성에서 제어 평면 간 인증 방식이 궁금하다면 이 문서를 확인해요 — Multi-zone Authentication