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

vSphere Kubernetes Service

원문 보기 위키 갱신

vSphere Kubernetes Service (VKS)

VKS(vSphere Kubernetes Service)에 Calico Enterprise를 Supervisor Service로 설치하고 게스트 클러스터에 배포하는 방법을 설명해요. Supervisor 쪽 1회성 설정, 게스트 클러스터 배포, 그리고 에어갭 환경용 프라이빗 레지스트리 이전까지 단계별로 다뤄요.

출처: 문서

본문

큰 그림(Big picture)

VKS(vSphere Kubernetes Service)에 Calico Enterprise를 Supervisor Service로 설치하고, 게스트 클러스터에 배포해요.

시작하기 전에

이 가이드에는 다음이 필요해요:

  • VM 이미지: 지원되는 TKR 버전으로 등록된 Ubuntu 또는 Photon OVA 이미지, TKR은 healthy 상태여야 해요.

  • vSphere 리소스: 게스트 클러스터를 프로비저닝할 충분한 용량. 최소 요구사항은 다음과 같아요:

    • 컨트롤 플레인 노드 1개
    • Linux 워커 노드 3개
  • OCI 레지스트리: 패키지 매니페스트와 컨테이너 이미지를 저장하기 위해 vSphere에 구성된 OCI 호환 레지스트리.

  • Tigera 컨테이너 레지스트리에 접근하기 위한 Tigera 풀 시크릿 (Tigera 팀에 문의하세요).

네트워킹

구성 Dataplane 캡슐화 BGP
Linux only (기본값) IPTables IPIP Enabled

방법(How to)

VKS에 Calico Enterprise를 구성하는 과정은 두 단계로 이뤄져요. 먼저 vSphere에서 Supervisor Service로 지정(Part 1, 1회)하고, 그다음 게스트 클러스터에 배포(Part 2)해요. Part 3과 Part 4는 에어갭 환경에서만 적용돼요.

Part 1: Supervisor Service 설정 (클러스터 관리자 1회성 설정)

  1. vSphere Supervisor UI에서:

    • 새 Supervisor Service를 만들거나(또는 기존 서비스에 새 버전을 추가해요).
    • Supervisor service Package와 PackageMetadata(아래 예시) 리소스를 업로드하고 UI 워크플로를 완료해요.
    • Supervisor Service를 등록하고 registryName을 UI에서 구성한 레지스트리 이름과 일치하도록 설정해요(필요하면).
---
apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package
metadata:
  name: calico-enterprise-svs.tigera.io.3.23.1
spec:
  refName: calico-enterprise-svs.tigera.io
  version: 3.23.1
  template:
    spec:
      fetch:
      - imgpkgBundle:
          image: quay.io/tigera/calico-enterprise-svs:v3.23.1   #Change this to the registry where the carvel package is getting picked up
      template:
      - ytt:
          paths:
          - service
          - kapp
      - kbld:
          paths:
          - "-"
          - .imgpkg/images.yml
          - kbld/
      deploy:
      - kapp: {}
---
apiVersion: data.packaging.carvel.dev/v1alpha1
kind: PackageMetadata
metadata:
  name: calico-enterprise-svs.tigera.io
spec:
  displayName: "Calico Enterprise SVS"
  shortDescription: "Manages Calico Enterprise Addon Repository and Installation"
  1. tigera-pull-secret 애플리케이션을 자동 적용하려는 Supervisor 네임스페이스에 tigera-pull-secret ClusterResourceSet을 추가해요
kubectl apply -n <cluster-namespace> -f <clusterresourceset-file-below>.yaml
# Apply this on the Supervisor cluster for the namespaces where guest clusters will be provisioned with Calico Enterprise.
# Source Secret containing the CRS manifests
apiVersion: v1
kind: Secret
metadata:
  name: tigera-pull-secret-bootstrap
type: addons.cluster.x-k8s.io/resource-set   # CRS-specific type
stringData:
  resources.yaml: |
    apiVersion: v1
    kind: Namespace
    metadata:
      name: tigera-operator
      labels:
        pod-security.kubernetes.io/enforce: privileged
        pod-security.kubernetes.io/audit: privileged
        pod-security.kubernetes.io/warn: privileged
    ---
    apiVersion: v1
    kind: Secret
    metadata:
      name: tigera-pull-secret
      namespace: tigera-operator
    type: kubernetes.io/dockerconfigjson
    data:
      .dockerconfigjson: <PASTE-BASE64-DOCKERCONFIGJSON-HERE>
