KubeSphere 和 K8s 高可用集群离线部署全攻略

本文首发:运维有术,作者术哥。

今天,我们将一起探索如何在离线环境中部署 K8s v1.30.6 和 KubeSphere v4.1.2 高可用集群。对于离线环境的镜像仓库管理,官方推荐使用 Harbor 作为镜像仓库管理工具,它为企业级用户提供了高效、安全的镜像存储方案。而在本指南中,我们将以 Docker Registry 作为镜像仓库示例,展示如何实现离线部署。

如果您更倾向于使用 Harbor,请参考官方文档 KubeSphere 离线安装文档 获取具体的 Harbor 部署方式。

通过本文的指导,您将掌握以下关键技能:

  • K8s 和 KubeSphere 离线安装包制作
  • 离线环境部署 K8s 和 KubeSphere v4.1.2 高可用集群
  • 离线环境安装配置 KubeSphere v4 的扩展组件

1. 部署方案规划

1.1 实战架构图

1.2 实战服务器规划

实战服务器配置 (架构 1:1 复刻小规模生产环境,配置略有不同)

主机名IPCPU内存系统盘数据盘用途
ksp-control-1192.168.9.914840100离线环境 k8s-control-plane
ksp-control-2192.168.9.924840100离线环境 k8s-control-plane
ksp-control-3192.168.9.934840100离线环境 k8s-control-plane
ksp-registry192.168.9.904840100离线环境部署节点和镜像仓库节点
ksp-artifact192.168.2.89/192.168.9.894840100联网主机用于制作离线包
合计52040200500

1.3 实战环境涉及软件版本信息

  • 操作系统:openEuler 24.03 LTS SP1 x86_64
  • KubeSphere:v4.1.2
  • Kubernetes:v1.30.6
  • KubeKey: v3.1.7

2. 获取 KubeSphere 版本信息及镜像列表

KubeSphere 官方 从 v4版本开始,提供了获取部署 KubeSphere 和扩展组件需要的所有镜像列表的官方网站,并且能根据需求选择不同组件组合生成。

  1. 打开浏览器,访问 https://get-images.kubesphere.io/,访问页面如图所示:

  1. 选择需要部署的扩展组件。

本文出于演示目的仅选择常用的 「WhizardTelemetry 平台服务」「WhizardTelemetry 监控」「DevOps」,请根据实际需求选择相应的扩展组件。

  1. 填入邮箱地址,点击 「获取镜像列表」

  2. 查看填写的邮箱,获取 KubeSphere 最新的版本信息以及镜像列表文件。

镜像列表文件如下:

文件名描述
kubesphere-images.txt包含 KubeSphere 及扩展组件涉及的所有镜像,以及在华为云的镜像地址,可根据该文件中的列表将镜像同步至离线仓库中。
kk-manifest.yaml包含 KubeSphere 及扩展组件涉及的所有镜像,可使用 kk 快速构建离线包。
kk-manifest-mirror.yaml包含华为云镜像仓库中 KubeSphere 及扩展组件涉及的所有镜像。访问 DockerHub 受限时可使用该 manifest 文件构建离线包。

3. 构建离线安装包

本文增加一台能联网的节点,在该节点下载 KubeKey 最新版(v3.1.7),用来构建离线安装包。

3.1 安装 KubeKey

执行以下命令下载 KubeKey,下载完成后当前目录下将生成 KubeKey 二进制文件 kk

# 执行下载命令,获取最新版的 kk(受限于网络,有时需要执行多次)
curl -sfL https://get-kk.kubesphere.io | sh -

3.2 创建manifests 模板文件

KubeKey v3.1.0 之前, manifests文件需要根据模板手动编写, 现在可以通过 Kubekey 的 create manifest 命令自动生成 manifests 模板。

create manifest 支持的参数如下:

$ ./kk create manifest --help
Create an offline installation package configuration fileUsage:kk create manifest [flags]Flags:--arch stringArray         Specify a supported arch (default [amd64])--debug                    Print detailed information-f, --filename string          Specify a manifest file path-h, --help                     help for manifest--ignore-err               Ignore the error message, remove the host which reported error and force to continue--kubeconfig string        Specify a kubeconfig file--name string              Specify a name of manifest object (default "sample")--namespace string         KubeKey namespace to use (default "kubekey-system")--with-kubernetes string   Specify a supported version of kubernetes--with-registry            Specify a supported registry components-y, --yes                      Skip confirm check

官方示例(支持多集群、多架构):

# 示例:创建包含 kubernetes v1.24.17,v1.25.16,且 cpu 架构为 amd64、arm64 的 manifests 文件。
./kk create manifest --with-kubernetes v1.24.17,v1.25.16 --arch amd64 --arch arm64

注意:若只需要使用 KubeKey 打包 KubeSphere 镜像至离线环境中,可直接使用邮件中收到的 manifest 文件构建离线包。无需另外创建或编辑 manifest 文件。

若需要使用 kk 离线部署 K8s 以及镜像仓库,可参考以下步骤:

  1. 创建 manifests 文件
# 访问 DockerHub 受限,执行以下命令将 Kubernetes 镜像地址替换为阿里云仓库。
export KKZONE=cn
./kk create manifest --with-kubernetes v1.30.6 --with-registry "docker registry"

参数说明:

  • --with-kubernetes: 指定 k8s 版本
  • --with-registry:使用 docker 作为镜像仓库
  1. 默认生成的配置文件

