Logo
  • 「StarRocks Summit 2025 - YouTube」
  • Wiki

Search

StarRocks Versions

StarRocks Quick Start

StarRocks HOL

StarRocks Community

StarRocks Sessions

StarRocks External Knowledges

StarRocks Study

StarRocks K8S 배포 및 설치(CN or BE) - QuickStart Base
StarRocks K8S 배포 및 설치(CN or BE) - QuickStart Base

StarRocks K8S 배포 및 설치(CN or BE) - QuickStart Base

카테고리
Deploymentk8s
생성자
U
Untitled
  • 준비사항
  • 필요환경
  • Vanila K8s 준비사항(Storage Class)
  • Vanila K8s 준비사항(Load Balencer)
  • FE & CN 배포
  • FE & BE 배포
  • 배포확인 및 접속
  • 참고자료
  • Vanila yaml 파일
  • 설정값에 대한 설명

준비사항

해당 문서는 StarRocks QuickStart(StarRocks with Helm | StarRocks)를 토대로 하여 추가 및 첨삭한 자료입니다.

(+) 문서의 작성환경은 On-Prem K8s 환경 기준입니다.

필요환경

  • Kubernetes environment
    • 쿠버네티스가 설치되어있는 환경이 필요합니다(EKS 등)
    • 문서에서는 바닐라 쿠베환경 기준으로 진행합니다.
  • Helm
    • K8s 환경에서 쉽게 배포하기 위해서 helm 차트를 통해서 배포합니다.
  • SQL client
    • MySQL Client가 설치되어있어서 해당 환경에서 mysql CLI 가 가능해야 합니다.
  • curl
    • 데이터 로딩 및 테스트를 위해 필요합니다.

Vanila K8s 준비사항(Storage Class)

이는 문서 작성의 환경인 On-Prem K8s 기준으로 작성한 내용으로 모든 K8s환경에 합리적이지 않을 수 있습니다.

local-path로 StorageClass 만들기

Vanila K8s 준비사항(Load Balencer)

이는 문서 작성의 환경인 On-Prem K8s 기준으로 작성한 내용으로 모든 K8s환경에 합리적이지 않을 수 있습니다.

Installation :: MetalLB, bare metal load-balancer for Kubernetes 해당 링크를 참고해서 MetalLB를 설치합니다.

FE & CN 배포

FE & BE 배포

배포확인 및 접속

해당 컨테이너는 LB 타입으로 생성되기 떄문에 서비스 목록의 “kube-starrocks-fe-service" 류의 네이밍을 가진 External IP 혹은 LB 주소 또는 ClusterIP를 터널링해서 접근하면됩니다

image
  • 터널링을 통한 접근 예시(DBeaver - StarRocks를 지원합니다)
  • image
    image
  • StarRocks 가 없는 툴이라도 MySQL 타입으로 연동하면 연결이 가능합니다(이는 BI툴중에서도 이를 이용하시면 됩니다.)
  • image

참고자료

Vanila yaml 파일

설정값에 대한 설명

기본 설정

  • operator.global.rbac.create: RBAC 리소스 생성 여부 설정
  • operator.timeZone: 컨테이너의 시간대 설정 (기본값: Asia/Shanghai)
  • operator.starrocksOperator.enabled: 오퍼레이터 관련 리소스 생성 여부
  • operator.starrocksOperator.watchNamespace: 오퍼레이터가 감시할 네임스페이스 제한 (기본값: 모든 네임스페이스)

비밀번호 설정

  • starrocks.initPassword.enabled: 초기 비밀번호 설정 활성화
  • starrocks.initPassword.password: 초기 비밀번호 값
  • starrocks.initPassword.passwordSecret: 비밀번호가 포함된 시크릿 이름

클러스터 구성

  • starrocks.starrocksCluster.enabledBe: BE 컴포넌트 활성화 여부
  • starrocks.starrocksCluster.enabledCn: CN 컴포넌트 활성화 여부

컴포넌트 공통 설정

  • starrocks.starrocksCluster.componentValues.image.tag: 모든 컴포넌트의 이미지 태그
  • starrocks.starrocksCluster.componentValues.runAsNonRoot: Non-Root 사용자로 실행 여부
  • starrocks.starrocksCluster.componentValues.serviceAccount: 클라우드 서비스 접근을 위한 서비스 계정
  • starrocks.starrocksCluster.componentValues.imagePullSecrets: 이미지 가져오기 위한 시크릿