---
# The CRS that selects clusters and points at the source
apiVersion: addons.cluster.x-k8s.io/v1beta2
kind: ClusterResourceSet
metadata:
  name: tigera-pull-secret-bootstrap
spec:
  strategy: Reconcile
  clusterSelector:
    matchLabels:
      tigera.io/pull-secret: required
  resources:
  - name: tigera-pull-secret-bootstrap
    kind: Secret

Part 2: 게스트 클러스터에 배포

게스트 클러스터 사전 요구사항

  • tigera 풀 시크릿용 Cluster ResourceSet: Calico Enterprise가 포함된 게스트 클러스터가 프로비저닝될 모든 네임스페이스에 대해, Supervisor 클러스터에 CAPI Cluster ResourceSet으로 적용된 tigera-pull-secret.
  • Tigera 라이선스 파일 (Tigera 팀에 문의하세요).
  • Elasticsearch 스토리지에 필요한 StorageClass 기반 동적 PV 프로비저닝.

스텝 1: AddonConfig 적용

INFO: 적용 전에 다음 필드를 업데이트하세요:

  • metadata.name과 metadata.namespace
  • spec.addonConfigDefinitionRef (name과 namespace)
  • spec.clusterName
  • spec.values.installation.registry — 프라이빗 레지스트리(에어갭 설치용)에서 Calico Enterprise 이미지를 가져오도록 설정해요. 이 레지스트리는 이 문서의 Part 4에서 Calico Enterprise 이미지를 푸시한 레지스트리와 같아야 해요. Calico Enterprise 이미지를 프라이빗 레지스트리 내 특정 폴더에 푸시했다면 spec.values.installation.imagePath를 선택적으로 설정할 수 있어요.

SECONDARY: 모든 Calico Enterprise 기능(logCollector, logStorage, manager, monitor, policyRecommendation)은 옵션이에요. apiServer만 필수예요. 필요 없는 기능은 false로 설정하세요.

kubectl apply -f ./addon_config.yaml
apiVersion: addons.kubernetes.vmware.com/v1alpha1
kind: AddonConfig
metadata:
  name: <cluster-name>-<addon-name>    # The AddonConfig name has to be in this format eg. cluster1-calico-enterprise
  namespace: <cluster-namespace>
spec:
  addonConfigDefinitionRef:
    name: calico-enterprise.tigera.io.3.23.1
    namespace: vmware-system-vks-public
  clusterName: <cluster-name>
  values:
    # Every option from tigera-helm-charts/tigera-operator/values.yaml may be
    # set here. Anything not specified falls back to the default declared in
    # the AddonConfigDefinition schema. The fields below are illustrative;
    installation:
      enabled: true
      imagePullSecrets:
      - name: tigera-pull-secret
      # registry: quay.io/
      # imagePath: ""
      # controlPlaneReplicas: 3
    apiServer:
      enabled: true
    # Calico deploys its own bundled Prometheus Operator by default (enabled: true).
    # Set this to false ONLY if you run your own external Prometheus Operator -- in
    # that case Calico's Monitor still creates its Prometheus/Alertmanager CRs for
    # your operator to reconcile. If you want no Prometheus at all, also set
    # monitor.enabled: false.
    # tigeraPrometheusOperator:
    #   enabled: false
    logCollector:
      enabled: true
    logStorage:
      enabled: true
      nodes:
        count: 1
    manager:
      enabled: true
    monitor:
      enabled: true
    policyRecommendation:
      enabled: true

SECONDARY: Addon 프레임워크는 AddonConfig 이름이 <cluster-name>-<addon-name> 형식이기를 기대해요. 이름이 이 형식과 맞지 않으면 프레임워크는 해당 AddonConfig를 무시하고 대신 기본값으로 새로 하나 만들어요.

스텝 2: 커스텀 AddonInstall 리소스 적용

커스텀 AddonInstall 리소스를 사용하면 클러스터를 선택적으로 업그레이드할 수 있어요. spec.clusters.selector.matchLabels로 클러스터가 갖춰야 하는 라벨을 지정하고, 업그레이드하려는 Cluster 리소스에 그 라벨을 붙이면 돼요.

kubectl apply -f ./addoninstall.yaml
apiVersion: addons.kubernetes.vmware.com/v1alpha1
kind: AddonInstall
metadata:
  labels:
    addon.kubernetes.vmware.com/addon-name: calico-enterprise
    addon.kubernetes.vmware.com/addon-namespace: vmware-system-vks-public
    addons.kubernetes.vmware.com/category: cni
  name: <addon-install-name>
  namespace: <cluster-namespace>
