Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install kubesphere using kubekey

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to use kubekey to install kubesphere", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use kubekey to install kubesphere" this article.

Download KubeKey

KubeKey is a new generation of Kubernetes and KubeSphere installers that help you install Kubernetes and KubeSphere in a simple, fast, and flexible way.

Export KKZONE=cn curl-sfL https://get-kk.kubesphere.io | VERSION=v1.0.1 sh-

Prepare for Mirror

If you want to speed up the installation or your computer room does not have a public network, you can use the private warehouse within the company to push the image to the private warehouse in advance. My warehouse here uses harbor.

Download the offline installation tool, I just use this script to download and push the image

Curl-L-O https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/offline-installation-tool.sh curl-L-O https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/images-list.txt

Pull the image

. / offline-installation-tool.sh-Smurl images-list.txt-d. / kubesphere-images can see the following package # ll total 8606088-rw-r--r-- 1 root root 454465957 Feb 2 15:37 csi-images.tar.gz-rw-r--r-- 1 root root 1231853258 Feb 2 15:33 example-images.tar.gz-rw-r--r-- 1 root root 445244294 Feb 2 14:50 istio-images.tar in the. / kubesphere-images directory .gz-rw-r--r-- 1 root root 762326634 Feb 2 14:27 k8s-images.tar.gz-rw-r--r-- 1 root root 1297767607 Feb 2 14:40 ks-core-images.tar.gz-rw-r--r-- 1 root root 3439146357 Feb 2 15:19 ks-devops-images.tar.gz-rw-r--r-- 1 root root 733165078 Feb 2 14:46 ks-logging-images.tar.gz-rw-r--r-- 1 root root 448651153 Feb 2 15:23 openpitrix-images.tar.gz

Push the image to the private repository and wait for the script to be completed.

. / offline-installation-tool.sh-l images-list.txt-d. / kubesphere-images-r hub.evbj.easou.com

Create a multi-node cluster

You can use KubeKey to install both Kubernetes and KubeSphere to create a multi-node cluster by customizing the parameters in the configuration file.

Create a Kubernetes cluster with KubeSphere installed (for example-- with-kubesphere v3.0.0)

. / kk create config-- with-kubernetes v1.17.9-- with-kubesphere v3.0.0

A default config-sample.yaml file is created. You can modify this file according to your environment.

ApiVersion: kubekey.kubesphere.io/v1alpha1 kind: Cluster metadata: name: ESCloud spec: hosts:-{name: kubesphere001, address: 10.26.31.34, internalAddress: 10.26.31.34, privateKeyPath: "~ / .ssh/id_dsa", port: 20755}-{name: kubesphere002, address: 10.26.31.36, internalAddress: 10.26.31.36, privateKeyPath: "~ / .ssh/id_dsa", port: 20755}-{name: kubesphere003 Address: 10.26.31.42, internalAddress: 10.26.31.42, privateKeyPath: "~ / .ssh/id_dsa", port: 20755}-{name: kubesphere004, address: 10.26.31.46, internalAddress: 10.26.31.46, privateKeyPath: "~ / .ssh/id_dsa", port: 20755}-{name: kubesphere005, address: 10.26.31.118, internalAddress: 10.26.31.118, privateKeyPath: "~ / .ssh/id_dsa" Port: 20755}-{name: kubesphere006, address: 10.26.31.119, internalAddress: 10.26.31.119, privateKeyPath: "~ / .ssh/id_dsa", port: 20755}-{name: kubesphere007, address: 10.26.31.120, internalAddress: 10.26.31.120, privateKeyPath: "~ / .ssh/id_dsa", port: 20755}-{name: kubesphere008, address: 10.26.31.121, internalAddress: 10.26.31.121 PrivateKeyPath: "~ / .ssh/id_dsa" Port: 20755} roleGroups: etcd:-kubesphere001-kubesphere002-kubesphere003 master:-kubesphere001-kubesphere002-kubesphere003 worker:-kubesphere004-kubesphere005-kubesphere006-kubesphere007-kubesphere008 controlPlaneEndpoint: domain: lb.kubesphere.local address: "" port: "6443" kubernetes: version: v1.17.9 imageRepo: kubesphere clusterName: cluster.local network: Plugin: calico kubePodsCIDR: 10.233.64.0 privateRegistry 18 kubeServiceCIDR: 10.233.0.0 calico kubePodsCIDR 18 registry: registryMirrors: [] insecureRegistries: ["hub.kubeops.net"] privateRegistry: "hub.kubeops.net" addons: []-apiVersion: installer.kubesphere.io/v1alpha1 kind: ClusterConfiguration metadata: name: ks-installer namespace: kubesphere-system labels: version: v3.0.0 spec: local _ registry: "hub.kubeops.net" persistence: storageClass: "" authentication: jwtSecret: "" etcd: monitoring: true endpointIps: localhost port: 2379 tlsEnable: true common: es: elasticsearchDataVolumeSize: 20Gi elasticsearchMasterVolumeSize: 4Gi elkPrefix: logstash logMaxAge: 7 mysqlVolumeSize: 20Gi minioVolumeSize: 20Gi etcdVolumeSize: 20Gi openldapVolumeSize: 2Gi redisVolumSize: 2Gi console: enableMultiLogin: true Enable/disable multi login port: 30880 alerting: enabled: false auditing: enabled: false devops: enabled: false jenkinsMemoryLim: 2Gi jenkinsMemoryReq: 1500Mi jenkinsVolumeSize: 8Gi jenkinsJavaOpts_Xms: 512m jenkinsJavaOpts_Xmx: 512m jenkinsJavaOpts_MaxRAM: 2g events: enabled: false ruler: enabled: true replicas: 2 logging: enabled: false logsidecarReplicas: 2 metrics_server: enabled: true monitoring: PrometheusMemoryRequest: 400Mi prometheusVolumeSize: 20Gi multicluster: clusterRole: none # host | member | none networkpolicy: enabled: false notification: enabled: false openpitrix: enabled: false servicemesh: enabled: false

