background

With China’s increasing attention to information security, the trend of localization is becoming increasingly strong, including domestic operating system, domestic CPU and so on. Due to the potential advantages of home-made ARM-based cpus in maintaining the credibility and advancement of innovation, its application will be more and more widespread.

KubeSphere, as an open source container platform favored by developers at home and abroad, will also actively participate in and explore applications and innovations under the ARM architecture. This article focuses on how to deploy Kubernetes and KubeSphere in ARM64.

Environment to prepare

node

Operating systems supported by kubeSphere include:

  • Ubuntu 16.04, 18.04
  • Debian Buster, Stretch
  • CentOS/RHEL 7
  • SUSE Linux Enterprise Server 15
  • openEuler

The following uses openEuler 20.09 64bit as an example:

name ip role
node1 172.169.102.249 etcd, master, worker

Ensure that the required dependent software is installed (sudo curl Openssl ebtables Socat ipset Conntrack Docker)

For details, see github.com/kubesphere/…

Please refer to the official KubeSphere documentation for multi-node installation.

Suggestion: Create a system image for the operating system where all dependent software is installed. This improves the delivery and deployment efficiency and avoids dependency problems.

Tip: If you use Centos 7.x or Ubuntu18.04, you can use the kk command to initialize the machine. After decompressing the installation package and creating the configuration file, run the following command to initialize the node: /kk init os-s./dependencies -f config-example.yaml If you run the command to encounter dependencies, you can install dependent software by yourself.

Mirror warehouse

Use Harbor or other third-party mirror repositories.

Tip: You can use the kk command to automatically create a self-signed mirror repository for testing. Note that registry:2 exists on the current machine. If not, you can import it from the decompression package kubesphere-images-v3.0.0/registry. Tar: docker load < registry. Yaml –add-images-repo: kk init OS -f config-example.yaml –add-images-repo: kk init OS -f config-example. The mirrored data is stored locally/MNT/Registry (a separate disk is recommended).

Installation package download:

Note: This installation package only contains Kubernetes + KubeSphere-core images. If you need more arm64 images, you can build them by yourself.

# md5: 3ad57823faf2dfe945e2fe3dcfd4ace9
curl -Ok https://kubesphere-installer.pek3b.qingstor.com/offline/v3.0.0/kubesphere-core-v3.0.0-offline-linux-arm64.tar.gz
Copy the code

Installation steps:

1. Create a cluster configuration file

Kubesphere -core-v3.0.0-offline-linux-arm64

./kk create config
Copy the code

Modify the generated configuration file config-sample.yaml based on actual environment information. You can also use the -f parameter to customize the configuration file path. Kk: github.com/kubesphere/…

Note that you need to specify the correct private repository address privateRegistry.

apiVersion: kubekey.kubesphere.io/v1alpha1 kind: Cluster metadata: name: sample spec: hosts: # arch = arm64 - {name: node1, address: 172.169.102.249, internalAddress: 172.169.102.249, password: Qcloud@123, arch: arm64} roleGroups: etcd: - node1 master: - node1 worker: - node1 controlPlaneEndpoint: domain: Local address: "" Port: 6443 Kubernetes: version: v1.17.9 imageRepo: Kubesphere clusterName: Cluster. Local network: plugin: calico kubePodsCIDR: 10.233.64.0/18 kubeServiceCIDR: 10.233.0.0/18 registry: registryMirrors: [] insecureRegistries: [] privateRegistry: dockerhub.kubekey.local addons: []Copy the code

2. Import the image

Kubesphere -all-v3.0.0-offline-linux-arm64/kubesphere-images-v3.0.0 use offline-installation-tool.sh to import the image into the repository.

/offline-installation-tool.sh -l images-list-v3.0.0. TXT -d kubesphere-images -r dockerhub.kubekey.localCopy the code

3. Perform the installation

After the preceding preparations are complete and the configuration file is checked again, start the installation. ./kk create cluster -f config-sample.yaml --with-kubesphereCopy the code

View the results