spec:
  addonRef:
    name: calico-enterprise
    namespace: vmware-system-vks-public
  clusters:
  - selector:
      matchLabels:
        <AddonInstallLabelKey>: <AddonInstallLabelValue>      # Eg. cluster-group: calico-group-1
    constraints:
      expression: cluster.ciRefName() = "calico-enterprise' && cluster.kubeProxyConfiguration().enabled == true
  releaseFilter:
    ref:
      name: calico-enterprise.tigera.io.3.23.1
  stopMatchingBehavior: Retain

스텝 3: Cluster 리소스 적용

적용 전에 다음 필드를 업데이트하세요:

  • metadata.name과 metadata.namespace
  • spec.topology.variables[].value.cniRef (Calico Enterprise 애드온의 name과 namespace)
  • metadata.labels에 tigera.io/pull-secret: required 라벨을 추가해 해당 클러스터에 tigera-pull-secret이 자동 생성되도록 해요.
  • 노드 풀 구성(VM 클래스, 스토리지 클래스, 복제본 수)은 환경에 맞게 설정해요
kubectl apply -f ./cluster.yaml
apiVersion: cluster.x-k8s.io/v1beta2
kind: Cluster
metadata:
  name: <cluster-name>
  namespace: <cluster-namespace>
  labels:
    tigera.io/pull-secret: required
    <AddonInstallLabelKey>: <AddonInstallLabelValue>
spec:
  clusterNetwork:
    pods:
      cidrBlocks:
      - 100.96.0.0/11
    serviceDomain: cluster.local
    services:
      cidrBlocks:
      - 100.64.0.0/13
  topology:
    classRef:
      name: builtin-generic-v3.7.0
      namespace: vmware-system-vks-public
    controlPlane:
      metadata:
        annotations:
          run.tanzu.vmware.com/resolve-os-image: os-name=ubuntu,os-version=24.04
      replicas: 1
    variables:
    - name: node
      value:
        firewall:
          inboundRules:
            # BGP
            - protocol: tcp
              fromPort: 179
              toPort: 179
            # VXLAN
            - protocol: udp
              fromPort: 4789
              toPort: 4789
            # Typha
            - protocol: tcp
              fromPort: 5473
              toPort: 5473
            # Wireguard
            - protocol: udp
              fromPort: 51820
              toPort: 51820
            # Elasticsearch
            - protocol: tcp
              fromPort: 9200
              toPort: 9200
            # Elasticsearch transport
            - protocol: tcp
              fromPort: 9300
              toPort: 9300
            # Tigera Manager UI
            - protocol: tcp
              fromPort: 9443
              toPort: 9443
            # Prometheus
            - protocol: tcp
              fromPort: 9090
              toPort: 9090
            # Linseed
            - protocol: tcp
              fromPort: 8444
              toPort: 8444
    - name: bootstrapAddons
      value:
        cniRef:
          name: calico-enterprise
          namespace: vmware-system-vks-public
    - name: vmClass
      value: best-effort-xlarge
    - name: storageClass
      value: vsan-esa-default-policy-raid5
    - name: kubernetes
      value:
        certificateRotation:
          enabled: true
          renewalDaysBeforeExpiry: 90
    - name: vsphereOptions
      value:
        persistentVolumes:
          defaultStorageClass: vsan-esa-default-policy-raid5
    version: v1.35.0+vmware.2-vkr.4
    workers:
      machineDeployments:
      - class: node-pool
        metadata:
          annotations:
            run.tanzu.vmware.com/resolve-os-image: os-name=ubuntu,os-version=24.04
        name: node-pool-1
        replicas: 3
        variables:
          overrides:
          - name: vmClass
            value: best-effort-large
          - name: node
            value:
              firewall:
                inboundRules:
                  # BGP
                  - protocol: tcp
                    fromPort: 179
                    toPort: 179
                  # VXLAN
                  - protocol: udp
                    fromPort: 4789
                    toPort: 4789
                  # Typha
                  - protocol: tcp
                    fromPort: 5473
                    toPort: 5473
                  # Wireguard
                  - protocol: udp
                    fromPort: 51820
                    toPort: 51820
                  # Elasticsearch
                  - protocol: tcp
                    fromPort: 9200
                    toPort: 9200
                  # Elasticsearch transport
                  - protocol: tcp
                    fromPort: 9300
                    toPort: 9300
                  # Tigera Manager UI
                  - protocol: tcp
                    fromPort: 9443
                    toPort: 9443
                  # Prometheus
                  - protocol: tcp
                    fromPort: 9090
                    toPort: 9090
                  # Linseed
                  - protocol: tcp
                    fromPort: 8444
                    toPort: 8444

