Linux x86_64 에서 ZooKeeper 데이터 저장소 생성하기
ZooKeeper 운영자를 설치하고 데이터 저장소를 설정하십시오.
시작하기 전에
외부 저장소에서 이미지를 가져오기 위해 온라인 및 오프라인 호스트를 준비했는지 확인하십시오. 또한 올바른 Helm 저장소가 추가되었는지 확인하십시오.
자세한 내용은 ‘데이터 스토어 설치 준비’를 참조하십시오.
ZooKeeper 배포용 운영체제 버전 및 이미지 태그
고정된 Helm 차트 또는 운영자 버전에는 다음 이미지가 필요합니다.
| 플랫폼 | 오퍼레이터 버전 | Helm 차트 버전 | 태그가 있는 이미지 |
|---|---|---|---|
| Linux® x86_64 | 0.2.15 | 1.0.0 | artifact-public.instana.io/self-hosted-images/3rd-party/operator/zookeeper: 0.2.15_v0.21.0 artifact-public.instana.io/self-hosted-images/3rd-party/datastore/zookeeper: 3.9.3_v0.21.0 artifact-public.instana.io/self-hosted-images/k8s/ kubectl : v1.35.2_v0.11.0 |
ZooKeeper 온라인 설치
ZooKeeper 데이터 저장소를 설치하려면 다음 단계를 완료하십시오.
instana-zookeeper네임스페이스를 작성하십시오.kubectl create namespace instana-zookeeperinstana-zookeeper네임스페이스에 대한 이미지 풀 시크릿을 작성하십시오. 사용자 고유의 다운로드 키를 사용하여<download_key>값을 업데이트하십시오.kubectl create secret docker-registry instana-registry --namespace instana-zookeeper \ --docker-username=_ \ --docker-password=<download_key> \ --docker-server=artifact-public.instana.ioZooKeeper 운영자를 설치하십시오.
helm install zookeeper-operator -n instana-zookeeper instana/zookeeper-operator --create-namespace --version=1.0.0 --set image.repository=artifact-public.instana.io/self-hosted-images/3rd-party/operator/zookeeper --set image.tag=0.2.15_v0.21.0 --set global.imagePullSecrets={"instana-registry"}ZooKeeper 인스턴스를 설치하려면
instana-clickhouse네임스페이스가 필요합니다.instana-clickhouse네임스페이스가 클러스터에 있는지 확인하십시오. 존재하지 않는 경우 지금 만들 수 있습니다.instana-clickhouse네임스페이스가 있는지 확인하십시오.kubectl get namespace | grep clickhouseinstana-clickhouse네임스페이스가 없는 경우 지금 작성하십시오.kubectl create namespace instana-clickhouse
instana-clickhouse네임스페이스에 대한 이미지 풀 시크릿을 작성하십시오. 시크릿을 작성하기 전에 < download_key>값을 에이전트 키로 업데이트하십시오.kubectl create secret docker-registry instana-registry \ --namespace=instana-clickhouse \ --docker-username=_ \ --docker-password=<download_key> \ --docker-server=artifact-public.instana.ioYAML 파일을 생성하고, 예를 들어
zookeeper.yaml다음과 같은 ZooKeeper 구성을 포함시킵니다:apiVersion: "zookeeper.pravega.io/v1beta1" kind: "ZookeeperCluster" metadata: name: "instana-zookeeper" spec: # For parameters and default values, see https://github.com/pravega/zookeeper-operator/tree/master/charts/zookeeper#configuration replicas: 3 image: repository: artifact-public.instana.io/self-hosted-images/3rd-party/datastore/zookeeper tag: 3.9.3_v0.15.0 pod: imagePullSecrets: [name: "instana-registry"] # Add the following Affinity snippet to schedule each pod on a different node. # affinity: # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: # matchExpressions: # - key: kind # operator: In # values: # - "ZookeeperMember" # topologyKey: kubernetes.io/hostname serviceAccountName: "zookeeper" # Add the following securityContext snippet for Kubernetes offerings other than OCP. # securityContext: # runAsUser: 1000 # fsGroup: 1000 config: tickTime: 2000 initLimit: 10 syncLimit: 5 maxClientCnxns: 0 autoPurgeSnapRetainCount: 20 autoPurgePurgeInterval: 1 persistence: reclaimPolicy: Delete spec: resources: requests: storage: "10Gi"ZooKeeper (온라인 및 오프라인)의 단계를 완료하십시오.
ZooKeeper 오프라인 설치
설치 준비시 외부 레지스트리에서 ZooKeeper 이미지를 아직 가져오지 않은 경우 지금 가져올 수 있습니다. bastion 호스트에서 다음 명령을 실행하십시오. 그런 다음, 해당 이미지를 에어갭 환경에 있는 Instana 호스트로 복사하십시오.
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/operator/zookeeper:0.2.15_v0.21.0
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/datastore/zookeeper:3.9.3_v0.21.0
docker pull artifact-public.instana.io/self-hosted-images/k8s/kubectl:v1.35.2_v0.11.0
Instana 호스트에서 다음 단계를 수행하십시오.
이미지를 내부 이미지 레지스트리에 다시 태그 지정하십시오.
docker tag artifact-public.instana.io/self-hosted-images/3rd-party/operator/zookeeper:0.2.15_v0.21.0 <internal-image-registry>/operator/zookeeper:0.2.15_v0.21.0 docker tag artifact-public.instana.io/self-hosted-images/3rd-party/datastore/zookeeper:3.9.3_v0.21.0 <internal-image-registry>/zookeeper:3.9.3_v0.21.0 docker tag artifact-public.instana.io/self-hosted-images/k8s/kubectl:v1.35.2_v0.11.0 <internal-image-registry>/self-hosted-images/k8s/kubectl:v1.35.2_v0.11.0배스천 호스트의 내부 이미지 레지스트리에 이미지를 푸시하십시오.
docker push <internal-image-registry>/operator/zookeeper:0.2.15_v0.21.0 docker push <internal-image-registry>/zookeeper:3.9.3_v0.21.0 docker push <internal-image-registry>/self-hosted-images/k8s/kubectl:v1.35.2_v0.11.0instana-zookeeper네임스페이스를 작성하십시오.kubectl create namespace instana-zookeeper선택 사항입니다: 내부 이미지 레지스트리에 인증이 필요한 경우 이미지 풀 시크릿을 생성합니다.
kubectl create secret docker-registry <secret_name> --namespace instana-zookeeper \ --docker-username=<registry_username> \ --docker-password=<registry_password> \ --docker-server=<internal-image-registry>:<internal-image-registry-port> \ --docker-email=<registry_email>ZooKeeper 운영자를 설치하십시오. 이전 단계에서 이미지 풀 시크릿을 만든 경우 다음 명령에
--set imagePullSecrets[0].name="<internal-image-registry-pull-secret>"을 추가합니다.helm install zookeeper-operator -n instana-zookeeper zookeeper-operator-1.0.0.tgz --version=1.0.0 --set image.repository=<internal-image-registry>/operator/zookeeper --set image.tag=0.2.15_v0.21.0 --set hooks.image.repository=<internal-image-registry>/self-hosted-images/k8s/kubectl --set hooks.image.tag=v1.35.2_v0.11.0ZooKeeper 인스턴스를 설치하려면
instana-clickhouse네임스페이스가 필요합니다.instana-clickhouse네임스페이스가 클러스터에 있는지 확인하십시오. 존재하지 않는 경우 지금 만들 수 있습니다.instana-clickhouse네임스페이스가 있는지 확인하십시오.kubectl get namespace | grep clickhouseinstana-clickhouse네임스페이스가 없는 경우 지금 작성하십시오.kubectl create namespace instana-clickhouse
YAML 파일을 생성하고, 예를 들어
zookeeper.yaml다음과 같은 ZooKeeper 구성을 포함시킵니다:apiVersion: "zookeeper.pravega.io/v1beta1" kind: "ZookeeperCluster" metadata: name: "instana-zookeeper" spec: # For parameters and default values, see https://github.com/pravega/zookeeper-operator/tree/master/charts/zookeeper#configuration replicas: 3 image: repository: <internal-image-registry>/zookeeper tag: 3.9.3_v0.16.0 pod: imagePullSecrets: [name: "<internal-registry-secret>"] # Add the following Affinity snippet to schedule each pod on a different node. # affinity: # podAntiAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # - labelSelector: # matchExpressions: # - key: kind # operator: In # values: # - "ZookeeperMember" # topologyKey: kubernetes.io/hostname serviceAccountName: "zookeeper" # Add the following securityContext snippet for Kubernetes offerings other than OCP. # securityContext: # runAsUser: 1000 # fsGroup: 1000 config: tickTime: 2000 initLimit: 10 syncLimit: 5 maxClientCnxns: 0 autoPurgeSnapRetainCount: 20 autoPurgePurgeInterval: 1 persistence: reclaimPolicy: Delete spec: resources: requests: storage: "10Gi"ZooKeeper (온라인 및 오프라인)의 단계를 완료하십시오.
ZooKeeper 배포 및 검증 (온라인 및 오프라인)
ZooKeeper 인스턴스를 배치하고 데이터 저장소를 작성하려면 다음 단계를 완료하십시오.
ZooKeeper를 배치하십시오.
kubectl apply -f zookeeper.yaml -n instana-clickhouseClickHouse 는 전용 ZooKeeper 클러스터가 필요하므로 ZooKeeper 가
instana-clickhouse네임스페이스에 설치됩니다.ZooKeeper 운영자 팟 (Pod) 이 실행 중인지 확인하십시오.
kubectl get pods -n instana-zookeeper샘플 출력:
NAME READY STATUS RESTARTS AGE instana-zookeeper-operator-7fccd8fd77-9lww5 1/1 Running 0 74sZooKeeper 가 작동 중인지 확인하십시오.
kubectl get all -n instana-clickhouse다음 샘플 출력을 참조하십시오.
NAME READY STATUS RESTARTS AGE pod/instana-zookeeper-0 1/1 Running 0 119s pod/instana-zookeeper-1 1/1 Running 0 82s pod/instana-zookeeper-2 1/1 Running 0 47s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/instana-zookeeper-admin-server ClusterIP 192.168.1.126 <none> 8080/TCP 2m service/instana-zookeeper-client ClusterIP 192.168.1.13 <none> 2181/TCP 2m service/instana-zookeeper-headless ClusterIP None <none> 2181/TCP,2888/TCP,3888/TCP,7000/TCP,8080/TCP 2m NAME READY AGE statefulset.apps/instana-zookeeper 3/3 2m3s