在K8S中安装 hadoop + HBase

0
(0)

找到Helm:
https://artifacthub.io/packages/helm/hbase/hbase

添加仓库

helm repo add hbase https://itboy87.github.io/bigdata-charts/

安装一系列hbase的组件

helm install my-hbase hbase/hbase --version 0.1.7

注意修改storageClass的名称为集群中的时机名称,本地使用的叫做 nfs-storageclass

贴一下完整的helm的配置:

antiAffinity: soft
conf:
  hadoopUserName: root
  hbaseSite: {}
hadoop:
  antiAffinity: soft
  enabled: true
  global: {}
  hadoopVersion: 3.3.3
  hdfs:
    dataNode:
      pdbMinAvailable: 1
      replicas: 3
      resources:
        limits:
          cpu: 1000m
          memory: 2048Mi
        requests:
          cpu: 10m
          memory: 256Mi
    nameNode:
      pdbMinAvailable: 1
      resources:
        limits:
          cpu: 1000m
          memory: 2048Mi
        requests:
          cpu: 10m
          memory: 256Mi
    webhdfs:
      enabled: true
  image:
    pullPolicy: IfNotPresent
    repository: ghcr.io/fleeksoft/hbase/hdfs
    tag: 3.3.3.2
  logLevel: INFO
  persistence:
    dataNode:
      accessMode: ReadWriteOnce
      enabled: true
      size: 50Gi
      storageClass: nfs-storageclass
    nameNode:
      accessMode: ReadWriteOnce
      enabled: true
      size: 30Gi
      storageClass: nfs-storageclass
  yarn:
    nodeManager:
      parallelCreate: false
      pdbMinAvailable: 1
      replicas: 1
      resources:
        limits:
          cpu: 1000m
          memory: 2048Mi
        requests:
          cpu: 1000m
          memory: 2048Mi
    resourceManager:
      pdbMinAvailable: 1
      resources:
        limits:
          cpu: 2000m
          memory: 2048Mi
        requests:
          cpu: 10m
          memory: 256Mi
hbase:
  master:
    replicas: 2
    resources:
      limits:
        cpu: 1000m
        memory: 2048Mi
      requests:
        cpu: 10m
        memory: 256Mi
  regionServer:
    replicas: 2
    resources:
      limits:
        cpu: 1000m
        memory: 2048Mi
      requests:
        cpu: 10m
        memory: 256Mi
hbaseVersion: 2.4.13
image:
  pullPolicy: IfNotPresent
  repository: ghcr.io/fleeksoft/hbase/hbase-base
  tag: 2.4.13.2
prometheus:
  config:
    lowercaseOutputLabelNames: true
    lowercaseOutputName: true
    rules:
    - labels:
        namespace: $1
        region: $3
        table: $2
      name: HBase_metric_$4
      pattern: Hadoop<service=HBase, name=RegionServer, sub=Regions><>Namespace_([^\W_]+)_table_([^\W_]+)_region_([^\W_]+)_metric_(\w+)
    - labels:
        name: $2
        sub: $3
      name: hadoop_$1_$4
      pattern: Hadoop<service=(\w+), name=(\w+), sub=(\w+)><>([\w._]+)
    - pattern: .+
  enabled: true
  image: spdigital/prometheus-jmx-exporter-kubernetes
  imageTag: 0.3.1
  port: 9709
  resources: {}
  thriftPort: 5557