스텝 4: 게스트 클러스터 Kubeconfig 가져오기

Supervisor에서 복사할 수 있어요.

스텝 5: 핵심 컴포넌트 대기

calico와 apiserver가 Available로 보고될 때까지 Tigera 상태를 모니터링해요:

kubectl get tigerastatus

이 시점에는 모든 노드가 Ready 상태여야 해요.

스텝 6: Tigera 라이선스 적용

kubectl apply -f tigera-license.yaml

스텝 7: 설치 검증

남은 모든 컴포넌트가 available 상태가 될 때까지 기다려요:

kubectl get tigerastatus
kubectl get pods -A | grep -E 'tigera|calico'

tigerastatus의 모든 항목이 Available을 표시하면 설치가 완료된 거예요. 이제 워크로드를 배포해 네트워킹을 검증할 수 있어요.

Part 3: 에어갭 패키지 레지스트리

공개된 번들을 프라이빗 OCI 레지스트리로 옮겨야 한다면(예: 에어갭 설치), 다음 단계를 따르세요.

에어갭 이전 사전 요구사항

  • 로컬에서 imgpkg와 yq를 사용할 수 있어야 해요.
  • 소스 레지스트리(또는 그로부터 만든 tarball)와 프라이빗 레지스트리에 대한 네트워크 접근.
  • 프라이빗 레지스트리에 푸시할 자격 증명 (imgpkg가 프롬프트를 띄우거나 로컬 docker 설정을 사용해요).

스텝 1: Supervisor Service(SVS) 번들을 tarball로 복사 (소스 측)

소스 레지스트리에 접근할 수 있는 호스트에서 실행해요:

imgpkg copy --bundle <source-registry>/calico-enterprise-svs:v3.23.1  --to-tar calico-enterprise-svs.tar

SUCCESS: 레지스트리-레지스트리 직접 이전도 지원돼요. --to-tar <file>.tar를 --to-repo <private-registry>/<path>로 바꾸고 스텝 2를 건너뛰면 돼요.

스텝 2: SVS 번들을 프라이빗 레지스트리에 푸시 (대상 측)

imgpkg copy --tar calico-enterprise-svs.tar --to-repo <customer-registry>/calico-enterprise-svs

스텝 3: calico-enterprise-svs.yaml의 Package 리소스 패치

번들 외부의 유일한 레지스트리 참조는 calico-enterprise-svs.yaml 안 Package CR의 service-bundle 포인터예요. 이 참조를 프라이빗 레지스트리로 업데이트해야 해요:

yq eval '
  (select(.kind == "Package") | .spec.template.spec.fetch[0].imgpkgBundle.image)
    = "<private-registry>/calico-enterprise-svs:v3.23.1"
' -i calico-enterprise-svs.yaml

SUCCESS: 다이제스트 콘텐츠 핀(선택): imgpkg copy --to-repo는 마지막 줄에 이전된 번들의 대상 다이제스트를 출력해요. 위 yq 명령에서 :v3.23.1을 @sha256:<that-digest>로 대체하면 참조가 불변(immutable)이 돼요.

스텝 4: calico-enterprise-svs.yaml, 즉 Package와 PackageMetadata 리소스를 Supervisor에 업로드

동작하지 않는 것들

  • 개별 이미지에 대한 docker pull / docker push. 리태깅하면 매니페스트 다이제스트가 바뀔 수 있고, 번들의 images.yml 락 파일은 다시 쓰이지 않아요 — kapp-controller fetch가 manifest unknown으로 실패해요.
  • imgpkg copy 실행 중 SVS 번들을 복사하지 않는 것. 나머지 2개 번들은 svs 패키지가 끌어와요.

Part 4 (에어갭): Calico Enterprise 프라이빗 이미지를 프라이빗 레지스트리로 이전

Calico Enterprise 이미지를 프라이빗 레지스트리로 푸시 단계를 따라 Tigera 프라이빗 이미지 레지스트리에서 내려받은 Calico Enterprise 이미지를 여러분의 프라이빗 레지스트리에 넣으세요.

SECONDARY: 스텝 1, 2, 3, 4만, 즉 Linux용 docker pull, docker tag, docker push만 수행하면 돼요.

WARNING: Calico Enterprise 프라이빗 이미지를 퍼블릭 레지스트리에 푸시하지 마세요.

다음 단계

추천

추천 - 네트워킹

더 알아보기 (Learn more)

핵심은 "Supervisor 설정 1회 + 게스트 클러스터 배포"라는 2단계 구조예요. 에어갭이라면 SVS 번들 이전과 프라이빗 이미지 이전(Part 3, 4)이 추가돼요.