上面的命令将创建一个 manifest-sample.yaml 文件,具体内容如下:

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Manifest
metadata:name: sample
spec:arches:- amd64operatingSystems: []kubernetesDistributions:- type: kubernetesversion: v1.30.6components:helm:version: v3.14.3cni:version: v1.2.0etcd:version: v3.5.13containerRuntimes:- type: dockerversion: 24.0.9- type: containerdversion: 1.7.13calicoctl:version: v3.27.4crictl:version: v1.29.0docker-registry:version: "2"harbor:version: v2.10.1docker-compose:version: v2.26.1images:- registry.cn-beijing.aliyuncs.com/kubesphereio/pause:3.9- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-apiserver:v1.30.6- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-controller-manager:v1.30.6- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-scheduler:v1.30.6- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-proxy:v1.30.6- registry.cn-beijing.aliyuncs.com/kubesphereio/coredns:1.9.3- registry.cn-beijing.aliyuncs.com/kubesphereio/k8s-dns-node-cache:1.22.20- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-controllers:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/cni:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/node:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/pod2daemon-flexvol:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/typha:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/flannel:v0.21.3- registry.cn-beijing.aliyuncs.com/kubesphereio/flannel-cni-plugin:v1.1.2- registry.cn-beijing.aliyuncs.com/kubesphereio/cilium:v1.15.3- registry.cn-beijing.aliyuncs.com/kubesphereio/operator-generic:v1.15.3- registry.cn-beijing.aliyuncs.com/kubesphereio/hybridnet:v0.8.6- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-ovn:v1.10.10- registry.cn-beijing.aliyuncs.com/kubesphereio/multus-cni:v3.8- registry.cn-beijing.aliyuncs.com/kubesphereio/provisioner-localpv:3.3.0- registry.cn-beijing.aliyuncs.com/kubesphereio/linux-utils:3.3.0- registry.cn-beijing.aliyuncs.com/kubesphereio/haproxy:2.9.6-alpine- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-vip:v0.7.2- registry.cn-beijing.aliyuncs.com/kubesphereio/kata-deploy:stable- registry.cn-beijing.aliyuncs.com/kubesphereio/node-feature-discovery:v0.10.0registry:auths: {}

3.3 编辑 manifest文件

KubeKey v3.1.7 生成的 manifest-sample.yaml 文件适用于部署 Kubernetes 集群以及镜像仓库。我们需要结合从邮件中获取到的 KubeSphere 镜像列表,生成一份新的 manifest 文件。

主要修改说明如下:

  • operatingSystems 配置默认为空,新增 openEuler 配置,以适配openEuler 24.03 LTS SP1openEuler-24.03-amd64.iso是自己制作的适用于 openEuler 24.03 的离线系统安装包 ISO。
  • 复制 kk-manifest-mirror.yaml中的镜像列表,添加到新创建的 manifest-sample.yaml 文件中。

最终的 manifest 文件内容如下:

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Manifest
metadata:name: sample
spec:arches:- amd64operatingSystems:- arch: amd64type: linuxid: openEulerversion: "24.03"osImage: openEuler 24.03 (LTS)repository:iso:localPath: "/data/kubekey/openEuler-24.03-amd64.iso"url:kubernetesDistributions:- type: kubernetesversion: v1.30.6components:helm:version: v3.14.3cni:version: v1.2.0etcd:version: v3.5.13containerRuntimes:- type: dockerversion: 24.0.9- type: containerdversion: 1.7.13calicoctl:version: v3.27.4crictl:version: v1.29.0docker-registry:version: "2"harbor:version: v2.10.1docker-compose:version: v2.26.1images:## kubernetes(跟默认比,删了几个没用的镜像)- registry.cn-beijing.aliyuncs.com/kubesphereio/pause:3.9- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-apiserver:v1.30.6- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-controller-manager:v1.30.6- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-scheduler:v1.30.6- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-proxy:v1.30.6- registry.cn-beijing.aliyuncs.com/kubesphereio/coredns:1.9.3- registry.cn-beijing.aliyuncs.com/kubesphereio/k8s-dns-node-cache:1.22.20- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-controllers:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/cni:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/node:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/pod2daemon-flexvol:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/typha:v3.27.4- registry.cn-beijing.aliyuncs.com/kubesphereio/operator-generic:v1.15.3- registry.cn-beijing.aliyuncs.com/kubesphereio/hybridnet:v0.8.6- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-ovn:v1.10.10- registry.cn-beijing.aliyuncs.com/kubesphereio/multus-cni:v3.8- registry.cn-beijing.aliyuncs.com/kubesphereio/provisioner-localpv:3.3.0- registry.cn-beijing.aliyuncs.com/kubesphereio/linux-utils:3.3.0- registry.cn-beijing.aliyuncs.com/kubesphereio/haproxy:2.9.6-alpine- registry.cn-beijing.aliyuncs.com/kubesphereio/kube-vip:v0.7.2- registry.cn-beijing.aliyuncs.com/kubesphereio/node-feature-discovery:v0.10.0## ks-core- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/ks-apiserver:v4.1.2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/ks-console:v4.1.2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/ks-controller-manager:v4.1.2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/kubectl:v1.27.16- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/redis:7.2.4-alpine- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/haproxy:2.9.6-alpine- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/ks-extensions-museum:v1.1.2## devops- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/devops-apiserver:v4.1.2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/devops-controller:v4.1.2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/devops-tools:v4.1.2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/devops-jenkins:v4.1.2-2.346.3- swr.cn-southwest-2.myhuaweicloud.com/ks/jenkins/inbound-agent:4.10-2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-base:v3.2.2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-nodejs:v3.2.0- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-maven:v3.2.0- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-maven:v3.2.1-jdk11- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-python:v3.2.0- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-go:v3.2.0- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-go:v3.2.2-1.16- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-go:v3.2.2-1.17- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-go:v3.2.2-1.18- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-base:v3.2.2-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-nodejs:v3.2.0-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-maven:v3.2.0-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-maven:v3.2.1-jdk11-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-python:v3.2.0-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-go:v3.2.0-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-go:v3.2.2-1.16-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-go:v3.2.2-1.17-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/builder-go:v3.2.2-1.18-podman- swr.cn-southwest-2.myhuaweicloud.com/ks/argoproj/argocd:v2.3.3- swr.cn-southwest-2.myhuaweicloud.com/ks/argoproj/argocd-applicationset:v0.4.1- swr.cn-southwest-2.myhuaweicloud.com/ks/dexidp/dex:v2.30.2- swr.cn-southwest-2.myhuaweicloud.com/ks/library/redis:6.2.6-alpine## whizard-monitoring- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/kubectl:v1.27.12- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/kube-state-metrics:v2.12.0- swr.cn-southwest-2.myhuaweicloud.com/ks/kubespheredev/kube-webhook-certgen:v20221220-controller-v1.5.1-58-g787ea74b6- swr.cn-southwest-2.myhuaweicloud.com/ks/thanosio/thanos:v0.36.1- swr.cn-southwest-2.myhuaweicloud.com/ks/brancz/kube-rbac-proxy:v0.18.0- swr.cn-southwest-2.myhuaweicloud.com/ks/prometheus-operator/prometheus-config-reloader:v0.75.1- swr.cn-southwest-2.myhuaweicloud.com/ks/prometheus-operator/prometheus-operator:v0.75.1- swr.cn-southwest-2.myhuaweicloud.com/ks/prometheus/node-exporter:v1.8.1- swr.cn-southwest-2.myhuaweicloud.com/ks/prometheus/prometheus:v2.51.2- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/dcgm-exporter:3.3.5-3.4.0-ubuntu22.04- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/process-exporter:0.5.0- swr.cn-southwest-2.myhuaweicloud.com/ks/nginxinc/nginx-unprivileged:1.24- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/calico-exporter:v0.3.0- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/whizard-monitoring-helm-init:v0.1.0## whizard-telemetry- swr.cn-southwest-2.myhuaweicloud.com/ks/kubesphere/whizard-telemetry-apiserver:v1.2.2registry:auths: {}