FE(Frontend) 설정

  • starrocks.starrocksFESpec.replicas: FE 복제본 수
  • starrocks.starrocksFESpec.resources: FE 리소스 요청/제한 설정
  • resources:
      requests:
        cpu: 4
        memory: 4Gi
      limits:
        cpu: 8
        memory: 8Gi
  • starrocks.starrocksFESpec.storageSpec: FE 스토리지 설정
  • 
    storageSpec:
      name: "fe"# 볼륨 이름 접두사
      storageClassName: ""# 사용할 스토리지 클래스
      storageSize: 10Gi# 데이터 볼륨 크기
      logStorageSize: 5Gi# 로그 볼륨 크기
  • starrocks.starrocksFESpec.config: FE 설정 내용
  • starrocks.starrocksFESpec.terminationGracePeriodSeconds: 정상 종료를 위한 대기 시간(초)

BE(Backend) 설정

  • starrocks.starrocksBeSpec.replicas: BE 복제본 수
  • starrocks.starrocksBeSpec.resources: BE 리소스 요청/제한 설정
  • starrocks.starrocksBeSpec.storageSpec: BE 스토리지 설정
  • storageSpec:
      name: "be"# 볼륨 이름 접두사
      storageClassName: ""# 사용할 스토리지 클래스
      storageSize: 1Ti# 데이터 볼륨 크기
      storageCount: 1# 데이터 볼륨 수
      logStorageSize: 20Gi# 로그 볼륨 크기
      spillStorageSize: 0Gi# 스필 스토리지 크기
  • starrocks.starrocksBeSpec.config: BE 설정 내용

CN(Compute Node) 설정

  • starrocks.starrocksCnSpec.replicas: CN 복제본 수
  • starrocks.starrocksCnSpec.autoScalingPolicy: 자동 스케일링 정책
  • ScalingPolicy:
      version: v2beta2
      maxReplicas: 10
      minReplicas: 1
      hpaPolicy:
        metrics:
          - type: Resource
            resource:
              name: cpu
              target:
                averageUtilization: 30
                type: Utilization
  • starrocks.starrocksCnSpec.resources: CN 리소스 요청/제한 설정
  • starrocks.starrocksCnSpec.storageSpec: CN 스토리지 설정

FE Proxy 설정

  • starrocks.starrocksFeProxySpec.enabled: FE Proxy 활성화 여부
  • starrocks.starrocksFeProxySpec.replicas: FE Proxy 복제본 수
  • starrocks.starrocksFeProxySpec.service.type: 서비스 유형 (ClusterIP, NodePort, LoadBalancer)

추가 리소스

  • starrocks.secrets: 추가 시크릿 정의
  • secrets:
      - name: my-secret
        data:
          key: "시크릿 내용"
최종 업데이트 시간
Aug 24, 2025 10:20 PM
Version
3.3
작성자
김병주
Please contact on SNS or mall(bj.kim@cshift.co)

ⓒ 2025. Edward Kim All rights reserved.

LinkedInFacebook
starrocks:
    nameOverride: "kube-starrocks"
    timeZone: Asia/Seoul
    initPassword:
        enabled: true
        # Set a password secret, for example:
        # kubectl create secret generic starrocks-root-pass --from-literal=password='g()()dpa$$word'
        passwordSecret: starrocks-root-pass

    starrocksCluster:
        enabledBe: false
        enabledCn: true

    starrocksFESpec:
        config: |
            run_mode = shared_data
            cloud_native_meta_port = 6090
            cloud_native_storage_type = S3

            # For example, testbucket/subpath
            aws_s3_path = starrocks-demo-cshift/data

            # For example, us-west-2
            aws_s3_region = ap-northeast-2

            # credentials for S3 object read/write
            aws_s3_access_key = <access_key>
            aws_s3_secret_key = <secret_key>

            # Set this to false if you do not want default
            # storage created in the object storage using
            # the details provided above 
            enable_load_volume_from_conf = true
            
        replicas: 3
        service:
            type: LoadBalancer
        resources:
            requests:
                cpu: 1
                memory: 2Gi
            limits:
                cpu: 1
                memory: 2Gi
        storageSpec:
            name: fe

    starrocksCnSpec:
        replicas: 3
        image:
            repository: starrocks/cn-ubuntu
        resources:
            requests:
                cpu: 1
                memory: 4Gi
            limits:
                cpu: 1
                memory: 4Gi
        storageSpec:
            name: cn
            storageSize: 15Gi

    starrocksFeProxySpec:
        enabled: true
        service:
            type: LoadBalancer
