【信創-k8s】重磅-鯤鵬arm+麒麟V10離線部署k8s1.30+kubesphere4.1.3

隨著信創產業的推進,鯤鵬arm64架構得以快速發展。而由于信創領域的主要客戶通常部署在內網環境中,這使得離線部署成為該架構方案實施過程中不可或缺的關鍵環節。

**環境涉及軟件版本信息**

+ 服務器芯片: **鯤鵬920/飛騰2000(arm64)**
+ 操作系統:**銀河麒麟V10**
+ Containerd: **1.7.13**
+ Kubernetes:**v1.30.12**
+ KubeSphere:**v4.1.3**
+ KubeKey: **v3.1.9(二開版)**
+ Docker: **24.0.9**
+ DockerCompose: **v2.26.1**
+ Harbor: **v2.7.1**
+ Prometheus: **v2.51.2**

**服務器基本信息**

```plain
[root@node1 ~]# uname -a
Linux node1 4.19.90-17.5.ky10.aarch64 #1 SMP Fri Aug 7 13:35:33 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
[root@node1 ~]#?
[root@node1 ~]# cat /etc/os-release?
NAME="Kylin Linux Advanced Server"
VERSION="V10 (Tercel)"
ID="kylin"
VERSION_ID="V10"
PRETTY_NAME="Kylin Linux Advanced Server V10 (Tercel)"
ANSI_COLOR="0;31"

[root@node1 ~]#
```

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432543205-7984761a-4881-479a-b5ef-088c95454c57.png)

## 1.說明
作者使用`k8s`和`kubesphere`過程中已適配芯片和操作系統如下:

+ CPU芯片:
? ? - 鯤鵬
? ? - 飛騰
? ? - 海光
? ? - 兆芯
? ? - 國際芯片:interl、amd等
+ 操作系統
? ? - 銀河麒麟V10
? ? - 麒麟國防版
? ? - 麒麟信安
? ? - 中標麒麟V7
? ? - 統信 UOS
? ? - 華為歐拉 openEuler、移動大云
? ? - 阿里龍蜥 Anolis OS
? ? - 騰訊 TencentOS
? ? - 國際操作系統:centos、ubuntu、debian等

本文由 [編碼如寫詩-天行1st] 原創編寫,有任何問題可添加作者微信 [sd_zdhr] 獲取幫助。

關于我:

+ 主要從事后端開發,兼具前端、運維及全棧工程師,熱愛`Golang`、`Docker`、`kubernetes`、`KubeSphere`。
+ 信創服務器`k8s`&`KubeSphere`布道者、`KubeSphere`離線部署布道者

### 關于kt
`kt`是基于`kk`二次開發產物,主要為適配信創國產化環境和簡化`arm`部署過程。

支持`arm64`和`amd64`架構國產操作系統,已適配芯片+操作系統如上。

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432543210-08ada6f3-910b-4700-9b48-ef97fe678013.png)

## 2.前提條件
參考如下示例準備至少三臺主機,其中node1可省略,讓master節點即是主節點也是工作節點

| **<font style="color:rgb(66, 75, 93);">主機名</font>** | **<font style="color:rgb(66, 75, 93);">IP</font>** | **<font style="color:rgb(66, 75, 93);">架構</font>** | **<font style="color:rgb(66, 75, 93);">OS</font>** | **<font style="color:rgb(66, 75, 93);">用途</font>** |
| --- | --- | --- | --- | --- |
| <font style="color:rgb(66, 75, 93);">node</font> | <font style="color:rgb(66, 75, 93);">192.168.3.249</font> | <font style="color:rgb(66, 75, 93);">X86_64</font> | <font style="color:rgb(66, 75, 93);">Ubuntu24.04</font> | <font style="color:rgb(66, 75, 93);">聯網主機,用于制作離線包</font> |
| <font style="color:rgb(66, 75, 93);">node1</font> | <font style="color:rgb(66, 75, 93);">192.168.0.80</font> | <font style="color:rgb(66, 75, 93);">arm64</font> | <font style="color:rgb(66, 75, 93);">麒麟V10</font> | <font style="color:rgb(66, 75, 93);">離線環境主節點,鏡像倉庫節點</font> |


## 3.構建離線包
在node可聯網節點上操作

### 3.1 上傳kt
將`[kt_x86.tar.gz](https://pan.xunlei.com/s/VOSc93lCJRKUTy_L9U5DHzDhA1?pwd=3r38#。 "kt_x86版本")`上傳至可聯網節點解壓后操作,即日起至`2025-07-09`免費使用。