3.4 导出制品 artifact

  1. 存放系统依赖包 ISO
mv openEuler-24.03-amd64.iso /data/kukekey/
  1. 根据生成的 manifest,执行下面的命令制作制品(artifact)。
export KKZONE=cn
./kk artifact export -m manifest-sample.yaml -o kubesphere-v412-v1306-artifact.tar.gz

正确执行后,输出结果如下 :(受限于篇幅,仅展示最终结果

$ ./kk artifact export -m manifest-sample.yaml -o kubesphere-v412-v1306-artifact.tar.gz_   __      _          _   __
| | / /     | |        | | / /
| |/ / _   _| |__   ___| |/ /  ___ _   _
|    \| | | | '_ \ / _ \    \ / _ \ | | |
| |\  \ |_| | |_) |  __/ |\  \  __/ |_| |
\_| \_/\__,_|_.__/ \___\_| \_/\___|\__, |__/ ||___/23:25:11 CST [CheckFileExist] Check output file if existed
23:25:11 CST success: [LocalHost]
23:25:11 CST [CopyImagesToLocalModule] Copy images to a local OCI path from registries
23:25:11 CST [0]Source: docker://registry.cn-beijing.aliyuncs.com/kubesphereio/pause:3.9
23:25:11 CST [0]Destination: oci:/data/kukekey/kubekey/artifact/images:registry.cn-beijing.aliyuncs.com/kubesphereio/pause:3.9-amd64
Getting image source signatures
Copying blob 61fec91190a0 done
Copying config ada54d1fe6 done
Writing manifest to image destination
Storing signatures
......(部分内容省略)images/index.json
images/oci-layout
images/oci-put-blob1534807915
kube/v1.30.6/amd64/kubeadm
kube/v1.30.6/amd64/kubectl
kube/v1.30.6/amd64/kubelet
registry/compose/v2.26.1/amd64/docker-compose-linux-x86_64
registry/harbor/v2.10.1/amd64/harbor-offline-installer-v2.10.1.tgz
registry/registry/2/amd64/registry-2-linux-amd64.tar.gz
repository/amd64/openEuler/24.03/openEuler-24.03-amd64.iso
runc/v1.1.12/amd64/runc.amd64
00:25:31 CST success: [LocalHost]
00:25:31 CST [ChownOutputModule] Chown output file
00:25:31 CST success: [LocalHost]
00:25:31 CST [ChownWorkerModule] Chown ./kubekey dir
00:25:31 CST success: [LocalHost]
00:25:31 CST Pipeline[ArtifactExportPipeline] execute successfully

制品制作完成后,查看制品大小。

$ ls -lh kubesphere-v412-v1306-artifact.tar.gz
-rw-r--r-- 1 root root 8.9G Jan 19 00:25 kubesphere-v412-v1306-artifact.tar.gz

3.5 下载 KubeSphere Core Helm Chart

  1. 安装 Helm。
wget -qO- https://get.helm.sh/helm-v3.16.4-linux-amd64.tar.gz | tar -zxvf -
mv linux-amd64/helm /usr/local/bin/
# 清理残留
rm -rf linux-amd64/
  1. 下载 KubeSphere Core Helm Chart。
helm fetch https://charts.kubesphere.io/main/ks-core-1.1.3.tgz

说明: 此处为当前版本,请访问 KubeSphere 镜像列表官网 或 KubeSphere GitHub 仓库查看最新 Chart 版本。

4. 准备离线部署的前置数据

注意:本文使用镜像仓库节点复用为部署节点,以下操作无特殊说明,均在(Registry)节点上执行。

4.1 上传离线部署资源包到部署节点

将以下离线部署资源包,上传至离线环境部署(Registry) 节点的 /srv/kubekey 目录(可根据实际情况修改)。

  • kk
  • KubeSphere-v412-v1306-artifact.tar.gz
  • ks-core-1.1.3.tgz

4.2 创建离线 K8s 集群配置文件

  • 执行以下命令,创建离线集群配置文件
cd /srv/kubekey
./kk create config --with-kubernetes v1.30.6

命令执行成功后,在当前目录会生成文件名为 config-sample.yaml 的配置文件。

4.3 修改配置文件

执行命令: vi config-sample.yaml,修改离线集群配置文件 config-sample.yaml