zookeeper:
  affinity: {}
  args: []
  auth:
    client:
      clientPassword: ""
      clientUser: ""
      enabled: false
      existingSecret: ""
      serverPasswords: ""
      serverUsers: ""
    quorum:
      enabled: false
      existingSecret: ""
      learnerPassword: ""
      learnerUser: ""
      serverPasswords: ""
      serverUsers: ""
  autopurge:
    purgeInterval: 0
    snapRetainCount: 3
  clusterDomain: cluster.local
  command:
  - /scripts/setup.sh
  common:
    exampleValue: common-chart
    global:
      imagePullSecrets: []
      imageRegistry: ""
      storageClass: ""
  commonAnnotations: {}
  commonLabels: {}
  configuration: ""
  containerPorts:
    client: 2181
    election: 3888
    follower: 2888
    tls: 3181
  containerSecurityContext:
    enabled: true
    runAsNonRoot: true
    runAsUser: 1001
  customLivenessProbe: {}
  customReadinessProbe: {}
  customStartupProbe: {}
  dataLogDir: ""
  diagnosticMode:
    args:
    - infinity
    command:
    - sleep
    enabled: false
  enabled: true
  existingConfigmap: ""
  extraDeploy: []
  extraEnvVars: []
  extraEnvVarsCM: ""
  extraEnvVarsSecret: ""
  extraVolumeMounts: []
  extraVolumes: []
  fourlwCommandsWhitelist: srvr, mntr, ruok
  fullnameOverride: ""
  global:
    imagePullSecrets: []
    imageRegistry: ""
    storageClass: ""
  heapSize: 1024
  hostAliases: []
  image:
    debug: false
    pullPolicy: IfNotPresent
    pullSecrets: []
    registry: docker.io
    repository: bitnami/zookeeper
    tag: 3.8.0-debian-11-r11
  initContainers: []
  initLimit: 10
  jvmFlags: ""
  kubeVersion: ""
  lifecycleHooks: {}
  listenOnAllIPs: false
  livenessProbe:
    enabled: true
    failureThreshold: 6
    initialDelaySeconds: 30
    periodSeconds: 10
    probeCommandTimeout: 2
    successThreshold: 1
    timeoutSeconds: 5
  logLevel: ERROR
  maxClientCnxns: 1000
  maxSessionTimeout: 40000
  metrics:
    containerPort: 9141
    enabled: false
    prometheusRule:
      additionalLabels: {}
      enabled: false
      namespace: ""
      rules: []
    service:
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: '{{ .Values.metrics.service.port }}'
        prometheus.io/scrape: "true"
      port: 9141
      type: ClusterIP
    serviceMonitor:
      additionalLabels: {}
      enabled: false
      honorLabels: false
      interval: ""
      jobLabel: ""
      metricRelabelings: []
      namespace: ""
      relabelings: []
      scrapeTimeout: ""
      selector: {}
  minServerId: 1
  nameOverride: ""
  namespaceOverride: ""
  networkPolicy:
    allowExternal: true
    enabled: false
  nodeAffinityPreset:
    key: ""
    type: ""
    values: []
  nodeSelector: {}
  pdb:
    create: false
    maxUnavailable: 1
    minAvailable: ""
  persistence:
    accessModes:
    - ReadWriteOnce
    annotations: {}
    dataLogDir:
      existingClaim: ""
      selector: {}
      size: 8Gi
    enabled: false
    existingClaim: ""
    selector: {}
    size: 8Gi
    storageClass: ""
  podAffinityPreset: ""
  podAnnotations: {}
  podAntiAffinityPreset: soft
  podLabels: {}
  podManagementPolicy: Parallel
  podSecurityContext:
    enabled: true
    fsGroup: 1001
  preAllocSize: 65536
  priorityClassName: ""
  readinessProbe:
    enabled: true
    failureThreshold: 6
    initialDelaySeconds: 5
    periodSeconds: 10
    probeCommandTimeout: 2
    successThreshold: 1
    timeoutSeconds: 5
  replicaCount: 3
  resources:
    limits: {}
    requests:
      cpu: 250m
      memory: 256Mi
  schedulerName: ""
  service:
    annotations: {}
    clusterIP: ""
    disableBaseClientPort: false
    externalTrafficPolicy: Cluster
    extraPorts: []
    headless:
      annotations: {}
      publishNotReadyAddresses: true
    loadBalancerIP: ""
    loadBalancerSourceRanges: []
    nodePorts:
      client: ""
      tls: ""
    ports:
      client: 2181
      election: 3888
      follower: 2888
      tls: 3181
    sessionAffinity: None
    sessionAffinityConfig: {}
    type: ClusterIP
  serviceAccount:
    annotations: {}
    automountServiceAccountToken: true
    create: false
    name: ""
  sidecars: []
  snapCount: 100000
  startupProbe:
    enabled: false
    failureThreshold: 15
    initialDelaySeconds: 30
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 1
  syncLimit: 5
  tickTime: 2000
  tls:
    client:
      auth: none
      autoGenerated: false
      enabled: false
      existingSecret: ""
      existingSecretKeystoreKey: ""
      existingSecretTruststoreKey: ""
      keystorePassword: ""
      keystorePath: /opt/bitnami/zookeeper/config/certs/client/zookeeper.keystore.jks
      passwordsSecretKeystoreKey: ""
      passwordsSecretName: ""
      passwordsSecretTruststoreKey: ""
      truststorePassword: ""
      truststorePath: /opt/bitnami/zookeeper/config/certs/client/zookeeper.truststore.jks
    quorum:
      auth: none
      autoGenerated: false
      enabled: false
      existingSecret: ""
      existingSecretKeystoreKey: ""
      existingSecretTruststoreKey: ""
      keystorePassword: ""
      keystorePath: /opt/bitnami/zookeeper/config/certs/quorum/zookeeper.keystore.jks
      passwordsSecretKeystoreKey: ""
      passwordsSecretName: ""
      passwordsSecretTruststoreKey: ""
      truststorePassword: ""
      truststorePath: /opt/bitnami/zookeeper/config/certs/quorum/zookeeper.truststore.jks
    resources:
      limits: {}
      requests: {}
  tolerations: []
  topologySpreadConstraints: []
  updateStrategy:
    rollingUpdate: {}
    type: RollingUpdate
  volumePermissions:
    containerSecurityContext:
      runAsUser: 0
    enabled: false
    image:
      pullPolicy: IfNotPresent
      pullSecrets: []
      registry: docker.io
      repository: bitnami/bitnami-shell
      tag: 11-debian-11-r10
    resources:
      limits: {}
      requests: {}

这篇文章有用吗?

平均评分 0 / 5. 投票数: 0

到目前为止还没有投票!成为第一位评论此文章。

很抱歉,这篇文章对您没有用!

让我们改善这篇文章!

告诉我们我们如何改善这篇文章?


了解 工作生活心情记忆 的更多信息

订阅后即可通过电子邮件收到最新文章。