### 3.2 創建 manifest 文件
```plain
export KKZONE=cn
./kt create manifest --with-kubernetes v1.30.12 --with-registry
```

### 3.3 編輯 manifest 文件
```plain
vi manifest-sample.yaml
```

```yaml
apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Manifest
metadata:
? name: sample
spec:
? arches:
? - arm64
? operatingSystems: []
? kubernetesDistributions:
? - type: kubernetes
? ? version: v1.30.12
? components:
? ? helm:?
? ? ? version: v3.14.3
? ? cni:?
? ? ? version: v1.2.0
? ? etcd:?
? ? ? version: v3.5.13
? ? containerRuntimes:
? ? - type: docker
? ? ? version: 24.0.9
? ? - type: containerd
? ? ? version: 1.7.13
? ? calicoctl:
? ? ? version: v3.27.4
? ? crictl:?
? ? ? version: v1.29.0
? ? docker-registry:
? ? ? version: "2"
? ? harbor:
? ? ? version: v2.7.1
? ? docker-compose:
? ? ? version: v2.26.1
? images:
? - registry.cn-beijing.aliyuncs.com/kubesphereio/pause:3.9
? - registry.cn-beijing.aliyuncs.com/kubesphereio/kube-apiserver:v1.30.12
? - registry.cn-beijing.aliyuncs.com/kubesphereio/kube-controller-manager:v1.30.12
? - registry.cn-beijing.aliyuncs.com/kubesphereio/kube-scheduler:v1.30.12
? - registry.cn-beijing.aliyuncs.com/kubesphereio/kube-proxy:v1.30.12
? - 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
? # ks
? - dockerhub.kubekey.local/gjing1st/kubesphere/ks-extensions-museum:v1.1.6
? - dockerhub.kubekey.local/gjing1st/kubesphere/ks-controller-manager:v4.1.3
? - dockerhub.kubekey.local/gjing1st/kubesphere/ks-apiserver:v4.1.3
? - dockerhub.kubekey.local/gjing1st/kubesphere/ks-console:v4.1.3
? - dockerhub.kubekey.local/gjing1st/kubesphere/kubectl:v1.27.16
? registry:
? ? auths: {}
```

### 3.4 導出離線制品
```plain
export KKZONE=cn
./kt artifact export -m manifest-sample.yaml -o artifact-arm-k8s13012-ks413.tar.gz
```

可以看到下載了`arm64` 版本的`harbor`,由于`harbor`官方不支持arm版本,因此`kk`也不支持`arm`版本`harbor`。此版本`harbor`和`kk`為自己制作,由于`harbor:v2.8.0`版本之后不支持擴展`helm`功能,我司需要用其`helm`管理應用,所以這里使用`v2.7.1`版本。

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432543321-c17561b9-f12b-4f6a-ad97-12dc12afe4cf.png)

### 3.5 下載 KubeSphere Core Helm Chart
安裝helm

```plain
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
```

下載 KubeSphere Core Helm Chart

```plain
VERSION=1.1.3 ? ? # Chart 版本
helm fetch https://charts.kubesphere.io/main/ks-core-${VERSION}.tgz
```

## 4 離線部署準備
### 4.1 將安裝包拷貝至離線環境
將 kt、制品 artifact 、Helm文件等通過介質拷貝至**node1節點**。

### 4.2 初始化操作系統
**所有節點**,上傳`[kt_arm.tar.gz](https://pan.xunlei.com/s/VOSc8AKcsUM5K5Lxma9KBW2sA1?pwd=85gd#。 "kt_arm版本")`解壓后執行`./kt init-os`,已適配操作系統和架構見`1.說明`

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432543367-4242960a-9c7e-43ae-b8c3-02d55350c38f.png)

### 4.3 修改配置文件?
主要修改相關節點和harbor信息

```plain
vi config-sample.yaml
```