修改 kind: Cluster 小节中 hosts 和 roleGroups 等信息,修改说明如下。

  • hosts:指定节点的 IP、ssh 用户、ssh 密码。同时,新增一个 Registry 节点的配置
  • roleGroups:指定 3 个 etcd、control-plane 节点,复用相同的机器作为 3 个 worker 节点
  • 必须指定主机组 registry 作为仓库部署节点
  • internalLoadbalancer: 启用内置的 HAProxy 负载均衡器
  • system.rpms:新增配置,部署时安装 rpm 包(openEuler 系统默认没有安装 tar 包,必须提前安装)
  • domain:没特殊需求的场景保留默认值即可
  • containerManager:使用 containerd
  • storage.openebs.basePath:新增配置,指定 openebs 默认存储路径为 /data/openebs/local
  • registry:不指定 type 类型,默认安装 docker registry。同时设置相关参数

修改后的完整示例如下:

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:name: sample
spec:hosts:- {name: ksp-control-1, address: 192.168.9.91, internalAddress: 192.168.9.91, user: root, password: "OpsXlab2025!"}- {name: ksp-control-2, address: 192.168.9.92, internalAddress: 192.168.9.92, user: root, password: "OpsXlab2025!"}- {name: ksp-control-3, address: 192.168.9.93, internalAddress: 192.168.9.93, user: root, password: "OpsXlab2025!"}- {name: ksp-registry, address: 192.168.9.90, internalAddress: 192.168.9.90, user: root, password: "OpsXlab2025!"}roleGroups:etcd:- ksp-control-1- ksp-control-2- ksp-control-3control-plane: - ksp-control-1- ksp-control-2- ksp-control-3worker:- ksp-control-1- ksp-control-2- ksp-control-3registry:- ksp-registrycontrolPlaneEndpoint:## Internal loadbalancer for apiservers internalLoadbalancer: haproxydomain: lb.kubesphere.localaddress: ""port: 6443system:rpms:- tarkubernetes:version: v1.30.6clusterName: cluster.localautoRenewCerts: truecontainerManager: containerdetcd:type: kubekeynetwork:plugin: calicokubePodsCIDR: 10.233.64.0/18kubeServiceCIDR: 10.233.0.0/18## multus support. https://github.com/k8snetworkplumbingwg/multus-cnimultusCNI:enabled: falsestorage:openebs:basePath: /data/openebs/local # 默认没有的新增配置,base path of the local PV provisionerregistry:auths:"dockerhub.kubekey.local":skipTLSVerify: trueprivateRegistry: "dockerhub.kubekey.local"# 如果构建离线包时 Kubernetes 镜像使用的是阿里云仓库镜像,需配置该参数,且不能改变名字。如果使用 dockerhub 镜像,则无需配置此参数。namespaceOverride: "kubesphereio"registryMirrors: []insecureRegistries: []addons: []

4.4 配置 hosts 文件解析

在所有离线节点配置 Registry 服务的域名解析,本文使用默认自定义域名 dockerhub.kubekey.local

echo "192.168.9.90 dockerhub.kubekey.local" >> /etc/hosts

5. 部署离线镜像仓库

小规模生产环境没必要使用 Harbor,本文采用 Kubekey 部署 Docker Registry 作为镜像仓库。如果需要使用 Harbor,请参考KubeSphere 离线安装文档。

请注意,以下操作无特殊说明,均在离线环境部署(Registry)节点上执行。

5.1 安装 Docker Registry

说明:如果您已有可用的镜像仓库,可跳过此步骤。

  1. Registry 节点安装必要的软件包
# openEuler 默认不安装 tar
rpm -Uvh tar-1.35-2.oe2403.x86_64.rpm
  1. 执行以下命令安装镜像仓库 Docker Registry
./kk init registry -f config-sample.yaml -a kubesphere-v412-v1306-artifact.tar.gz

正确执行后,如果显示如下信息,则表明镜像仓库创建成功。

08:41:51 CST [InitRegistryModule] Fetch registry certs
08:41:52 CST success: [ksp-registry]
08:41:52 CST [InitRegistryModule] Generate registry Certs
[certs] Using existing ca certificate authority
[certs] Using existing dockerhub.kubekey.local certificate and key on disk
08:41:52 CST success: [LocalHost]
08:41:52 CST [InitRegistryModule] Synchronize certs file
08:41:55 CST success: [ksp-registry]
08:41:55 CST [InitRegistryModule] Synchronize certs file to all nodes
08:42:02 CST success: [ksp-registry]
08:42:02 CST success: [ksp-control-3]
08:42:02 CST success: [ksp-control-2]
08:42:02 CST success: [ksp-control-1]
08:42:02 CST [InstallRegistryModule] Install registry binary
08:42:03 CST success: [ksp-registry]
08:42:03 CST [InstallRegistryModule] Generate registry service
08:42:04 CST success: [ksp-registry]
08:42:04 CST [InstallRegistryModule] Generate registry config
08:42:04 CST success: [ksp-registry]
08:42:04 CST [InstallRegistryModule] Start registry serviceLocal image registry created successfully. Address: dockerhub.kubekey.local08:42:05 CST success: [ksp-registry]
08:42:05 CST [ChownWorkerModule] Chown ./kubekey dir
08:42:05 CST success: [LocalHost]
08:42:05 CST Pipeline[InitRegistryPipeline] execute successfully
  1. 查看 Docker 是否配置了私有证书

建议,集群中的每个节点都执行,确保使用了自定义域名及证书

$ ls /etc/docker/certs.d/dockerhub.kubekey.local/
ca.crt  dockerhub.kubekey.local.cert  dockerhub.kubekey.local.key$ ls /etc/ssl/registry/ssl/
ca.crt      ca.pem                        dockerhub.kubekey.local.key      dockerhub.kubekey.local.pem
ca-key.pem  dockerhub.kubekey.local.cert  dockerhub.kubekey.local-key.pem

5.2 推送离线镜像到镜像仓库

将提前准备好的离线镜像推送到镜像仓库。这一步为可选项,因为创建集群时默认会推送镜像(本文使用参数忽略了)。为了提高部署成功率,建议先推送。

  • 推送离线镜像
./kk artifact image push -f config-sample.yaml -a kubesphere-v412-v1306-artifact.tar.gz
  • 正确执行后,如果显示如下信息,则表明镜像推送成功。
