首页 > 其他分享 >clickhouse高可用k8s集群搭建

clickhouse高可用k8s集群搭建

时间:2022-09-26 19:11:16浏览次数:88  
标签:image yourself cluster 集群 https helm k8s clickhouse

前提条件

安装一个k8s集群
安装helm工具

1,安装operator

helm repo add ck https://radondb.github.io/radondb-clickhouse-kubernetes/
helm repo update
kubectl create namespace database-clickhouse
helm install clickhouse-operator -n database-clickhouse ck/clickhouse-operator

2,配置clickhouse

values.yaml

# Configuration for the ClickHouse cluster to be started
clickhouse:
  # default cluster name
  clusterName: all-nodes
  # shards count can not scale in this value.
  shardscount: 1
  # replicas count can not modify this value when the cluster has already created.
  replicascount: 2

  # ClickHouse server image configuration
  image: radondb/clickhouse-server:21.1.3.32
  imagePullPolicy: IfNotPresent

  resources:
    memory: "1Gi"
    cpu: "0.5"
    storage: "10Gi"

  # User Configuration
  user:
    - username: clickhouse
      password: c1ickh0use0perator
      networks:
        - "127.0.0.1"
        - "::/0"

  ports:
    # Port for the native interface, see https://clickhouse.tech/docs/en/interfaces/tcp/
    tcp: 9000

    # Port for HTTP/REST interface, see https://clickhouse.tech/docs/en/interfaces/http/
    http: 8123

  # servicee, value: ClusterIP/NodePort/LoadBalancer
  # see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
  svc:
    type: ClusterIP
    # If type: LoadBalancer, can use https://docs.qingcloud.com/product/container/qke/index#%E4%B8%8E-qingcloud-iaas-%E7%9A%84%E6%95%B4%E5%90%88
    qceip:

# Configuration for the busybox container
busybox:
  image: busybox
  imagePullPolicy: IfNotPresent

# required, zookeeper configuration
zookeeper:
  # If you want to create ZooKeeper cluster by operator, use the following configuration
  install: true
  replicas: 3
  port: 2181
  image: radondb/zookeeper:3.6.1
  imagePullPolicy: IfNotPresent

  # If you don’t want Operator to create a ZooKeeper cluster, we also provide a ZooKeeper deployment file,
  # you can customize the following configuration.
  # install: false
  # replicas: specify by yourself
  # image: radondb/zookeeper:3.6.2
  # imagePullPolicy: specify by yourself
  # resources:
  #   memory: specify by yourself
  #   cpu: specify by yourself
  #   storage: specify by yourself

3,部署clickhouse

helm install clickhouse-cluster ck/clickhouse-cluster -n database-clickhouse\
  -f values.yaml

备注:其中values.yaml为步骤2中的配置项

参考链接:

  1. 在 Kubernetes 上部署 RadonDB ClickHouse
  2. k8s集群搭建clickhouse集群

标签:image,yourself,cluster,集群,https,helm,k8s,clickhouse
From: https://www.cnblogs.com/Mufasa/p/16732042.html

相关文章

  • clickhouse集群跨节点查询其他节点系统表信息
     clickhouse集群跨节点查询其他节点系统表信息 方法1(推荐)创建视图如下:CREATEVIEWdefault.gv$partsonclusterceb_clusterASSELECTFQDN()host,*F......
  • K8S入门详细地教程
    Kubernetes详细教程1.Kubernetes介绍1.1应用部署方式演变在部署应用程序的方式上,主要经历了三个时代:传统部署:互联网早期,会直接将应用程序部署在物理机上优点:简单......
  • 安装rocketmq DLedger 高可用集群
    前言在RocketMQ4.5之前,RocketMQ都是采用master-slave主从架构部署,如下图,master节点负责写入消息,slave节点负责同步master节点消息。假设master-1节点有个topic-A,假设此......
  • Hadoop集群的webUI监控界面设置Simple安全机制
    问题:​ hive集群配置完成,web监控界面的8808和8042和10002端口不需用户验证即可访问,对生产环境是不容许的,需要加上安全机制。方案:1.修改hadop配置1.修改core-site.xml,......
  • Redis 主从哨兵集群选型
    主从复制模仿Mysql实现的高可用,数据备份,读操作的负载均衡,提升一定的qps,但缺点就是不能自动恢复,且只有主节点可写,限制了写能力,并且单机存储有限制。哨兵哨兵机器就是单......
  • 云服务器安装k3s集群
    本文依托于上文wireguard组网后的安装过程。请先参考上文组网成功。WireGuard多云组网教程:https://www.cnblogs.com/sstu/p/16729281.html一、master节点安装curl-sfL......
  • k8s将dockershim移除之后,如何继续使用docker?
    说说这个前提,就是k8s宣布将dockershim给移除了这么个点 为什么要移除 说白了,就是k8s是想建立标准的,通过的CRI,容器运行的接口,不仅仅可以支持docker,还可以支持其他的......
  • 在 KubeSphere 中部署高可用 Redis 集群
    作者:余生大大,大数据开发工程师,云原生爱好者,KubeSphere社区用户。前言Redis是在开发过程中经常用到的缓存中间件,在生产环境中为了考虑稳定性和高可用一般为集群模式的......
  • oracle数据库集群基础操作
    1.关闭数据库切换至oracle用户1.1查看数据库实例状态[oracle@db1~]$srvctlstatusdatabase-dorclInstanceorcl1isrunningonnodedb1Instanceorcl2isrun......
  • K8S系列(四)——常用命令汇总
    【前言】  K8S虽然可以通过dashboard等图形化界面去管理,但是一些常用命令我们还是要记下。为了方便查看,命令按照资源类型的各种操作命令来分类,部分命令可能会存在重复情......