kubesphere多节点部署

  运维

项目主页
项目主页
github
操作系统 CentOS 7.5.1804 minimal

本例host配置:

172.16.0.20 vip
172.16.0.21 master01
172.16.0.22 master02
172.16.0.23 master03
172.16.0.24 node01

配置/root/kubesphere-all-v2.1.0/conf

配置文件hosts.ini参考

[all]
master01  ansible_connection=local  ip=172.16.0.21
master02  ansible_host=172.16.0.22  ip=172.16.0.22  ansible_ssh_pass=123456
master03  ansible_host=172.16.0.23  ip=172.16.0.23  ansible_ssh_pass=123456
node01  ansible_host=172.16.0.24  ip=172.16.0.24  ansible_ssh_pass=123456

[kube-master]
master01
master02
master03

[kube-node]
node01

[etcd]
master01
master02
master03

[k8s-cluster:children]
kube-node
kube-master

安装参数common.yaml参考

kube_version: v1.15.5
etcd_version: v3.2.18
etcd_backup_period: 30
keep_backup_number: 5
etcd_backup_dir: "/var/backups/kube_etcd"
docker_registry_mirrors:
  - https://docker.mirrors.ustc.edu.cn
  - https://registry.docker-cn.com
  - https://mirror.aliyuncs.com
ks_image_pull_policy: IfNotPresent
kube_network_plugin: calico
kube_service_addresses: 10.233.0.0/18
kube_pods_subnet: 10.233.64.0/18
kube_proxy_mode: ipvs
kubelet_max_pods: 110
enable_nodelocaldns: true
loadbalancer_apiserver:
   address: 172.16.0.20
   port: 6443
periodic_cleaning_time: weekly
local_volume_enabled: true
local_volume_is_default_class: true
local_volume_storage_class: local

ceph_rbd_enabled: false
ceph_rbd_is_default_class: false
ceph_rbd_storage_class: rbd
ceph_rbd_monitors:
  - SHOULD_BE_REPLACED
ceph_rbd_admin_id: admin
ceph_rbd_admin_secret: TYPE_ADMIN_ACCOUNT_HERE
ceph_rbd_pool: rbd
ceph_rbd_user_id: admin
ceph_rbd_user_secret: TYPE_ADMIN_SECRET_HERE
ceph_rbd_fsType: ext4
ceph_rbd_imageFormat: 1

# NFS CONFIGURATION
nfs_client_enabled: true
nfs_client_is_default_class: true

# Hostname of the NFS server(ip or hostname)
nfs_server: 172.16.0.2
nfs_path: /share/kubesphere
nfs_vers3_enabled: false
nfs_archiveOnDelete: false


# GLUSTERFS CONFIGURATION
glusterfs_provisioner_enabled: false
glusterfs_provisioner_is_default_class: false
glusterfs_provisioner_storage_class: glusterfs
glusterfs_provisioner_restauthenabled: true
glusterfs_provisioner_resturl: SHOULD_BE_REPLACED
glusterfs_provisioner_clusterid: SHOULD_BE_REPLACED
glusterfs_provisioner_restuser: admin
glusterfs_provisioner_secretName: heketi-secret
glusterfs_provisioner_gidMin: 40000
glusterfs_provisioner_gidMax: 50000
glusterfs_provisioner_volumetype: replicate:2
jwt_admin_key: SHOULD_BE_REPLACED


ks_version: v2.1.0
console_port: 30880
enable_multi_login: false
mysql_volume_size: 20Gi
minio_volume_size: 20Gi
etcd_volume_size: 20Gi
openldap_volume_size: 2Gi
redis_volume_size: 2Gi

prometheus_replicas: 2
prometheus_memory_request: 400Mi
prometheus_volume_size: 20Gi
grafana_enabled: true

# LOGGING CONFIGURATION
logging_enabled: false
elasticsearch_master_replicas: 1
elasticsearch_data_replicas: 2
logsidecar_replicas: 2
elasticsearch_volume_size: 20Gi
log_max_age: 7
elk_prefix: logstash
kibana_enabled: false

# DEVOPS CONFIGURATION
devops_enabled: false
jenkins_memory_lim: 8Gi
jenkins_memory_req: 4Gi
jenkins_volume_size: 8Gi
jenkinsJavaOpts_Xms: 3g
jenkinsJavaOpts_Xmx: 6g
jenkinsJavaOpts_MaxRAM: 8g
sonarqube_enabled: false

openpitrix_enabled: false
metrics_server_enabled: false
servicemesh_enabled: false
notification_enabled: false
alerting_enabled: false

harbor_enabled: false
harbor_domain: harbor.devops.kubesphere.local
gitlab_enabled: false
gitlab_hosts_domain: devops.kubesphere.local

安装

cd /root
curl -L https://kubesphere.io/download/stable/v2.1.0 > installer.tar.gz 
tar -zxf installer.tar.gz 
cd /root/kubesphere-all-v2.1.0/scripts
./install.sh

看日志:

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath={.items[0].metadata.name}) -f

控制台登录:

Console: 
http://172.16.0.21:30880
Account: admin
Password: P@88w0rd

LEAVE A COMMENT

发表评论前,请选对水果【Apple=苹果、Banana=香蕉、Pineapple=菠萝、Grapes=葡萄】 Pineapple...