......
09:13:26 CST [ChownWorkerModule] Chown ./kubekey dir
09:13:26 CST success: [LocalHost]
09:13:26 CST Pipeline[ArtifactImagesPushPipeline] execute successfully
  • 测试拉取镜像(可选)
# 方案一: 找个 Docker 环境,拉取镜像
docker pull dockerhub.kubekey.local/kubesphereio/pause:3.9# 方案二:在 Registry 节点查看目录
ls /mnt/registry/docker/registry/v2/repositories/kubesphereio/

说明:如果你的实战环境跟我文档中的一致,你会发现一个问题。目前阶段没有 Docker 环境能执行方案一,只能采用方案二。

6. 部署 K8s 集群

请注意,以下操作无特殊说明,均在离线环境部署(Registry)节点上执行。

6.1 离线部署 K8s 集群

执行以下命令,部署 K8s 集群。

cd /srv/kubekey
./kk create cluster -f config-sample.yaml -a kubesphere-v412-v1306-artifact.tar.gz --with-packages --skip-push-images --with-local-storage

参数说明

  • --with-packages:安装操作系统依赖
  • --skip-push-images: 忽略推送镜像,前面已经完成了推送镜像到私有仓库的任务
  • --with-local-storage:使用 openEBS 作为 local 存储卷

部署完成后,您应该会在终端上看到类似于下面的输出:

......
23:17:54 CST [AddonsModule] Install addons
23:17:54 CST message: [LocalHost]
[0/0] enabled addons
23:17:54 CST success: [LocalHost]
23:17:54 CST [DeployStorageClassModule] Generate OpenEBS manifest
23:17:56 CST skipped: [ksp-control-3]
23:17:56 CST skipped: [ksp-control-2]
23:17:56 CST success: [ksp-control-1]
23:17:56 CST [DeployStorageClassModule] Deploy OpenEBS as cluster default StorageClass
23:17:57 CST skipped: [ksp-control-3]
23:17:57 CST skipped: [ksp-control-2]
23:17:57 CST success: [ksp-control-1]
23:17:57 CST Pipeline[CreateClusterPipeline] execute successfully
Installation is complete.Please check the result using the command:kubectl get pod -A

6.2 kubectl 命令行验证集群状态

control-1节点运行kubectl 命令获取 K8s 集群资源信息。

  • 查看集群节点信息
kubectl get nodes -o wide

在输出结果中可以看到,当前的 K8s 集群有 3个节点,并详细展示每个节点的名字、状态、角色、存活时间、K8s 版本号、内部 IP、操作系统类型、内核版本和容器运行时等信息。

$ kubectl get nodes -o wide
NAME            STATUS   ROLES                  AGE     VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION                  CONTAINER-RUNTIME
ksp-control-1   Ready    control-plane,worker   2m31s   v1.30.6   192.168.9.91   <none>        openEuler 24.03 (LTS)   6.6.0-28.0.0.34.oe2403.x86_64   containerd://1.7.13
ksp-control-2   Ready    control-plane,worker   117s    v1.30.6   192.168.9.92   <none>        openEuler 24.03 (LTS)   6.6.0-28.0.0.34.oe2403.x86_64   containerd://1.7.13
ksp-control-3   Ready    control-plane,worker   116s    v1.30.6   192.168.9.93   <none>        openEuler 24.03 (LTS)   6.6.0-28.0.0.34.oe2403.x86_64   containerd://1.7.13
  • 查看 Pod 列表

输入以下命令,获取在 K8s 集群上运行的 Pod 列表,确保所有的容器状态都是 Running

$ kubectl get pods -o wide -A
NAMESPACE     NAME                                           READY   STATUS    RESTARTS   AGE     IP             NODE            NOMINATED NODE   READINESS GATES
kube-system   calico-kube-controllers-64977fd47c-7tswm       1/1     Running   0          2m23s   10.233.71.1    ksp-control-2   <none>           <none>
kube-system   calico-node-46w84                              1/1     Running   0          2m23s   192.168.9.91   ksp-control-1   <none>           <none>
kube-system   calico-node-l5rxp                              1/1     Running   0          2m23s   192.168.9.93   ksp-control-3   <none>           <none>
kube-system   calico-node-zfrl9                              1/1     Running   0          2m23s   192.168.9.92   ksp-control-2   <none>           <none>
kube-system   coredns-7796b4dd88-74kj6                       1/1     Running   0          2m53s   10.233.71.4    ksp-control-2   <none>           <none>
kube-system   coredns-7796b4dd88-wd2ls                       1/1     Running   0          2m53s   10.233.71.2    ksp-control-2   <none>           <none>
kube-system   kube-apiserver-ksp-control-1                   1/1     Running   0          3m7s    192.168.9.91   ksp-control-1   <none>           <none>
kube-system   kube-apiserver-ksp-control-2                   1/1     Running   0          2m35s   192.168.9.92   ksp-control-2   <none>           <none>
kube-system   kube-apiserver-ksp-control-3                   1/1     Running   0          2m34s   192.168.9.93   ksp-control-3   <none>           <none>
kube-system   kube-controller-manager-ksp-control-1          1/1     Running   0          3m7s    192.168.9.91   ksp-control-1   <none>           <none>
kube-system   kube-controller-manager-ksp-control-2          1/1     Running   0          2m35s   192.168.9.92   ksp-control-2   <none>           <none>
kube-system   kube-controller-manager-ksp-control-3          1/1     Running   0          2m34s   192.168.9.93   ksp-control-3   <none>           <none>
kube-system   kube-proxy-cdfdv                               1/1     Running   0          2m28s   192.168.9.92   ksp-control-2   <none>           <none>
kube-system   kube-proxy-j96mn                               1/1     Running   0          2m29s   192.168.9.91   ksp-control-1   <none>           <none>
kube-system   kube-proxy-s6lzq                               1/1     Running   0          2m29s   192.168.9.93   ksp-control-3   <none>           <none>
kube-system   kube-scheduler-ksp-control-1                   1/1     Running   0          3m7s    192.168.9.91   ksp-control-1   <none>           <none>
kube-system   kube-scheduler-ksp-control-2                   1/1     Running   0          2m35s   192.168.9.92   ksp-control-2   <none>           <none>
kube-system   kube-scheduler-ksp-control-3                   1/1     Running   0          2m35s   192.168.9.93   ksp-control-3   <none>           <none>
kube-system   nodelocaldns-4x5b5                             1/1     Running   0          2m37s   192.168.9.92   ksp-control-2   <none>           <none>
kube-system   nodelocaldns-9xvph                             1/1     Running   1          2m36s   192.168.9.93   ksp-control-3   <none>           <none>
kube-system   nodelocaldns-vtwtq                             1/1     Running   0          2m53s   192.168.9.91   ksp-control-1   <none>           <none>
kube-system   openebs-localpv-provisioner-5b84c4654b-jq9mv   1/1     Running   0          2m15s   10.233.71.3    ksp-control-2   <none>           <none>

