Centos7 k8s v1.5.2二进制部署安装-交付dubbo服务到k8s集群准备工作
一、安装部署zookeeper
1、架构图
本次交付的服务架构图:因为zookeeper属于有状态服务,不建议将有状态服务,交付到k8s,如mysql,zk等。
2、首先部署zk集群:zk是java服务,需要依赖jdk,jdk请自行下载:
集群分布:20、21、22
rpm -ivh jdk-8u261-linux-x64.rpm java -version java version "1.8.0_261" Java(TM) SE Runtime Environment (build 1.8.0_261-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
3、下载zookeeper
下载地址:https://archive.apache.org/dist/zookeeper/
4、安装zookeeper
mkdir -p /data/application mkdir -p /data/zk_kafka cd /data/application tar -zxvf apache-zookeeper-3.6.2-bin.tar.gz mv apache-zookeeper-3.6.2-bin /data/zk_kafka/zookeeper-3.6.2 mkdir -p /data/zk_kafka/zookeeper-3.6.2/data mkdir -p /data/zk_kafka/zookeeper-3.6.2/logs cd ..conf/ vim zoo.cfg tickTime=2000 initLimit=10 syncLimit=5 dataDir=/data/zk_kafka/zookeeper-3.6.2/data dataLogDir=/data/zk_kafka/zookeeper-3.6.2/logs clientPort=2181 server.1=zk1.od.com:2888:3888 server.2=zk2.od.com:2888:3888 server.3=zk3.od.com:2888:3888
cd /data/zk_kafka/zookeeper-3.6.2/data
echo 1 >/data/zk_kafka/zookeeper-3.6.2/data/myid
echo 2 >/data/zk_kafka/zookeeper-3.6.2/data/myid
echo 3 >/data/zk_kafka/zookeeper-3.6.2/data/myid
5、启动服务
/data/application/zookeeper-3.4.14/bin/zkServer.sh restart /data/application/zookeeper-3.4.14/bin/zkServer.sh status
6、检查端口