Environment initialization

. / kk init os-f config-sample.yaml INFO [14:04:19 CST] Init operating system INFO [14:04:20 CST] Start initializing kubesphere008 [10.26.31.121] node=10.26.31.121 INFO [14:04:20 CST] Start initializing kubesphere001 [10.26.31.34] node=10.26.31.34 INFO [14:04:20 CST] Start initializing kubesphere003 [10.26.31.42] node=10.26.31.42 INFO [14:04:20 CST] Start initializing kubesphere005 [10.26.31.118] node=10.26.31.118 INFO [14:04:20 CST] Start initializing kubesphere006 [10.26.31.119] node=10.26.31.119 INFO [14:04:20 CST] Start initializing kubesphere004 [10.26.31.46] node=10.26.31.46 INFO [14:04:20 CST] Start initializing kubesphere007 [10.26.31.120] node=10.26.31.120 INFO [14:04:20 CST] Start initializing kubesphere002 [ 10.26.31.36] node=10.26.31.36 INFO [14:06:34 CST] Complete initialization kubesphere005 [10.26.31.118] node=10.26.31.118 INFO [14:06:56 CST] Complete initialization kubesphere002 [10.26.31.36] node=10.26.31.36 INFO [14:07:04 CST] Complete initialization kubesphere006 [10.26.31.119] node=10.26.31.119 INFO [14:07:04 CST] Complete initialization kubesphere007 [10.26. 31.120] node=10.26.31.120 INFO [14:07:07 CST] Complete initialization kubesphere003 [10.26.31.42] node=10.26.31.42 INFO [14:07:11 CST] Complete initialization kubesphere004 [10.26.31.46] node=10.26.31.46 INFO [14:08:23 CST] Complete initialization kubesphere001 [10.26.31.34] node=10.26.31.34 INFO [14:10:57 CST] Complete initialization kubesphere008 [10.26.31.121] Node=10.26.31.121 INFO [14:10:57 CST] Init operating system successful.

Deployment

After the above preparations are completed and the configuration file is checked again, perform the installation.

. / kk create cluster-f config-sample.yaml +- -+ | name | sudo | curl | openssl | ebtables | socat | ipset | conntrack | docker | nfs client | ceph client | glusterfs client | time | +- -+ -+ | kubesphere005 | y | CST 14:16:55 | | kubesphere006 | y | y | | y | y | CST 14:16:55 | | kubesphere007 | y | CST 14:16:55 | | kubesphere004 | y | y | Y | CST 14:16:55 | | kubesphere001 | y | CST 14:16:55 | | kubesphere003 | y | y | | | y | CST 14:16:55 | | kubesphere002 | y | CST 14:16:55 | | kubesphere008 | Y | CST 14:16:55 | +- -+ This is a simple check of your environment. Before installation, you should ensure that your machines meet all requirements specified at https://github.com/kubesphere/kubekey#requirements-and-recommendations Continue this installation? [yes/no]: yes INFO [14:17:25 CST] Downloading Installation Files INFO [14:17:25 CST] Downloading kubeadm. * # Welcome to KubeSphere! # Console: http://10.26.31.34:30880 Account: admin Password: P@88w0rd NOTES: 1. After logging into the console Please check the monitoring status of service components in the "Cluster Management". If any service is not ready, please wait patiently until all components are ready. 2. Please modify the default password after login. # https://kubesphere.io 2021-02-05 15:47:21 #

Since kubesphere has been installed successfully, you can access http://10.26.31.34:30880 verification through your browser.

Verification

You can log in to the KubeSphere console with the default account and password admin/P@88w0rd and start using KubeSphere. Please change the default password after logging in.

After logging in, the following figure

The above is all the contents of the article "how to install kubesphere using kubekey". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report