starrocks:
		timeZone: Asia/Seoul
    initPassword:
        enabled: true
        # Set a password secret, for example:
        # kubectl create secret generic starrocks-root-pass --from-literal=password='g()()dpa$$word'
        passwordSecret: starrocks-root-pass
    
    #default 값은 BE배포로 되어있습니다.
    starrocksCluster:
        enabledBe: true
        enabledCn: false
        
    starrocksFESpec:
        replicas: 3
        service:
            type: LoadBalancer
        resources:
            requests:
                cpu: 1
                memory: 2Gi
        storageSpec:
            name: fe

    starrocksBeSpec:
        replicas: 3
        resources:
            requests:
                cpu: 1
                memory: 4Gi
        storageSpec:
            name: be
            storageSize: 15Gi

    starrocksFeProxySpec:
        enabled: true
        service:
            type: LoadBalancer
operator:
  global:
    rbac:
      create: true
      serviceAccount:
        name: "starrocks"
        annotations: {}
        labels: {}
  
  timeZone: Asia/Shanghai
  
  nameOverride: "kube-starrocks"
  
  starrocksOperator:
    enabled: true
    annotations: {}
    namespaceOverride: ""
    image:
      repository: starrocks/operator
      tag: v1.10.1
    imagePullPolicy: Always
    replicaCount: 1
    resources:
      limits:
        cpu: 500m
        memory: 800Mi
      requests:
        cpu: 500m
        memory: 400Mi
    securityContext:
      runAsNonRoot: true
      allowPrivilegeEscalation: false
      readOnlyRootFilesystem: true
    imagePullSecrets: []
    nodeSelector: {}
    affinity: {}
    tolerations: []
    watchNamespace: ""
    env: []
    log:
      - --zap-time-encoding=iso8601
      - --zap-encoder=console
    dnsDomainSuffix: ""
    volumeNameWithHash: true
  

