[集群自动化一]3分钟装好k8s_HA-v1.13.0
标签:
Kubernetes
To install k8s_HA-1.13.0 on CoreOS
external-etcd.png
Prepare:
download:
coreos-k8s-v1.13.0.tgz ----- k8s 1.13.0's docker image&kubelet/kubeadm/kubectl&dashboard
ha.tgz ----- docker image: keepalived.tar/haproxy.tar/etcd.tar
coreosbase2.tgz ----- kvm's img for CoreOS 1855.4
1.0 istio.tgz---(Optional)
k8s-addon.tgz---(Optional)
clone k8s-ha-autoinstall & mv *tgz k8s-ha0autoinstall
CONFIG
vi CONFIG -----just need modify node&master's IP
K8S_VER=v1.13.0 CIDR_SUBNET=10.244.0.0/16 KUBECONFIG=/etc/kubernetes/admin.conf LOAD_BALANCER_DNS=k8sha.yunwei.edu LOAD_BALANCER_PORT=8443 CP1_HOSTNAME=master1.yunwei.edu CP2_HOSTNAME=master2.yunwei.edu CP3_HOSTNAME=master3.yunwei.edu VIP_IP=192.168.253.30 CP1_IP=192.168.253.31 CP2_IP=192.168.253.32 CP3_IP=192.168.253.33 NODE1_IP=192.168.253.34 NODE1_HOSTNAME=node1.yunwei.edu REMOTE_USER=core#master="$CP1_IP,$CP2_IP,$CP3_IP"node="$NODE1_IP" # add IP seprate by ','NODES="$master,$node"net="calico" #calico or flanneldashboard=truehelm=trueingress=trueprometheus=trueefk=trueistio=true#just for coreos machinesKVM_NAME="master1,master2,master3,node1"GATEWAY=192.168.253.125 DNS1=192.168.253.110 DNS2=114.114.114.114
clone
cd clone_coreos;sh clone_machine.sh
clone or install CoreOS machines
Install
Install for single master:
sh -x install.sh all
Install for multi master:
sh -x install.sh allha
安装完成
验证安装
浏览svc.html 包含相关服务的链接
sh install.sh status
查看各服务状态
当需要重新安装:
`sh -x install.sh reset`
install.sh 的HELP
usage: install.sh [prepare|p]|p1|p2|p3|p4|[1|base]|[2|addon]|[3|ha]|dashboard|network|node|rejoin|ingress|helm|prometheus|efk|istio|finish|default|help|... [-c|--config /path/to/config/config.filename] p|prepare :cp&load all tgz&images. p1 :cp&load base tgz&images. p2 :cp&load addon tgz&images. p3 :cp&load istio tgz&images. p4 :cp&load HA tgz&images. 1|base :install k8s base component&calico&dashboard. 2|addon :install k8s addon component:helm,ingress,efk,prometheus. 3|ha :install HA cluster of k8s. node :only join node. all|default :install all configured in CONFIG file with single master. allha :install all configured in CONFIG file with HA three master. finish :get login token&svc. rejoin :need join other node after 24h. ingress :install ingress. helm :install helm. efk :install efk. prometheus :install prometheus. istio :install istio component. reboot :reboot all reset :kubeadm reset all etcdcheck :check etcd cluster calicocheck :check calico status getpods :get pods -o wide getsvc :get svc -o wide genindex :gen index svc.html status :get etcd&calico&pods timezone8 :set timezone CST-8 route :add route temporally
作者:LinuxMan_yang
链接:https://www.jianshu.com/p/179d2b7bb9fa
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