```yaml
kind: Cluster
metadata:
? name: sample
spec:
? hosts:
? - {name: node1, address: 192.168.0.80, internalAddress: 192.168.0.80, user: root, password: "123456"}
? roleGroups:
? ? etcd:
? ? - node1
? ? control-plane:
? ? - node1
? ? worker:
? ? - node1
? ? registry:
? ? - node1
? controlPlaneEndpoint:
? ? ## Internal loadbalancer for apiservers?
? ? # internalLoadbalancer: haproxy

? ? domain: lb.kubesphere.local
? ? address: ""
? ? port: 6443
? kubernetes:
? ? version: v1.30.12
? ? clusterName: cluster.local
? ? autoRenewCerts: true
? ? containerManager: docker
? etcd:
? ? type: kubekey
? network:
? ? plugin: calico
? ? kubePodsCIDR: 10.233.64.0/18
? ? kubeServiceCIDR: 10.233.0.0/18
? ? ## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
? ? multusCNI:
? ? ? enabled: false
? registry:
? ? type: harbor
? ? registryMirrors: []
? ? insecureRegistries: []
? ? privateRegistry: "dockerhub.kubekey.local"
? ? namespaceOverride: "kubesphereio"
? ? auths: # if docker add by `docker login`, if containerd append to `/etc/containerd/config.toml`
? ? ? "dockerhub.kubekey.local":
? ? ? ? username: "admin"
? ? ? ? password: Harbor@123 # 此處可自定義,kk3.1.8新特性
? ? ? ? skipTLSVerify: true # Allow contacting registries over HTTPS with failed TLS verification.
? ? ? ? plainHTTP: false # Allow contacting registries over HTTP.
? ? ? ? certsPath: "/etc/docker/certs.d/dockerhub.kubekey.local"
? addons: []
```

### 4.4 創建鏡像倉庫
```plain
./kt init registry -f config-sample.yaml -a artifact-arm-k8s13012-ks413.tar.gz
```

可以看到使用了`arm64`版本的harbor

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432543267-fb588970-d341-485d-9647-529643d11a77.png)

### 4.5 創建harbor項目
<font style="background-color:rgb(255,245,235);">說明:</font>

<font style="background-color:rgb(255,245,235);">Harbor 管理員賬號:</font>**<font style="background-color:rgb(255,245,235);">admin</font>**<font style="background-color:rgb(255,245,235);">,密碼:</font>**<font style="background-color:rgb(255,245,235);">Harbor@123</font>**<font style="background-color:rgb(255,245,235);">。密碼同步使用配置文件中的對應password</font>

<font style="background-color:rgb(255,245,235);">harbor 安裝文件在 </font>`<font style="background-color:rgb(255,245,235);">/opt/harbor</font>`<font style="background-color:rgb(255,245,235);"> 目錄下,可在該目錄下對 harbor 進行運維。</font>

```plain
vi create_project_harbor.sh
```

```bash
#!/usr/bin/env bash

url="https://dockerhub.kubekey.local" ?# 或修改為實際鏡像倉庫地址
user="admin"
passwd="Harbor@123"

harbor_projects=(
? ? ? ? gjing1st
? ? ? ? kubesphere
? ? ? ? kubesphereio
)

for project in "${harbor_projects[@]}"; do
? ? echo "creating $project"
? ? curl -u "${user}:${passwd}" -X POST -H "Content-Type: application/json" "${url}/api/v2.0/projects" -d "{ \"project_name\": \"${project}\", \"public\": true}" -k ?# 注意在 curl 命令末尾加上 -k
done
```

#### 創建 Harbor 項目
```plain
chmod +x create_project_harbor.sh

./create_project_harbor.sh
```

#### 驗證
![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432544117-e64c6d10-4117-42d3-865a-6d48712d946b.png)

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432544233-bc132fd3-033c-4d4b-890d-be6bbe774c43.png)

## 5 安裝Kubernetes
執行以下命令創建 Kubernetes 集群:

```plain
./kt create cluster -f config-sample.yaml -a artifact-arm-k8s13012-ks413.tar.gz ?--with-local-storage
```

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432544162-cc938cb6-f026-4abb-b4d9-1fb9fc0936e9.png)

等待大概兩分鐘左右看到成功消息

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432544161-ab5eae7d-3212-4ad9-a50d-e4d99f92ec28.png)

## 6 安裝 KubeSphere
```plain
helm upgrade --install -n kubesphere-system --create-namespace ks-core ks-core-1.1.5.tgz \
? ? ?--set global.imageRegistry=dockerhub.kubekey.local/ks \
? ? ?--set extension.imageRegistry=dockerhub.kubekey.local/ks \
? ? ?--set ksExtensionRepository.image.tag=v1.1.5 \
? ? ?--debug \
? ? ?--wait
```

等待大概30秒左右看到成功消息

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432544042-23f04a8e-3baf-454c-beeb-251e7a7ce98b.png)

## 7 驗證
登錄頁面

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432544992-6414b519-f841-4e7c-83fb-5ffdfdc754b9.png)

