k8s学习(12)--在linux上直接安装kubesphere集群版

  1. 准备三台centos7机子,机子的ip分别为192.168.110.128,192.168.110.129,192.168.110.130,其中128为master节点,129为node1,130为node2,修改主机名并关闭三台机子的防火墙
hostnamectl set-hostname master
hostnamectl set-hostname node1
hostnamectl set-hostname node2

systemctl stop firewalld
systemctl disable firewalld
  1. 在master机子上,下载KubeSphere 2.1.1安装包,并修改kubesphere-all-v2.1.1/conf/hosts.ini文件
curl -L https://kubesphere.io/download/stable/v2.1.1 > installer.tar.gz \
&& tar -zxf installer.tar.gz && cd kubesphere-all-v2.1.1/conf

由于我们用的用户名都是root,密码都是123456,则下面的配置即可

master ansible_connection=local  ip=192.168.110.128
node1  ansible_host=192.168.110.129  ip=192.168.110.129  ansible_ssh_pass=123456
node2  ansible_host=192.168.110.130  ip=192.168.110.130  ansible_ssh_pass=123456

如果不是root用户,只是又root权限的话,则需要按下面的配置

master ansible_connection=local  ip=192.168.0.5  ansible_user=ubuntu  ansible_become_pass=Qcloud@123
node1  ansible_host=192.168.0.6  ip=192.168.0.6  ansible_user=ubuntu  ansible_become_pass=Qcloud@123
node2  ansible_host=192.168.0.8  ip=192.168.0.8  ansible_user=ubuntu  ansible_become_pass=Qcloud@123
  1. 安装
    安装前先配置镜像加速,修改common.yaml文件
docker_registry_mirrors:
  - https://zoo2pivc.mirror.aliyuncs.com

在这里插入图片描述
最好是先将镜像拉取下来,记得三台机子都需要拉取,所以可以事先每台机子都安装好docker
首先新建一个叫images的文件,将需要下载的镜像写入里面

busybox:1.28.4
calico/kube-controllers:v3.7.3
calico/node:v3.7.3
coredns/coredns:1.6.0
dockerhub.qingcloud.com/coreos/etcd:v3.2.18
dockerhub.qingcloud.com/google_containers/metrics-server-amd64:v0.3.1
dockerhub.qingcloud.com/pires/docker-elasticsearch-curator:5.5.4
goharbor/chartmuseum-photon:v0.9.0-v1.9.1
goharbor/clair-photon:v2.0.9-v1.9.1
goharbor/harbor-core:v1.9.1
goharbor/harbor-db:v1.9.1
goharbor/harbor-jobservice:v1.9.1
goharbor/harbor-portal:v1.9.1
goharbor/harbor-registryctl:v1.9.1
goharbor/nginx-photon:v1.9.1
goharbor/redis-photon:v1.9.1
goharbor/registry-photon:v2.7.1-patch-2819-2553-v1.9.1
istio/citadel:1.3.3
istio/galley:1.3.3
istio/kubectl:1.3.3
istio/mixer:1.3.3
istio/pilot:1.3.3
istio/proxyv2:1.3.3
istio/sidecar_injector:1.3.3
jaegertracing/jaeger-agent:1.13
jaegertracing/jaeger-collector:1.13
jaegertracing/jaeger-operator:1.13.1
jaegertracing/jaeger-query:1.13
jenkins/jenkins:2.176.2
kubesphere/jenkins-uc:v2.1.0
kubesphere/addon-resizer:1.8.4
kubesphere/alert_adapter:v2.1.0
kubesphere/alerting-dbinit:v2.1.0
kubesphere/alerting:v2.1.0
kubesphere/configmap-reload:v0.0.1
kubesphere/elasticsearch-oss:6.7.0-1
kubesphere/fluent-bit:v1.3.2-reload
kubesphere/fluentbit-operator:v2.1.0
kubesphere/ks-account:v2.1.0
kubesphere/ks-apigateway:v2.1.0
kubesphere/ks-apiserver:v2.1.0
kubesphere/ks-console:v2.1.0
kubesphere/ks-controller-manager:v2.1.0
kubesphere/ks-devops:flyway-v2.1.0
kubesphere/ks-installer:v2.1.0
kubesphere/kube-rbac-proxy:v0.4.1
kubesphere/kube-state-metrics:v1.5.2
kubesphere/kubectl:v1.0.0
kubesphere/log-sidecar-injector:1.0
kubesphere/node-exporter:ks-v0.16.0
kubesphere/notification:flyway_v2.1.0
kubesphere/notification:v2.1.0
kubesphere/prometheus-config-reloader:v0.27.1
kubesphere/prometheus-operator:v0.27.1
kubesphere/prometheus:v2.5.0
kubesphere/s2ioperator:v2.1.0
minio/minio:RELEASE.2019-08-07T01-59-21Z
mirrorgitlabcontainers/kubectl:v1.12.10
mirrorgooglecontainers/cluster-proportional-autoscaler-amd64:1.6.0
mirrorgooglecontainers/defaultbackend-amd64:1.4
mysql:8.0.11
nginx:1.14-alpine
openpitrix/openpitrix:flyway-v0.4.5
openpitrix/openpitrix:v0.4.5
openpitrix/release-app:v0.4.2
openpitrix/runtime-provider-kubernetes:v0.1.2
osixia/openldap:1.3.0
redis:5.0.5-alpine

然后执行下面两句,也就是从qing容器仓库中拉取镜像

docker login -u guest -p guest dockerhub.qingcloud.com
for line in `cat images`; do docker pull $line; done

镜像拉取好了以后,执行kubesphere-all-v2.1.1/scripts/install.sh

  1. 安装完成访问
    k8s学习(12)--在linux上直接安装kubesphere集群版_第1张图片
    k8s学习(12)--在linux上直接安装kubesphere集群版_第2张图片

你可能感兴趣的:(java学习,kubernetes,docker)