starrocks:
  nameOverride: "kube-starrocks"
  
  initPassword:
    enabled: false
    isInstall: true
    password: ""
    passwordSecret: ""
    image: ""
    annotations: {}
    resources: {}
  
  timeZone: Asia/Shanghai
  
  datadog:
    log:
      enabled: false
      logConfig: '{}'
    metrics:
      enabled: false
    profiling:
      fe: false
      be: false
      cn: false
      env: "starrocks-default"
      configMode: "service"
  
  metrics:
    serviceMonitor:
      enabled: false
      labels: {}
      interval: 15s
  
  starrocksCluster:
    name: ""
    namespace: ""
    annotations: {}
    enabledBe: true
    enabledCn: false
    disasterRecovery:
    componentValues:
      image:
        tag: "3.3-latest"
      hostAliases: []
      runAsNonRoot: false
      schedulerName: ""
      serviceAccount: ""
      imagePullSecrets: []
      tolerations: []
      topologySpreadConstraints: []
      nodeSelector: {}
      affinity: {}
      podLabels: {}
  
  starrocksFESpec:
    replicas: 1
    image:
      repository: starrocks/fe-ubuntu
      tag: ""
    imagePullPolicy: IfNotPresent
    entrypoint: {}
    annotations: {}
    runAsNonRoot: false
    readOnlyRootFilesystem: false
    capabilities: {}
    service:
      type: "ClusterIP"
      loadbalancerIP: ""
      annotations: {}
      labels: {}
      ports: []
      loadBalancerSourceRanges: []
    imagePullSecrets: []
    serviceAccount: ""
    nodeSelector: {}
    podLabels: {}
    hostAliases: []
    schedulerName: ""
    affinity: {}
    tolerations: []
    topologySpreadConstraints: []
    resources:
      requests:
        cpu: 4
        memory: 4Gi
      limits:
        cpu: 8
        memory: 8Gi
    storageSpec:
      name: ""
      storageClassName: ""
      storageSize: 10Gi
      storageMountPath: ""
      logStorageClassName: ""
      logStorageSize: 5Gi
      logMountPath: ""
    emptyDirs: []
    hostPaths: []
    config: |
      LOG_DIR = ${STARROCKS_HOME}/log
      DATE = "$(date +%Y%m%d-%H%M%S)"
      JAVA_OPTS="-Dlog4j2.formatMsgNoLookups=true -Xmx8192m -XX:+UseG1GC -Xlog:gc*:${LOG_DIR}/fe.gc.log.$DATE:time"
      http_port = 8030
      rpc_port = 9020
      query_port = 9030
      edit_log_port = 9010
      mysql_service_nio_enabled = true
      sys_log_level = INFO

      run_mode = shared_data
      cloud_native_meta_port = 6090
      cloud_native_storage_type = S3

      aws_s3_path = starrocks-demo-cshift/data

      aws_s3_region = ap-northeast-2

      aws_s3_access_key = AKIA5IJOXIAJWZMD5G5Y
      aws_s3_secret_key = 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

      enable_load_volume_from_conf = true
      
    configyaml: {}
    secrets: []
    configMaps: []
    terminationGracePeriodSeconds: 120
    startupProbeFailureSeconds:
    livenessProbeFailureSeconds:
    readinessProbeFailureSeconds:
    lifecycle: {}
    sidecars: []
    sidecarsMap: {}
    initContainers: []
    maxUnavailablePods:
    shareProcessNamespace:
  
  starrocksCnSpec:
    image:
      repository: starrocks/cn-ubuntu
      tag: ""
    imagePullPolicy: IfNotPresent
    entrypoint: {}
    serviceAccount: ""
    annotations: {}
    runAsNonRoot: false
    readOnlyRootFilesystem: false
    capabilities: {}
    service:
      type: "ClusterIP"
      loadbalancerIP: ""
      annotations: {}
      labels: {}
      ports: []
      loadBalancerSourceRanges: []
    imagePullSecrets: []
    nodeSelector: {}
    podLabels: {}
    hostAliases: []
    schedulerName: ""
    affinity: {}
    tolerations: []
    topologySpreadConstraints: []
    autoScalingPolicy: {}
    resources:
      requests:
        cpu: 4
        memory: 8Gi
      limits:
        cpu: 8
        memory: 8Gi
    storageSpec:
      name: ""
      storageClassName: ""
      storageSize: 1Ti
      storageCount: 1
      storageMountPath: ""
      logStorageClassName: ""
      logStorageSize: 20Gi
      logMountPath: ""
      spillStorageClassName: ""
      spillStorageSize: 0Gi
      spillMountPath: ""
    emptyDirs: []
    hostPaths: []
    config: |
      sys_log_level = INFO
      thrift_port = 9060
      webserver_port = 8040
      heartbeat_service_port = 9050
      brpc_port = 8060
    configyaml: {}
    secrets: []
    configMaps: []
    terminationGracePeriodSeconds: 120
    startupProbeFailureSeconds:
    livenessProbeFailureSeconds:
    readinessProbeFailureSeconds:
    lifecycle: {}
    sidecars: []
    sidecarsMap: {}
    initContainers: []
    maxUnavailablePods:
    shareProcessNamespace:
  
  starrocksBeSpec:
    replicas: 1
    image:
      repository: starrocks/be-ubuntu
      tag: ""
    imagePullPolicy: IfNotPresent
    entrypoint: {}
    serviceAccount: ""
    annotations: {}
    runAsNonRoot: false
    readOnlyRootFilesystem: false
    capabilities: {}
    service:
      type: "ClusterIP"
      loadbalancerIP: ""
      annotations: {}
      labels: {}
      ports: []
      loadBalancerSourceRanges: []
    imagePullSecrets: []
    nodeSelector: {}
    podLabels: {}
    hostAliases: []
    schedulerName: ""
    affinity: {}
    tolerations: []
    topologySpreadConstraints: []
    resources:
      requests:
        cpu: 4
        memory: 4Gi
      limits:
        cpu: 8
        memory: 8Gi
    storageSpec:
      name: ""
      storageClassName: ""
      storageSize: 1Ti
      storageCount: 1
      storageMountPath: ""
      logStorageClassName: ""
      logStorageSize: 20Gi
      logMountPath: ""
      spillStorageClassName: ""
      spillStorageSize: 0Gi
      spillMountPath: ""
    emptyDirs: []
    hostPaths: []
    config: |
      be_port = 9060
      webserver_port = 8040
      heartbeat_service_port = 9050
      brpc_port = 8060
      sys_log_level = INFO
      default_rowset_type = beta
    configyaml: {}
    secrets: []
    configMaps: []
    terminationGracePeriodSeconds: 120
    startupProbeFailureSeconds:
    livenessProbeFailureSeconds:
    readinessProbeFailureSeconds:
    lifecycle: {}
    sidecars: []
    sidecarsMap: {}
    initContainers: []
    maxUnavailablePods:
    shareProcessNamespace:
  
  secrets: []
  
  configMaps: []
  
  resources: []
  
  starrocksFeProxySpec:
    enabled: false
    replicas: 1
    imagePullPolicy: IfNotPresent
    image:
      repository: ""
      tag: ""
    resources:
      requests:
        cpu: 1
        memory: 2Gi
      limits:
        cpu: 1
        memory: 2Gi
    resolver: ""
    service:
      type: ClusterIP
      loadbalancerIP: ""
      annotations: {}
      labels: {}
      ports: []
      loadBalancerSourceRanges: []
    imagePullSecrets: []
    nodeSelector: {}
    affinity: {}
    tolerations: []
    livenessProbeFailureSeconds:
    readinessProbeFailureSeconds:
    emptyDirs: []