初次登錄需要換密碼,如果不想換也可以繼續填寫`P@88w0rd`,不過建議更換

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432544851-0f21ba64-074f-4829-b261-2f464e20863d.png)

首頁

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432545183-86d151c7-ec77-4c01-acb9-e124a743cbd4.png)

集群節點版本信息

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432545440-a44cd776-37a4-4f91-a7ae-5916f9c1b919.png)

概覽

![](https://cdn.nlark.com/yuque/0/2025/png/12795725/1749432544952-a1cf5c48-9e4c-4a0d-a445-ec3db57c274f.png)

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/909552.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/909552.shtml
英文地址,請注明出處:http://en.pswp.cn/news/909552.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

第11章:Neo4j實際應用案例

理論知識和技術細節固然重要&#xff0c;但真正理解Neo4j的價值在于了解它如何解決實際業務問題。本章將探討Neo4j在各個領域的實際應用案例&#xff0c;包括社交網絡分析、推薦系統、知識圖譜以及欺詐檢測與安全分析。通過這些案例&#xff0c;讀者可以了解如何將前面章節學到…

數字圖像處理與OpenCV初探

什么是數字圖像處理&#xff1f; 當今時代&#xff0c;數字圖像無處不在。手機拍照、安防監控、醫療檢查、地圖導航、工業質檢……我們每天都在接收、分析和處理大量圖像信息。對于計算機而言&#xff0c;圖像并不是一張“看得懂”的照片&#xff0c;而是由數值組成的矩陣。如何…

ubuntu網絡連接失敗 + mobaxterm拖拽文件出錯等問題解決方法

網絡連接問題&#xff0c;表現在不能通過源下載以及更新 終端問題顯示【通過 ip a 命令獲得】 kejiubuntu:~/Desktop$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00…

C# CS_Prj01 串口通信控制臺程序

一直以來&#xff0c;玩8088單板機&#xff0c;上位機都是使用的綠色現成的串口軟件。 今天&#xff0c;感覺8088單板機的各部分測試都基本完成了。 本著玩的精神&#xff0c;自己寫一個上位機的簡單串口程序&#xff0c;與自己的8088單板機通訊。 功能&#xff1a;一個完整…

40套精品大氣黑金系列行業PPT模版分享

黑金系列PPT模版&#xff0c;優秀員工頒獎典禮PPT模版&#xff0c;消費訂貨會PPT模版&#xff0c;共贏未來PPT模版&#xff0c;投資類PPT模版&#xff0c;雙12年終盛典PPT模版&#xff0c;商業計劃書PPT模版&#xff0c;高端通用企業文化PPT模版&#xff0c;公司喜報企業捷報PP…

SAP學習筆記 - 開發31 - 前端Fiori開發 Device Adaptation(設備自適應)

上一章講了Fiori開發中的 Responsiveness&#xff08;響應式設計&#xff09;。 SAP學習筆記 - 開發30 - 前端Fiori開發 Responsiveness&#xff08;響應式設計&#xff09;-CSDN博客 本章繼續學習Fiori 開發中的知識。 目錄 1&#xff0c;Device Adaptation&#xff08;設備…

網絡的那些事——初級——OSPF(2)

前面說了OSPF的狀態機和一起簡單的OSPF配合&#xff0c;接下這章繼續寫OSPFV2 IP frr和OSPFV3. 什么是OSPF IP FRR? OSPF IP FRR&#xff08;Fast Reroute&#xff09;利用全網鏈路狀態數據庫&#xff0c;預先計算出備份路徑保存在轉發表中&#xff0c;以備在故障時提供流量保…

C++(初階)(二十一)——unordered_set和unordered_map

二十二&#xff0c;unordered_set和unordered_map的使用 1.unordered_set 1.1介紹 c11 template<class Key,class Hash std::hash<Key>,class KeyEqual std::equal_to<Key>,class Allocator std::allocator<Key> > class unordered_set;c17 na…

Java面試題:分布式ID時鐘回撥怎么處理?序列號耗盡了怎么辦?

歡迎來到啾啾的博客&#x1f431;。 記錄學習點滴。分享工作思考和實用技巧&#xff0c;偶爾也分享一些雜談&#x1f4ac;。 有很多很多不足的地方&#xff0c;歡迎評論交流&#xff0c;感謝您的閱讀和評論&#x1f604;。 目錄 引言1 分布式ID2 問題2.1 時鐘回撥2.1.1 毫秒級時…

影視劇學經典系列-梁祝-陶淵明《感士不遇賦并序》

1、背景 《感士不遇賦并序》是東晉詩人陶淵明創作的一篇抒發懷才不遇之慨的辭賦作品。受董仲舒《士不遇賦》和司馬遷《悲士不遇賦》啟發&#xff0c;陶淵明借古喻今&#xff0c;批判“真風告逝&#xff0c;大偽斯興”的亂世。社會批判?以“密網裁而魚駭&#xff0c;宏羅制而鳥…

Spring Cloud Gateway 全面學習指南

Spring Cloud Gateway 全面學習指南 學習目錄 第一部分&#xff1a;基礎概念與核心架構 API網關概述與Spring Cloud Gateway簡介Spring Cloud Gateway核心架構與工作原理Spring Cloud Gateway與Zuul的對比分析Spring Cloud Gateway核心組件詳解 第二部分&#xff1a;基礎配…

蛋白分析工具和數據庫

UniProt&#xff08;Universal Protein Resource&#xff09;是一個綜合性的蛋白質數據庫&#xff0c;提供了全球范圍內已知的蛋白質序列和功能信息。其中&#xff0c;UniProtKB&#xff08;UniProt Knowledgebase&#xff09;是最核心的組成部分&#xff0c;包含了經過注釋和分…

Docker -- 快速入門

鏡像與容器 當我們使用Docker安裝應用時&#xff0c;Docker會自動搜索并下載應用鏡像&#xff08;image&#xff09;。鏡像不僅包含應用本身&#xff0c;還包含應用運行所需要的環境&#xff0c;配置、系統函數庫。Docker會在運行鏡像時創建一個隔離環境&#xff0c;稱為容器&…

輸入數量未知如何設置輸入

在 C 的算法題中&#xff0c;如果你不知道輸入數據有多少組&#xff08;即測試用例的數量未知&#xff09;&#xff0c;通常的處理方式是使用 循環讀取輸入直到文件結束 &#xff08;EOF&#xff09;。這類題目常見于在線評測系統&#xff08;如 LeetCode、牛客網、POJ 等&…

如何在Windows上使用qemu安裝ubuntu24.04服務器?

2025年6月15日&#xff0c;周日晚上 在Windows上使用QEMU安裝Ubuntu 24.04需要完成環境配置、鏡像準備、虛擬機創建及系統安裝等步驟。以下是綜合多個搜索結果后的詳細指南&#xff1a; 1. 安裝QEMU環境 下載QEMU Windows版 從QEMU官網下載64位安裝包&#xff08;如qemu-w64-s…

前端開發面試題總結-vue2框架篇(二)

Vue2高頻問答 一、為什么 Vue 的 data 屬性必須聲明為返回一個初始數據的函數? 回答重點&#xff1a; Vue 的 data 屬性聲明成一個返回初始數據的函數&#xff0c;是為了確保每個組件實例都有獨立的狀態。通過這種方式&#xff0c;避免了組件使用相同的數據對象導致的狀態共…

Web第二次方向考核復盤

一、簡答題 1. &#xff08;1&#xff09;為什么要清除浮動&#xff1f; 答&#xff1a;當子元素浮動時會脫離文檔流&#xff0c;父元素無法正確計算子元素高度導致高度、邊框異常顯示。同時會影響后續文檔流布局。 <style>.box1 {border: solid 2px #000;}.child1 {fl…

Linux入門(十八)read函數

read 讀取控制臺輸入 基本語法 read 選項 參數 選項 -p 指定讀取值時的提示符 -t 指定讀取值時等待的時間&#xff08;秒&#xff09;&#xff0c;如果沒有在指定的時間內輸入&#xff0c;就不再等待了 參數 變量&#xff1a;指定讀取值的變量名 實例&#xff1a; 1、讀取控制…

Python 文件操作詳解

文章目錄 Python 文件操作詳解一、文件操作的基本流程二、文件打開模式詳解1. 基本模式2. 擴展模式3. 模式組合示例 三、文件操作方法大全1. 打開和關閉文件2. 讀取文件內容3. 寫入文件內容4. 文件指針操作 四、文件編碼處理五、二進制文件操作六、常見文件操作場景1. 文件內容…

用AI配合MCP快速生成n8n工作流

在數字化時代的浪潮中&#xff0c;AI技術正以前所未有的速度改變著我們的生活和工作方式。從智能家居到智能辦公&#xff0c;從數據分析到自動化流程&#xff0c;AI的應用場景無處不在。今天&#xff0c;我們將帶你走進一個充滿創新與效率的世界&#xff0c;探索如何通過AI大眼…