基础服务组件安装

2019/12/20 posted in  Kubernetes

nginx-ingress

以NodePort的形式负载均衡,每个node上都会绑定80、443端口

helm install nginx-ingress aliyun/nginx-ingress --set controller.service.type=NodePort,controller.service.externalTrafficPolicy=Local,controller.kind=DaemonSet,controller.daemonset.useHostPort=true -n kube-system

chartmuseum

helm install chartmuseum aliyun/chartmuseum  --set persistence.pv.enabled=true,persistence.pv.nfs.server=10.9.122.86,persistence.pv.nfs.path=/data/charts/,persistence.pv.pvname=charts --set ingress.enabled=true   --set ingress.hosts[0].name=charts.youxuetong.com   --set ingress.hosts[0].path=/ --set ingress.hosts[0].tls=true --set ingress.hosts[0].tlsSecret=chart-secret,env.open.DISABLE_API=false,env.open.ALLOW_OVERWRITE=true,env.secret.BASIC_AUTH_USER=yxt,env.secret.BASIC_AUTH_PASS=9cWcXrHPZiDj7jwL

NFS动态存储

helm install nfs-client-provisioner aliyun/nfs-client-provisioner --set nfs.server=192.168.122.9 --set nfs.path=/data -n share

如果需要将nfs-client当做默认storageclass,需要加上storageClass.defaultClass=true参数

helm install nfs-client-provisioner aliyun/nfs-client-provisioner --set nfs.server=192.168.122.9,nfs.path=/data,storageClass.defaultClass=true -n share

需要所有node节点都安装nfs组件,否则挂载不上

sudo apt-get install nfs-common

MySQL

helm install mysql aliyun/mysql --set root.password=4zxsM3XcTgVtydCK,db.user=dev,db.password=QLdTNpi6QQqiMp7B,db.name=passport_dev -n share

Redis

helm install redis aliyun/redis --set password=X2eH6BvahNqAuQkg,master.service.type=NodePort,master.service.nodePort=32765,slave.service.type=NodePort,slave.service.nodePort=32764 -n share