当前位置:网站首页>KubeSphere 虚拟化 KSV 安装体验
KubeSphere 虚拟化 KSV 安装体验
2022-07-02 06:29:00 【freesharer】
KSV 简介
KubeSphere 虚拟化(KSV) 是一个轻量化的虚拟机管理平台,支持单节点和多节点部署,简单易用,KSV 采用前后端分离的架构,实现了面向云原生的设计,各个模块松耦合设计,作为企业级虚拟化平台,KSV 提供简单易用的 Web 控制台,帮助用户快速实现企业硬件资源的虚拟化。
官方网站:https://kubesphere.cloud/ksv/
KSV 底层原理
KSV 底层基于 K3S
、 Kubevirt
及rook ceph
等技术,底层原理描述如下表所示:
名称 | 描述 |
---|---|
虚拟机 | KSV 底层使用 KubeVirt 插件,支持对虚拟机的生命周期管理、状态管理和连接管理。 |
网络 | KSV 底层使用 Multus 插件,在节点网卡上创建 MacVTap(用于简化虚拟化桥接网络的设备驱动程序)作为虚拟机的网卡。通过设置 IP 池,虚拟机可以与服务器节点在同一个网段中,方便用户的访问。 |
镜像 | KSV 底层使用 CDI 插件将镜像导入到持久卷中,通过持久卷的克隆实现系统盘创建。 |
存储 | KSV 支持与 Kubernetes 的 CSI 插件联动,实现存储相关资源的管理。 |
产品架构图:
KSV 安装
前提条件:
- 服务器节点操作系统版本需要为 Ubuntu 18.04 / Ubuntu 20.04、CentOS 7.9 / CentOS 8.5 ,其他操作系统尚未充分测试,可能存在未知问题。未来将支持更多操作系统。
- 硬件最低配置
4 核/8 GB/系统磁盘100GB
, 推荐配置8 核/16 GB/系统磁盘100 GB
- 服务器节点必须至少额外具有 1 个未格式化且未分区的磁盘,或 1 个未格式化的分区。该磁盘或分区的最低配置为 100 GB,推荐配置为 200 GB。用于rook ceph osd。
- 服务器节点需要支持虚拟化。如果服务器节点不支持虚拟化,KSV 将以模拟模式运行。该模式将占用更多资源,且可能影响性能。如果选择vmware vsphere、vmware workstation、virtualbox虚拟机,需要启用嵌套虚拟化功能,生产环境建议在裸机部署。
安装 KSV:
准备一台Ubuntu 20.04操作系统,采用单节点安装方式。
1、执行以下命令下载安装包(安装包大小约 3.7 GB):
curl -OL https://virtualization.kubesphere.cloud/v1.4.0/kubesphere-virtualization-amd64-v1.4.0.tar.gz
2、执行以下命令解压安装包:
tar -zxvf kubesphere-virtualization-amd64-v1.4.0.tar.gz
3、执行以下命令进入安装包解压后生成的目录:
cd kubesphere-virtualization-amd64
4、执行以下命令开始安装:
./install.sh -a --ratio <超卖比>
参数 --ratio 可选,用于指定 KSV 集群的超卖比,取值为 1 至 4 的整数。如果未设置 --ratio 参数,超卖比默认值为 2。
超卖比将决定 KSV 可创建虚拟机的总数。可创建虚拟机的总数 = 集群 CPU 核心总数 x 超卖比。
5、如果显示如下信息则安装成功:
#####################################################
### Welcome to KubeSphere Virtualization! ###
#####################################################
Console: http://172.16.0.59:30880
Username: admin
Password: [email protected]
NOTE:
Please change the default password of the admin user
after login.
#####################################################
https://kubesphere.cloud/ksv/ 2021-04-29 14:03:45
#####################################################
查看集群节点信息,底层运行k3s及containerd
[email protected]:~# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
ubuntu Ready control-plane,master,worker 13h v1.21.6+k3s1 192.168.72.14 <none> Ubuntu 20.04.4 LTS 5.4.0-113-generic containerd://1.4.11-k3s1
查看创建的Pods,底层运行kubevirt、rook-ceph、prometheus、calico等组件
[email protected]:~/kubesphere-virtualization-amd64# kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
cdi cdi-apiserver-6fd8c49c78-rsdcp 1/1 Running 0 7m6s
cdi cdi-deployment-7c98f568cf-sbds5 1/1 Running 0 7m
cdi cdi-operator-745df7d6f7-zv7pz 1/1 Running 0 7m48s
cdi cdi-uploadproxy-7f644f8cd4-8f2vc 1/1 Running 0 6m56s
default importer-img-zelkv348 0/1 Pending 0 5m
kube-system calico-kube-controllers-5544f8d8d9-v8sn2 1/1 Running 0 13m
kube-system calico-node-ldrzj 1/1 Running 0 13m
kube-system coredns-7448499f4d-sv89f 1/1 Running 0 13m
kube-system kube-multus-ds-amd64-cmrxs 1/1 Running 0 7m51s
kubekey-system kubekey-controller-manager-8b6fbfff5-tcvlj 2/2 Running 0 13m
kubesphere-controls-system default-http-backend-6c6cb9b454-bvfp7 1/1 Running 0 8m23s
kubesphere-controls-system kubectl-admin-86995f5c5-rkrh6 1/1 Running 0 5m
kubesphere-monitoring-system alertmanager-main-0 2/2 Running 0 5m45s
kubesphere-monitoring-system kube-state-metrics-5b9cfc944d-77dwg 3/3 Running 0 5m55s
kubesphere-monitoring-system node-exporter-svknb 2/2 Running 0 5m56s
kubesphere-monitoring-system notification-manager-deployment-57cfc676d8-ghcrl 1/1 Running 0 5m13s
kubesphere-monitoring-system notification-manager-operator-94f799b96-bxvbp 2/2 Running 0 5m21s
kubesphere-monitoring-system prometheus-k8s-0 3/3 Running 1 5m51s
kubesphere-monitoring-system prometheus-operator-68c489748c-jnmj9 2/2 Running 0 5m58s
kubesphere-system ftp-server-6dbf5bff55-c9sgh 1/1 Running 0 7m50s
kubesphere-system ks-apiserver-5bf4bbc657-m7n6q 1/1 Running 0 4m57s
kubesphere-system ks-console-58cf78bb45-9w52f 1/1 Running 0 8m10s
kubesphere-system ks-controller-manager-59fd54bdb8-94jnx 1/1 Running 0 4m57s
kubesphere-system ks-installer-c45748b6f-t6xlx 1/1 Running 0 13m
kubesphere-system minio-576546f95d-rd4mq 1/1 Running 0 11m
kubesphere-system sync-images-job-hxxs8 0/1 Completed 0 7m51s
kubesphere-virtualization-system express-network-agent-79l5t 1/1 Running 0 7m39s
kubesphere-virtualization-system express-network-controller-6c9bd5577c-rtv7m 1/1 Running 0 7m39s
kubevirt virt-api-5c5498b8f4-h4nq4 1/1 Running 0 6m45s
kubevirt virt-api-5c5498b8f4-w5sxg 1/1 Running 0 6m47s
kubevirt virt-controller-64cc9949b8-6ghh5 1/1 Running 0 6m20s
kubevirt virt-controller-64cc9949b8-sd98r 1/1 Running 0 6m19s
kubevirt virt-handler-x5hn7 1/1 Running 0 6m20s
kubevirt virt-operator-74fc8b4f97-6fjqs 1/1 Running 0 7m49s
rook-ceph csi-rbdplugin-provisioner-76d45b5b57-lt7vn 6/6 Running 0 11m
rook-ceph csi-rbdplugin-rmw58 3/3 Running 0 11m
rook-ceph rook-ceph-crashcollector-ubuntu-d575979d4-drl2k 1/1 Running 0 10m
rook-ceph rook-ceph-mgr-a-c7bf4b69b-jvrj4 1/1 Running 0 10m
rook-ceph rook-ceph-mon-a-86cc8985f7-z9jdg 1/1 Running 0 11m
rook-ceph rook-ceph-operator-6457f8c765-cdx82 1/1 Running 0 12m
rook-ceph rook-ceph-osd-0-5b9d4bfc56-67598 1/1 Running 0 10m
rook-ceph rook-ceph-osd-prepare-ubuntu-wt8jq 0/1 Completed 0 10m
rook-ceph rook-ceph-tools-568c5cddd5-fmxtt 1/1 Running 0 12m
rook-ceph rook-discover-hd496 1/1 Running 0 11m
rook-ceph snapshot-controller-0 1/1 Running 0 12m
KSV 创建虚拟机
1、新建IP pool,其中网卡名称及网段需要与集群节点一致
2、上传镜像
默认自带ubuntu 20.04,这里上传 Ubuntu 22.04 LTS cloud image LTS以及windows server 2022镜像:
3、创建以下虚拟机
4、查看linux虚拟机
在unbut虚拟机安装nginx
apt update -y
apt install -y nginx
systemctl status nginx
在集群外可直接访问虚拟机IP地址
5、windows虚拟机创建流程
选择镜像:
选择加载驱动程序
选择驱动程序
开始安装
VNC登录windwos server 2022
边栏推荐
- VS Code配置问题
- Generate database documents with one click, which can be called swagger in the database industry
- TCP/IP—传输层
- Carsim 学习心得-粗略翻译1
- Principes fondamentaux de la théorie musicale (brève introduction)
- 程序猿学英语-Learning C
- Using C language to realize MySQL true paging
- Opencv3 6.3 reduced pixel sampling with filters
- ARP and ARP Spoofing
- Global and Chinese markets of tilting feeders 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
16: 00 interview, came out at 16:08, the question is really too
Sqlyog remote connection to MySQL database under centos7 system
On November 24, we celebrate the "full moon"
HCIA—应用层
c语言自定义类型枚举,联合(枚举的巧妙使用,联合体大小的计算)
C language implements XML generation and parsing library (XML extension)
How to back up the configuration before the idea when reinstalling the idea
ICMP协议
MySQL optimization
Fundamentals of music theory (brief introduction)
随机推荐
Deep understanding of JVM
ICMP Protocol
Summary of one question per day: stack and queue (continuously updated)
STM32-新建工程(参考正点原子)
Pointer initialization
OpenCV关于x,y坐标容易混淆的心得
Rotating linked list (illustration)
Web security -- Logical ultra vires
链表经典面试题(反转链表,中间节点,倒数第k个节点,合并分割链表,删除重复节点)
文件上传-upload-labs
Realization of basic function of sequence table
Valin cable: BI application promotes enterprise digital transformation
Introduction to anti interception technology of wechat domain name
Carsim-問題Failed to start Solver: PATH_ID_OBJ(X) was set to Y; no corresponding value of XXXXX?
Matlab-其它
Opencv common method source link (continuous update)
Media query usage
Global and Chinese market of medicine cabinet 2022-2028: Research Report on technology, participants, trends, market size and share
顺序表基本功能函数的实现
W10 is upgraded to W11 system, but the screen is black, but the mouse and desktop shortcuts can be used. How to solve it