至此,我们部署完成了一套 Control-plane 和 Worker 复用,3 节点的 K8s 集群。

7. 安装 KubeSphere

7.1 前提条件

将 ks-core-1.1.3.tgz 传到 Control 节点

7.2 安装 KubeSphere

  1. 安装 KubeSphere
helm upgrade --install -n kubesphere-system --create-namespace ks-core ks-core-1.1.3.tgz \--set global.imageRegistry=dockerhub.kubekey.local/ks \--set extension.imageRegistry=dockerhub.kubekey.local/ks \--set ksExtensionRepository.image.tag=v1.1.2 \--set ha.enabled=true \--set redisHA.enabled=true \--set hostClusterName=opsxlabs-main \--debug \--wait

说明:

  • ksExtensionRepository.image.tag 为之前获取到的 Extensions Museum 版本(即 https://get-images.kubesphere.io/ 上展示的最新扩展组件仓库版本)。

  • 设置 ha.enabled 和 redisHA.enabled,启用高可用部署 KubeSphere

    • hostClusterName: 修改主集群的名字,默认为 host
    • 两个 imageRegistry:修改组件镜像仓库地址

部署过程需要大约 5 分钟,具体看网速和机器配置(redisha-server 创建过程比较耗时)。

安装命令执行完成后,如果显示如下信息,则表明 KubeSphere Core 安装成功,输出信息会显示 KubeSphere Web 控制台的 IP 地址、管理员用户名和管理员密码。

NOTES:
Thank you for choosing KubeSphere Helm Chart.Please be patient and wait for several seconds for the KubeSphere deployment to complete.1. Wait for Deployment CompletionConfirm that all KubeSphere components are running by executing the following command:kubectl get pods -n kubesphere-system
2. Access the KubeSphere ConsoleOnce the deployment is complete, you can access the KubeSphere console using the following URL:http://192.168.9.91:308803. Login to KubeSphere ConsoleUse the following credentials to log in:Account: adminPassword: P@88w0rdNOTE: It is highly recommended to change the default password immediately after the first login.
For additional information and details, please visit https://kubesphere.io.

7.3 命令行验证 KubeSphere Core 状态

  1. 查看 Pod 列表
kubectl get pods -n kubesphere-system

正确执行后,输出结果如下 :

$ kubectl get pods -n kubesphere-system
NAME                                       READY   STATUS      RESTARTS      AGE
extensions-museum-86f8988fc8-s96nl         1/1     Running     0             13m
ks-apiserver-6999ffbd49-jwmd7              1/1     Running     3 (40m ago)   41m
ks-apiserver-6999ffbd49-t4lfr              1/1     Running     7 (34m ago)   41m
ks-apiserver-6999ffbd49-vbpts              1/1     Running     3 (40m ago)   41m
ks-console-7764f5b6cf-gnms2                1/1     Running     0             41m
ks-console-7764f5b6cf-jvtr4                1/1     Running     3 (34m ago)   41m
ks-console-7764f5b6cf-zbckh                1/1     Running     0             41m
ks-controller-manager-54f8cd5fb6-26z7p     1/1     Running     0             41m
ks-controller-manager-54f8cd5fb6-5m4fw     1/1     Running     7 (34m ago)   41m
ks-controller-manager-54f8cd5fb6-gv9zk     1/1     Running     0             41m
ks-core-redisha-haproxy-67cfb4d455-84kvb   1/1     Running     0             41m
ks-core-redisha-haproxy-67cfb4d455-jpzpw   1/1     Running     0             41m
ks-core-redisha-haproxy-67cfb4d455-jzfjh   1/1     Running     0             41m
ks-core-redisha-server-0                   3/3     Running     0             41m
ks-core-redisha-server-1                   3/3     Running     0             39m
ks-core-redisha-server-2                   3/3     Running     0             32m
restart-extensions-museum-28955040-hg697   0/1     Completed   0             13m

7.4 图形化查看集群状态

我们打开浏览器,访问 Control-1 节点的 IP 地址和端口 30880,打开 KubeSphere 管理控制台,查看「集群节点」。

8. 安装扩展组件

本文以最常用的监控(WhizardTelemetry)组件为例,演示离线安装扩展组件的功能是否正常。

KubeSphere v4 将原有的监控功能拆解成了 8个 新版的监控组件并新增了 2个额外的组件。

ksp-extensions-marketplace-observability-v412

8.1 安装 WhizardTelemetry 平台服务组件

版本选择: 选择扩展组件版本。

扩展组件安装: 在「扩展组件配置」页,无需修改 imageRegistry 为 离线镜像仓库地址。

点击「开始安装」,安装过程可视化,安装完成后显示成功的图标。

8.2 安装 WhizardTelemetry 监控组件

版本选择: 选择推荐的最新版,必装组件检测也发现了「WhizardTelemetry 平台服务」组件。

扩展组件安装: 在扩展组件配置页,修改 imageRegistry 为 KubeSphere 官方提供的华为云镜像仓库地址。

点击开始安装,安装过程可视化,安装完成后显示成功的图标。

集群选择: 安装完成后点击下一步,选择需要开启扩展组件的目标集群,目前只有一个集群,选择后点击「下一步」。

差异化配置: 使用默认配置即可。

点击「确认」,开始安装配置集群 Agent

在扩展组件详情页面,点击「组件安装状态」图标,点击「查看日志」,查看安装过程。等待扩展组件集群 Agent 安装完成后关闭页面

8.3 图形化验证扩展组件

不同的扩展组件会有不同的集成方式,有的会将扩展组件的功能入口放在顶部导航栏,有的扩展组件会将功能入口放在企业空间或项目的侧边栏,有的扩展组件会将功能入口放在快捷访问入口。

「WhizardTelemetry 监控」组件的集成采用了我们熟悉的方式,监控告警功能出现在集群管理页面左侧菜单中。扩展组件安装完成之后,进入到集群管理页面,概览页面展示了优化后的新版大屏页面。

  • 集群状态

  • 物理资源监控

8.4 命令行验证扩展组件

  1. 查看 Helm
$ helm ls -A
NAME                            NAMESPACE                       REVISION        UPDATED                                      STATUS          CHART                           APP VERSION
ks-core                         kubesphere-system               1               2025-01-19 23:32:26.807062308 +0800 CST      deployed          ks-core-1.1.3                   v4.1.2
whizard-monitoring              kubesphere-monitoring-system    1               2025-01-20 01:27:49.891517326 +0000 UTC      deployed        whizard-monitoring-1.1.1
whizard-monitoring-agent        kubesphere-monitoring-system    1               2025-01-20 01:29:32.442999661 +0000 UTC      deployed        whizard-monitoring-1.1.1
whizard-telemetry               extension-whizard-telemetry     1               2025-01-20 01:24:37.18195052 +0000 UTC       deployed        whizard-telemetry-1.2.2
  1. 查看 Pod
$ kubectl get pod -n extension-whizard-telemetry
NAME                                                   READY   STATUS      RESTARTS   AGE
helm-executor-install-whizard-telemetry-mf84gt-v4r27   0/1     Completed   0          13m
whizard-telemetry-apiserver-7dd76bdfc9-6qqf9           1/1     Running     0          16m$ kubectl get pod -n kubesphere-monitoring-system
NAME                                                          READY   STATUS      RESTARTS   AGE
helm-executor-install-whizard-monitoring-agent-cbmh6x-tvkhs   0/1     Completed   0          8m29s
helm-executor-install-whizard-monitoring-fsfjm4-vghrh         0/1     Completed   0          10m
kube-state-metrics-7d69dd48f5-27mwn                           3/3     Running     0          8m4s
node-exporter-h9fdb                                           2/2     Running     0          8m4s
node-exporter-hjnbv                                           2/2     Running     0          8m4s
node-exporter-n2kcr                                           2/2     Running     0          8m4s
prometheus-k8s-0                                              2/2     Running     0          7m57s
prometheus-operator-5b4cfcdfc8-2z4mv                          1/1     Running     0          8m4s

9. 附录

9.1 操作系统依赖 ISO 说明

本文实战环境使用的操作系统是 x64 的 openEuler 24.03 LTS SP1 ,需要自己制作安装 Kubernetes 需要的操作系统依赖包镜像 openEuler-24.03-amd64.iso

获取更多操作系统的离线依赖包 ISO,请参考 KubeKey 官方 Releases。

KubeKey 官方支持的操作系统依赖包,包含以下系统:

  • almalinux-9.0
  • centos7(在新版本 KubeKey 中已移除
  • debian10
  • debian11
  • ubuntu-18.04
  • ubuntu-20.04
  • ubuntu-22.04

以上,就是我今天分享的全部内容。

免责声明:

  • 笔者水平有限,尽管经过多次验证和检查,尽力确保内容的准确性,但仍可能存在疏漏之处。敬请业界专家大佬不吝指教。
  • 本文所述内容仅通过实战环境验证测试,读者可学习、借鉴,但严禁直接用于生产环境由此引发的任何问题,作者概不负责

本文由博客一文多发平台 OpenWrite 发布!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/18659.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

代码随想录-训练营-day30

今天我们要进入动态规划的背包问题&#xff0c;背包问题也是一类经典问题了。总的来说可以分为&#xff1a; 今天让我们先来复习0-1背包的题目&#xff0c;这也是所有背包问题的基础。所谓的0-1背包问题一般来说就是给一个背包带有最大容量&#xff0c;然后给一个物体对应的需要…

百问网(100ask)提供的烧写工具的原理和详解;将自己编译生成的u-boot镜像文件烧写到eMMC中

百问网(100ask)提供的烧写工具的原理 具体的实现原理见链接 http://wiki.100ask.org/100ask_imx6ull_tool 为了防止上面这个链接失效&#xff0c;我还对上面这个链接指向的页面保存成了mhtml文件&#xff0c;这个mhtml文件的百度网盘下载链接&#xff1a; https://pan.baidu.c…

【旋转框目标检测】基于YOLO11/v8深度学习的遥感视角船只智能检测系统设计与实现【python源码+Pyqt5界面+数据集+训练代码】

《------往期经典推荐------》 一、AI应用软件开发实战专栏【链接】 项目名称项目名称1.【人脸识别与管理系统开发】2.【车牌识别与自动收费管理系统开发】3.【手势识别系统开发】4.【人脸面部活体检测系统开发】5.【图片风格快速迁移软件开发】6.【人脸表表情识别系统】7.【…

侯捷 C++ 课程学习笔记:C++ 面向对象开发的艺术

在侯捷老师的 C 系列课程中&#xff0c;《C 面向对象开发》这门课程让我对面向对象编程有了更深入的理解。面向对象编程&#xff08;OOP&#xff09;是现代软件开发中最重要的编程范式之一&#xff0c;而 C 作为支持 OOP 的语言&#xff0c;提供了强大的工具和特性。侯捷老师通…

神经网络常见激活函数 12-Swish函数

Swish 函数导函数 Swish函数 S w i s h ( x ) x ⋅ σ ( β x ) x 1 e − β x \begin{aligned} \rm Swish(x) & x \cdot \sigma(\beta x) \\ & \frac{x}{1 e^{-\beta x}} \end{aligned} Swish(x)​x⋅σ(βx)1e−βxx​​ Swish函数导数 d d x S w i s h ( x…

CF 137B.Permutation(Java 实现)

题目分析 输入n个样本&#xff0c;将样本调整为从1到n的包含&#xff0c;需要多少此更改 思路分析 由于样本量本身就是n&#xff0c;无论怎么给数据要么是重复要么不在1到n的范围&#xff0c;只需要遍历1到n判断数据组中有没有i值即可。 代码 import java.util.*;public clas…

web第三次作业

弹窗案例 1.首页代码 <!DOCTYPE html><html lang"en"><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>综合案例</title><st…

go语言简单快速的按顺序遍历kv结构(map)

文章目录 需求描述用map实现按照map的key排序用二维切片实现用结构体实现 需求描述 在go语言中&#xff0c;如果需要对map遍历&#xff0c;每次输出的顺序是不固定的&#xff0c;可以考虑存储为二维切片或结构体。 假设现在需要在页面的下拉菜单中展示一些基础的选项&#xff…

Unity 命令行设置运行在指定的显卡上

设置运行在指定的显卡上 -force-device-index

分享一个使用的音频裁剪chrome扩展-Ringtone Maker

一、插件简介 铃声制作器是一个简单易用的 Chrome 扩展&#xff0c;专门用于制作手机铃声。它支持裁剪音频文件的特定片段&#xff0c;并将其下载为 WAV 格式&#xff0c;方便我们在手机上使用。无论是想从一段长音频中截取精彩部分作为铃声&#xff0c;还是对现有的音频进行个…

数据开放共享和平台整合优化取得实质性突破的智慧物流开源了

智慧物流视频监控平台是一款功能强大且简单易用的实时算法视频监控系统。它的愿景是最底层打通各大芯片厂商相互间的壁垒&#xff0c;省去繁琐重复的适配流程&#xff0c;实现芯片、算法、应用的全流程组合&#xff0c;从而大大减少企业级应用约95%的开发成本可通过边缘计算技术…

预留:大数据Hadoop之——部署hadoop+hive+Mysql环境(Linux)

传送门目录 前期准备 一、JDK的安装 1、安装jdk 2、配置Java环境变量 3、加载环境变量 4、进行校验 二、hadoop的集群搭建 1、hadoop的下载安装 2、配置文件设置 2.1. 配置 hadoop-env.sh 2.2. 配置 core-site.xml 2.3. 配置hdfs-site.xml 2.4. 配置 yarn-site.xm…

《Spring实战》(第6版)第1章 Spring起步

第1部分 Spring基础 第1章 Spring起步 1.1 什么是Spring Spring的核心是提供一个容器(container)。 称为Spring应用上下文(Spring application context)。 创建和管理应用的组件(bean)&#xff0c;与上下文装配在一起。 Bean装配通过依赖注入(Dependency Injection,DI)。…

DesignCon2019 Paper分享--Automotive 芯片封装的SIPI优化

本期分享一篇intel在DesignCon2019上发表的介绍汽车芯片封装SIPI优化的paper--《Signal/Power Integrity Optimizations In An IoT Automotive Package》,文章主要介绍汽车芯片在SIPI上面临的挑战并提出了一些优化措施。 汽车芯片的发展趋势 如今&#xff0c;消费者对于车内用…

技术评测:MaxCompute MaxFrame——阿里云自研分布式计算框架的Python编程接口

引言 随着大数据和人工智能技术的发展&#xff0c;数据处理的需求日益增长。阿里云推出的MaxCompute MaxFrame&#xff08;简称“MaxFrame”&#xff09;是一个专为Python开发者设计的分布式计算框架&#xff0c;它不仅支持Python编程接口&#xff0c;还能直接利用MaxCompute的…

优选算法《位运算》

在本篇当中我们将会复习之前在C语言阶段学习的各种位运算&#xff0c;并且在复习当中将再补充一些在算法题当中没有进行总结的位运算的使用方法&#xff0c;再总结完常见的位运算使用方法之和接下来还是和之前的算法篇章一样通过几道算法题来对这些位运算的方法技巧进行巩固。在…

复旦大学:公共数据开放利用层报告(2024)

摘 要: 数据利用是公共数据开放的成效展现环节。 中国公共数据开放评估中利用层的指标体系包括利用促进、 利用多样性、 成果数量、 成果质量、成果价值 5 个一级指标。 其中, 省域评估指标体系更关注省级统筹与省市协同, 而城市评估指标体系更强调成果产出与价值释放。 根据该…

CAS单点登录(第7版)24.高可用性

如有疑问&#xff0c;请看视频&#xff1a;CAS单点登录&#xff08;第7版&#xff09; 高可用性 概述 高可用性指南 &#xff08;HA/Clustering&#xff09; 高度可用的 CAS 部署是一种提供弹性以响应各种故障模式的部署&#xff0c;以便 CAS 在发生故障时继续提供 SSO 服务…

Vue极简插件安装

1. 打开Google浏览器&#xff0c;输入网址极简插件官网_Chrome插件下载_Chrome浏览器应用商店极简插件是一个优质Chrome插件下载商店&#xff0c;收录热门好用的Chrome插件扩展&#xff0c;国内最方便的Chrome插件下载网站。一键下载谷歌扩展插件&#xff0c;无套路下载插件。h…

代码随想录刷题攻略---动态规划---子序列问题1---子序列

子序列&#xff08;不连续&#xff09;和子序列&#xff08;连续&#xff09;的问题 例题1: 最长递增子序列 给你一个整数数组 nums &#xff0c;找到其中最长严格递增子序列的长度。 子序列是由数组派生而来的序列&#xff0c;删除&#xff08;或不删除&#xff09;数组中的…