😁
运维笔记
运维笔记
运维笔记
  • Welcome my notes
  • PYTHON
    • Python 小技巧
      • Python阿里云余额TG报警
      • Python应知小技巧:如何用更少的代码做更多的事情
      • Python 使用缓存功能进行接口性能调优
      • 用pandas新建excel并设置表头
      • RBAC
      • Python读取文件去除回车
      • Python经过OpenSSL获取指定域名对应的SSL证书
      • Python爬取百度指数中的搜索指数
      • Python中反斜杠u类型(uXXXX)字符串转换为Unicode字符串
      • Python两种方式获取SSL证书信息
      • Python 项目环境变量方法
      • PYTHON 获得当前路径
      • Python 自动申请 SSL 证书
      • Python 拆分 URL
      • Python 谷歌令牌
      • Python redis 操作
      • Python 封装 Redis
      • dnspython实现NS记录查询
      • 2.7 版本 telegram 机器人
      • 最全的Python虚拟环境使用方法
      • hasattr、getattr和setattr的使用方法
      • 字符串与字节之间转换
      • 模块-文件共享-SimpleHTTPServer
      • 模块-文本变量-configparser
      • 模块-SSH连接-paramiko
      • HTTPS服务实现
      • 列表骚操作
      • PyMysql
      • 基础语法
      • 终端Print颜色
      • loguru日志库
      • 自动安装Nginx
      • Python3.7源码安装
      • linux 一键安装 conda
      • Pipenv常用的命令
      • 监听服务器的端口
      • 获取证书到期时间
      • 检测域名被墙污染
      • 发送电子邮件信息
      • 发送Telegram信息
      • 输出进度条的图形
      • Cloudflare DNS A记录自动更新脚本
      • Cloudflare-API操作
      • UUID库生成唯一ID
      • 静态方法、普通方法、类方法
      • 循环切片+多线程+消息队列queus
      • 注册 Forms
      • 循环切片+多线程+消息队列queus
      • Python 列表字符串转换整型
      • SQLAlchemy的查询分页和获取总条数
      • 使用shell和python分别实现简单菜单功能
      • 获取checkbox选中状态的两种方式
      • QQ爆红检测
      • 域名备案查询
      • 结合腾讯云发送短信
      • 爬虫神器PyQuery的使用方法
      • Dict 转换
      • 获取证书到期时间
      • 虚拟环境使用
      • 无限级分类的两种实现方式
      • 两个数组交集|并集|差集方法
      • https
      • ​统计代码耗时的几种方法
      • datetime库常用转换
      • datatime库计算当前时间||其他时间运算
      • 监控网站可用性并发送Telegram通知
      • 监控SSL证书可用性并发送Telegram通知
      • 监控端口可用性并发送Telegram通知
      • 自动下载阿里云OSS桶文件
      • 自动上传文件到阿里云OSS
      • 获取cpu,根据cpu数量分配线程数
      • 获取自己的公网IP地址
      • Pyhton检测邮箱是否可用
      • Python使用代理检测域名状态
    • Flask
      • Nginx 业务接口触发拉黑IP
      • 结合uWSGI和Nginx部署flask项目
      • pip错误
      • Flask请求扩展与中间件
      • Flask拦截器
      • Flask-SQLAlchemy批量插入数据性能测试
      • Flask-CeleryExt
      • Flask 级联删除
      • Flask-SQLAlchemy详解
      • Flask + Celery + Redis 异步发送邮件
      • Flask http异常捕获
      • Flask 自定义命令 类似于django的manage.py
      • Flask 项目中解决csrf攻击
      • Flask 视图请求钩子函数
      • 一、Pipenv管理项目
      • 二、摸版
      • 三、处理文件上传
      • 四、 Flask 定时任务
      • 五、REST架构API方法
      • 六、搭建查询IP地址接口
      • 七、Flask+Github触发webhoop接口
      • Flask用paginate实现数据分页
      • Flask 文件流下载
    • Django
      • Djanog admin 有用的设置
      • Django 下 redis 操作
      • Django Ninja
      • Django django-import-export
      • Django Admin自动填充当前用户的示例代码
      • 在Django Admin中为list_filter创建自定义过滤器
      • 1、Django基础一
      • 2、Django基础二
      • 3、Django后台基础用法
      • 4、Django缓存
      • 5、Django日志
      • 6、Django设置csrf_token
      • 7、Django图片上传前端显示
      • 8、Django全文搜索
      • 9、Django Queryset转Json
      • 10、Django开发||生产环境
      • 11、Django邮箱||验证码||登录
      • 12、Django解决扩展用户表时,后台ADMIN显示密码为明文的问题
      • 13、ORM批量添加||更新数据
      • 14、Django分页并前端显示
      • 15、Celery异步任务集成
      • 16、Django获取访问IP地址
      • 17、Django重定向返回上一页
      • 18、Django自定义页面跳转链接
      • 19、利用 django-simpleui 模板在管理后台添加自定义的菜单和自定义的页面、设置访问权限
      • 20、Django导入导出功能
      • 1000、Django错误
      • 21、Django3实现Websocket最简单demo
      • 22、打包django项目成exe文件
      • Vue+websocket+django实现WebSSH demo
      • 24、related_namerelated_query_name 的区别
    • DRF
      • permissions.py源码分析
      • DRF接口 + Vue实现下载文件
      • DRF基础笔记
      • API跨域设置
      • JWT多方式登录及自定义验证
    • Fastapi
      • 运维自动化之域名系统
      • 自定义异常
      • fastapi tortoise-orm 使用一
      • fastapi tortoise-orm 使用二
      • fastapi tortoise-orm 使用三
      • fastapi处理tortoise-orm异常
      • 基于FastAPI和Tortoise-ORM的WebSocket类的封装
      • FastAPI中使用调度程序执行异步任务,与Redis交互
      • Sqlalchemy异步操作
      • 第一个Fastapi
      • FastAPI 中间件
      • FastApi APIRouter引用
      • FastAPI 依赖注入
      • FastAPI 响应体模型及校验
      • FastAPI 项目结构优化
      • FastAPI 文件上传
      • FastAPI 数据库一对一
      • FastAPI 数据库一对多
      • FastAPI 数据库多对多
      • FastAPI 数据库创建
      • FastAPI 内部调用路径
      • FastAPI 请求参数及校验
      • FastAPI 请求模型及校验
      • FastAPI 内部调用路径
      • FastAPI 路径参数及校验
      • FastAPI 路径、请求、请求体综合使用
      • FastAPI 类视图
      • FastAPI 静态文件
      • FastAPI 接口文档配置相关
      • FastAPI 后台任务
      • FastAPI 更新数据
      • FastAPI 根据环境不同连接不同数据库
      • FastAPI 封装接口返回
      • FastAPI 日志
      • FastAPI 封装分页
      • FastAPI 端点调试
      • FastAPI 定制返回Response
      • FastAPI 操作数据库
      • FastAPI 部署 uvicorn + supervisor
      • FastAPI WebSocket
      • FastAPI startup 和 shutdown
      • FastAPI sql 转换 json
      • FastAPI Redis 操作
      • FastAPI OAuth2 认证
      • FastAPI Jwt 认证
      • FastAPI 表单使用
      • FastAPI Docker 方式
      • FastAPI CORS跨域
      • FastAPI Cookie 参数,Header参数
      • fastapi操作异步redis模块aioredis
      • RESTFUL API 访问和刷新令牌
    • PHP
      • thinkphp
        • 留言版系统
  • centos
    • Iptable
      • Firewalld使用ipset快速屏蔽指定国家的IP访问
      • Iptable 使用ipset设置防火墙端口白名单,只让指定国家访问
    • Minio
      • Minio 部署
      • Python 操作 minio
      • 挂载谷歌云盘
    • SSL
      • CentOS下自动申请、部署Let's Encrypt免费SSL证书教程(Nginx亲测)
    • Linux基操
      • 三次握手和四次挥手
      • Linux-性能常用命令
      • 常见DDOS攻击类型
      • Ubuntu配置IP及免密登录
      • Ubuntu 替换阿里云镜像
      • ntpdate 无法同步时间问题
      • linux下redis的使用
      • hey压测工具
      • Linux-Node安装
      • Linux-UFW设置
      • Linux-vsftp
      • Linux-小数点计算
      • Linux-内核升级
      • Linux-终端代理
      • Linux-输出字体颜色
      • Linux-SSH密钥登录
      • Linux-磁盘扩容缩容
      • Linux-设置时间时区
      • Linux-服务器入侵排查
      • Linux-增加Swap方法
      • Linux-vim可视化模式
      • Linux-Crontab定时任务
      • Linux-Supervisor进程管理
      • Linux-处理大量的 TIME_WAIT
      • awk|grep|sed|find
      • find常规用法
      • Linux-排查磁盘IO读写很高
      • Linux-排查CPU只用率很高
      • ubuntu搭建NFS服务
      • Centos7-yum问题
      • ubuntu 24.X 安装 python2.7
    • 科学上网
      • pptp
      • Sock5 代理
      • Goproxy 代理
      • Stunnel 加密 Squid 代理服务
      • MTProxy代理,专注Telegram
      • 使用一键脚本搭建L2TP+IPSec
    • Ansible
      • Ansible 部署 nginx
      • Ansible 部署 Supervisor
      • Ansible 基础笔记
      • 过滤器
      • ansible回调函数使用
      • 如何使用ansible来快速同步目录
      • Ansible 错误
      • Ansible 删除多个文件或目录
      • Ansible Api二次封装
      • Ansible 过滤器
      • Playbook 获取主机组主机数
      • Playbook 部署Squid代理
      • Playbook Debug用法
      • Playbook 部署Node_exporter
      • 批量安装Nginx
      • 安装K8S
      • Ansible如何通过跳板机连接目标机器
    • Git 教程
      • 首次使用
      • Git上传文件卡住无响应
      • Git速查表
      • Git 安装&配置
      • Git 创建仓库
      • Git 基本操作
      • Git 分支管理
      • Git 服务器搭建
      • Git基操-tag
      • Git修改远程仓库地址
      • Git clone速度太慢怎么办
      • Git 修改 tag 内容如何操作
      • Git 大文件上传
      • Github 创建新分支
    • Docker
      • containerd 安装
      • docker 镜像瘦身工具 docker-slim
      • Docker 与 IPtables
      • Page
      • Docker几种安装方式
      • Docker国内镜像加速
      • Docker容器自动启动设置
      • Docker使用Harbor无SSL
      • Docker使用Harbor的API
      • Dockerfile打包镜像优化
      • Docker自定义镜像查看日志方法
      • Dockerfile和docker-compose.yml设置时区
      • Swarm
        • 微服务架构部署问题
        • Swarm 基础命令
        • Swarm 安装使用
        • Swarm 服务版本更新|回滚
      • Docker-compose
        • Docker 镜像自动化部署
        • Prometheus+Grafana监控平台+钉钉报警
        • 基于Alpine构建php7+nginx(2)
        • 基于Alpine构建php7+nginx(1)
        • docker-compose mysql+django
        • docker-compose安装
        • docker compose升级
        • seata单节点或集群
        • 测试常用中间件快速启动
        • 开源监控-hertzbeat
      • Alpine构建镜像
        • 构建java镜像
        • Alpine-Timezone
        • Alpine-Redis
        • Alpine-Python
        • Alpine-Php
        • Alpine-Nginx
        • Alpine-Nginx-定制nginx
        • Alpine-Mysql
      • Page 3
      • Page 2
    • Shell
      • 批量远程执行命令脚本
      • Linux健康检查脚本
      • Page 1
      • 一键生成ssl自签名证书
      • 服务器日常巡检脚本
      • 生成100个随机6位数字
      • 9个实用 shell 脚本
      • 21 个非常实用的 Shell 拿来就用脚本实例
      • shell每秒执行一次
      • Shell脚本自动生成开头注释简介
      • Shell中$#、$0、set等的含义
      • Shell脚本书写规范
      • shell脚本里的变量怎么加一
      • Shell获取当前目录和上级目录
      • Nginx日志切割脚本(按天切割)
      • Redis源码安装脚本
      • Php源码安装脚本
      • Nginx 1.23.3 源码安装
      • Nginx 1.27.1 源码安装
      • MYSQL5.X源码安装脚本
      • Redis源码安装脚本
      • Lnmp各源码安装脚本
      • Linux打印系统配置信息脚本
      • expect交互
      • CentOS系统初始化脚本(适合CentOS 6.X和CentOS 7.X系列)
      • Ubuntu 系统初始化
      • Bash数组
      • 一键测试脚本bench.sh
      • 批量添加用户
      • Ftp-Python上传下载案例
      • Ftp-Mysql数据库全量自动备份删除7天前备份
      • Ftp-Mysql数据库的全量备份和增量备份脚本实例
      • Ftp-Python服务器
      • Shell脚本常用示例
      • Shell多进程模式
      • 管理Firewall防火墙脚本
      • MySQL5.7~8热备份
      • postgresql 库备份
    • Nginx
      • 一文搞定Nginx的压缩、黑白名单、防盗链、零拷贝、跨域、双机热备等知识
      • nginx 一把梭
      • 阿里云ESC的Nginx代理OSS
      • yum命令安装mariadb
      • Tengine安装lua
      • Nginx配置中的if判断
      • Nginx内置变量
      • nginx+php限制某个IP访问
      • Nginx 变量 set 使用方法
      • Nginx 判断值是否为空 设置变量 获取参数
      • lua随机值
      • 利用客户端随机跳转
      • JS代码简单的防封、防屏蔽、防举报、防红页面
      • Ngx_lua
      • WFT
      • 免费申请HTTPS六大方法
      • 502错误
      • Ngx基操
      • Ngx 配置文件实例
      • Ngx跨域解决方法
      • Ngx服务器内核优化
      • Ngx从安装到高可用
      • Ngx反向代理支持WSS
      • Ngx配置用户名密码访问
      • Ngx配置Http(s)|WS|WSS
      • Ngx算法|Rewrite规则|优先级
      • Ngx中websocket服务的配置
      • mp4
      • 跨域设置
      • Ngx 第三方库 ngx_brotli
      • Ngx 反向代理缓存规则
      • Ngx 反向代理禁用缓存
      • Logrotate实现nginx日志切割
    • Tomcat
      • nginx 前端https +tomcat 后端 http 非80、443端口反向代理的配置方式
      • Tomcat 8.x基于Redis Session会话保持
    • Keepalived
      • 高可用--Nginx+keepalived
      • 高可用-Haproxy+keepalived
      • 高可用-Lvs+Keepalived
    • Mysql
      • yum命令安装mariadb
      • ubuntu 首次安装mysql修改密码
      • 1、Yum安装MySql
      • 2、源码安装MYSQL5.7.21
      • 3、MYSQL主从冷备
      • 4、MYSQL主主热备
      • 5、Xtrabackup全备增备
      • 6、MYSQL管理员密码修改
      • 7、MYSQL字符集设置
      • 8、MYSQL命令整理
      • 9、MySQL数据导出csv格式
      • 10、MySQL根据日期查询数据的sql语句
      • 11、如何优雅备份MySQL?
      • 12、如何在已有的数据库中无损主主备份?
      • 13、PXC集群
      • 14、TIUP TIDB
      • 15、MySQL8.0锁情况排查
      • MYSQL 配置文件常用配置
      • Mysql 错误报错解决方法
      • 记录生产事故数据库被删
      • 压测 SQL 工具
    • Redis
      • Redis基操
      • Redis-cluster监控部署方案
    • Php
      • PHP项目迁移部署错误
      • 查找linux下进程占用CPU过高的原因,以php-fpm为例
    • Vscode
      • vscode实现远程linux服务器上Python开发
    • Prometheus
      • 使用 TLS 加密 Prometheus API 和 UI 端点
      • 使用基本身份验证保护 Prometheus API 和 UI 端点
      • 黑盒
      • prometheus
      • node-exporter https认证
      • 中文资料地址
      • 告警-微信
      • 告警-钉钉
      • 监控-基础指标
      • 监控-自定义指标
      • 黑盒-blackbox_exporter
      • 监控-平台搭建+邮件报警
      • Prometheus 监控 Redis
      • Prometheus 监控 NGINX
      • Prometheus 监控进程
      • PushGateway 数据上报采集
      • Prometheus 将数据远程写入 InfluxDB 存储
      • 外部Prometheus监控k8s集群资源
      • prometheus-Agent服务注册
      • Prometheus-自动发现监控 AWS EC2
      • Prometheus-黑盒blackbox
      • Prometheus-Pushgateway自定义
      • Prometheus-采集MySQL指标
      • Prometheus-采集Redis指标
      • Prometheus-采集Kafka指标
    • Vue
      • Vite解决开发、生产服务器的自动切换
      • js实现60秒倒计时
      • H5页面实现下载文件
      • loading加载动画
      • Vue如何新建一个项目
      • Vue开发菜单权限与按钮权限管理
      • Vue 错误
      • Vue开发必备插件
      • Vue如何新建一个项目
      • vue-router+nginx 非根路径配置方法
      • vue中配置proxy指定api请求地址
      • vue开发----关于字符串去除空格的方法
      • vue表格中动态更新,动态删除,动态添加
      • 项目
        • 1 01.创建 Vite项目并安装 Vscode 插件
        • 1 02.引入ElementPlus和基本使用
        • 1 03.引入windicss工具库和配置,安装代码提示
        • 1 04.引入vue router4路由配置和404页面捕获
        • 1 05.登录页图标引入响应式开发
        • 1 06.结合@apply实现样式抽离
        • 1 07.登录表单验证处理
        • 1 08.引入axios请求库和登录接口交互
        • 1 09.引入cookie存储用户token
        • 1 10.封装请求拦截器和响应拦截器及工具库
        • 1 11.引入vuex状态管理用户信息
        • 1 12.全局路由拦截实现登录判断
        • 1 13.登录功能完善
        • 1 14.退出功能实现
        • 2 01.全局loading进度条实现
        • 2 02.动态页面标题实现
        • 2 03.后台主布局实现
        • 2 04.公共头部开发 样式布局
        • 2 05.公共头部开发 刷新和全屏
        • 2 06.公共头部开发 修改密码
        • 2 07.封装通用弹框表单组件
        • 2 08.封装组合式api简化代码
        • 2 09.侧边菜单开发 样式布局和路由跳转
        • 2 10.展开和收起菜单功能实现
        • 2 11.菜单选中和路由关联
        • 2 12.根据菜单动态添加路由
        • 2 13.封装标签导航组件实现
        • 页面缓存实现
        • 2 15.transition全局过渡动画
        • 2 16.统计面板组件开发
        • 2 17.数字滚动动画实现
        • 2 18.分类组件开发和跳转
        • 2 19.echarts图表组件开发和交互
        • 2 20.店铺和交易提示组件开发和交互
        • 2 21.v permission指令按钮级权限控制
        • 2 22.封装上传多图组件功能实现
        • 2 23.公告栏模块Curd操作
        • 2 24.封装组合式API特性 列表分页搜索增删改
        • 2 25.封装自定义下拉图标组件
    • Bootstrap
      • jQuery判断数组中是否存在某个值的方法
      • jQuery 判断数组中是否包含某个值
      • jQuery checkbox选中和不选中的值_设置checkbox选中状态
      • BootStrap中关于Select下拉框选择触发事件
    • Zabbix
      • Zabbix_Agent
      • PY发送钉钉通知
      • 部署zabbix脚本
      • SHELL发送邮件
      • NGINX状态监控
      • Zabbix模板
    • CICD
      • Pipeline
        • Docker 容器服务重启
        • Docker 镜像打包发布回滚
      • Jenkins+Ansible-playbook自动发布回滚
      • Jenkins、GitLab部署
      • Docker+Nginx+Jenkins+GitLab实现前端自动化部署
      • Jenkins 版本回滚
      • Jenkins 自动化
      • GitLab
        • GitLab 安装
        • GitLab 不同版本迁移
        • GitLab 如何设置中文
    • Email 自建
      • mailcow
      • iRedMail 更改 Mail 域
      • poste.io
  • 消息队列
    • 消息队列选型
  • ES
    • 监控输出到ES错误日志告警
    • filebeat收集java日志
    • filebeat 快速安装
    • ELK配置之,filebeat更改自定义索引名称
    • ELK-Kafka-Filebeat
    • Docker 部署 3 节点 ES 集群
    • ElasticSearch Python操作
    • ElasticSearch常规操作
    • ElasticSearch 7.7.0(单机版)+ Ik 分词器 + ES-head 可视化插件
    • ES 常见错误
    • Grafana+ES+Nginx
    • ES-自动删除7天前索引日志
  • Ubuntu
    • Linux时间与系统时间相差8小时的解决办法
    • Ubuntu 重启网卡的三种方法
    • Ubuntu 网卡配置为静态方法
  • Java
  • 😘Kubernetes
    • k3s
      • K3s集群安装
      • Longhorn 分布式存储
      • kubesphere 管理界面
    • 常用 YAML 模板
      • external-mysql
      • cluster-nacos
      • cluster-xxl-job-admin
      • cluster-seata
      • singlenode-es
      • singlenode-mysql
      • storage-mysql
      • singlenode-rabbitmq
      • singlenode-redis
      • singlenode-sentinel
    • Rancher
      • Rke集群
      • RKE1.5.7安装集群
    • Etcd
      • Docker-单节点单Etcd部署
      • Docker-单节点多Etcd部署
      • Docker-多节点Etcd部署
      • CronJob资源控制器进行定时备份
      • 生产环境ETCD高可用集群
    • Ceph
      • Docker-单节点,多OSD集群
      • Ansible-ceph集群
      • Docker-ceph集群
    • k8s
      • kubernetes 1.23.6
      • kubesphere
      • 使用kubeadm搭建高可用的K8s集群
      • 使用kubeadm快速部署一个K8s集群
      • Rancher+k3s
      • k3s执行helm命令报错Error Kubernetes cluster unreachable Get “httplocalhost8080versiontimeout=32s“
      • 尚硅谷k8s课堂随笔
      • kubernetes学习随笔
      • 问题
      • k8s清除环境脚本
      • Minikube单机版k8s实验环境
      • 常用中间件快速启动
      • kubeadm单机版k8s测试部署
      • kubeadm生产环节高可用部署
      • 跨VPC网络K8S
        • k8s无法删除namespace
        • 跨VPC网络-工具安装
        • 跨VPC网络-二进制ETCD集群
        • 跨VPC网络-使用 kubeadm 创建集群(v1.24)
        • 部署 metrics-server
      • K8s证书考试
    • Helm
      • Helm 安装 MongoDB-分片集群
      • Helm 安装 MongoDB-副本集群
      • helm 安装 rocketmq
      • helm 安装 MongoDB 集群
      • Helm 安装 Redis 集群
      • Helm 安装 Redis 哨兵主从高可用
      • Helm 安装
      • Helm安装Kafka
      • Helm同时部署多个域名
      • Helm内置对象和摸版语言
      • 如何使用github作为Helm的chart仓库
      • Helm 安装 Kubernetes 监控套件
    • 错误记录
      • kubelet启动报错
  • Go
    • 学习笔记
      • 1、Go环境安装
      • 2、Go目录结构及包管理
      • 3、Go的编译和运行
      • Gin 基础
      • Gin 项目实战
      • Go 基础
      • Gorm 基础
      • Go中&与的区别以及使用
      • myblog
    • 视频切片
    • 面试
      • 灵魂拷问
      • 面试稳了
      • 自己经历的面试问题总结
      • K线、均线、趋势、形态、N型反转
    • 错误
    • 小工具
      • 其他工具列表
      • 性能压力测试小工具 wrk
    • AWS
      • CDN缓存刷新
Powered by GitBook
On this page
  • 运行节点
  • 安装依赖
  • 节点检查
  • 设置仓库
  • 安装版本
  • 如何升级
  • values.yaml 示例
  1. Kubernetes
  2. k3s

Longhorn 分布式存储

version: 1.6.2

  • 默认会使用所有可用节点的空间

  • 默认会部署相关组件到所有可用节点上

  • 这里我们采用 指定节点只做存储,不允许不相关的 Pod 调度

运行节点

专门 3 台服务器,做数据存储

打上标签和污点,node选择器、容忍度

kubectl taint nodes <node> Longhorn=true:NoSchedule
kubectl label nodes <node> node.longhorn.io/create-default-disk=true

安装依赖

所有节点

yum install -y iscsi-initiator-utils nfs-utils jq

节点检查

# 节点检查需要存在找个临时目录
mkdir /tmp/longhorn-environment-check 
mkdir /var/lib/longhorn/engine-binaries/longhornio-longhorn-engine-v1.6.2 -p
mkdir /var/lib/longhorn/unix-domain-socket/ -p
curl -sSfL https://raw.githubusercontent.com/longhorn/longhorn/v1.2.3/scripts/environment_check.sh | bash

设置仓库

helm repo add longhorn https://charts.longhorn.io
helm repo update

安装版本

values.yaml 配置修改, 在本文最下方

helm pull longhorn/longhorn --version 1.6.2
helm install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace --version 1.6.2 -f longhorn/values.yaml 
kubectl -n longhorn-system get pod

如何升级

helm upgrade  longhorn longhorn/longhorn --version 1.6.2  -n longhorn-system -f longhorn/values.yaml

values.yaml 示例

global:
  cattle:
    # -- Default system registry.
    systemDefaultRegistry: ""
    windowsCluster:
      # -- Setting that allows Longhorn to run on a Rancher Windows cluster.
      enabled: false
      # -- Toleration for Linux nodes that can run user-deployed Longhorn components.
      tolerations:
        - key: "cattle.io/os"
          value: "linux"
          effect: "NoSchedule"
          operator: "Equal"
      # -- Node selector for Linux nodes that can run user-deployed Longhorn components.
      nodeSelector:
        kubernetes.io/os: "linux"
      defaultSetting:
        # -- Toleration for system-managed Longhorn components.
        taintToleration: cattle.io/os=linux:NoSchedule
        # -- Node selector for system-managed Longhorn components.
        systemManagedComponentsNodeSelector: kubernetes.io/os:linux

networkPolicies:
  # -- Setting that allows you to enable network policies that control access to Longhorn pods.
  enabled: false
  # -- Distribution that determines the policy for allowing access for an ingress. (Options: "k3s", "rke2", "rke1")
  type: "k3s"

image:
  longhorn:
    engine:
      # -- Repository for the Longhorn Engine image.
      repository: longhornio/longhorn-engine
      # -- Specify Longhorn engine image tag
      tag: v1.6.2
    manager:
      # -- Repository for the Longhorn Manager image.
      repository: longhornio/longhorn-manager
      # -- Specify Longhorn manager image tag
      tag: v1.6.2
    ui:
      # -- Repository for the Longhorn UI image.
      repository: longhornio/longhorn-ui
      # -- Specify Longhorn ui image tag
      tag: v1.6.2
    instanceManager:
      # -- Repository for the Longhorn Instance Manager image.
      repository: longhornio/longhorn-instance-manager
      # -- Specify Longhorn instance manager image tag
      tag: v1.6.2
    shareManager:
      # -- Repository for the Longhorn Share Manager image.
      repository: longhornio/longhorn-share-manager
      # -- Specify Longhorn share manager image tag
      tag: v1.6.2
    backingImageManager:
      # -- Repository for the Backing Image Manager image. When unspecified, Longhorn uses the default value.
      repository: longhornio/backing-image-manager
      # -- Specify Longhorn backing image manager image tag
      tag: v1.6.2
    supportBundleKit:
      # -- Repository for the Longhorn Support Bundle Manager image.
      repository: longhornio/support-bundle-kit
      # -- Tag for the Longhorn Support Bundle Manager image.
      tag: v0.0.37
  csi:
    attacher:
      # -- Repository for the CSI attacher image. When unspecified, Longhorn uses the default value.
      repository: longhornio/csi-attacher
      # -- Tag for the CSI attacher image. When unspecified, Longhorn uses the default value.
      tag: v4.5.1
    provisioner:
      # -- Repository for the CSI Provisioner image. When unspecified, Longhorn uses the default value.
      repository: longhornio/csi-provisioner
      # -- Tag for the CSI Provisioner image. When unspecified, Longhorn uses the default value.
      tag: v3.6.4
    nodeDriverRegistrar:
      # -- Repository for the CSI Node Driver Registrar image. When unspecified, Longhorn uses the default value.
      repository: longhornio/csi-node-driver-registrar
      # -- Tag for the CSI Node Driver Registrar image. When unspecified, Longhorn uses the default value.
      tag: v2.9.2
    resizer:
      # -- Repository for the CSI Resizer image. When unspecified, Longhorn uses the default value.
      repository: longhornio/csi-resizer
      # -- Tag for the CSI Resizer image. When unspecified, Longhorn uses the default value.
      tag: v1.10.1
    snapshotter:
      # -- Repository for the CSI Snapshotter image. When unspecified, Longhorn uses the default value.
      repository: longhornio/csi-snapshotter
      # -- Tag for the CSI Snapshotter image. When unspecified, Longhorn uses the default value.
      tag: v6.3.4
    livenessProbe:
      # -- Repository for the CSI liveness probe image. When unspecified, Longhorn uses the default value.
      repository: longhornio/livenessprobe
      # -- Tag for the CSI liveness probe image. When unspecified, Longhorn uses the default value.
      tag: v2.12.0
  openshift:
    oauthProxy:
      # -- Repository for the OAuth Proxy image. This setting applies only to OpenShift users.
      repository: longhornio/openshift-origin-oauth-proxy
      # -- Tag for the OAuth Proxy image. This setting applies only to OpenShift users. Specify OCP/OKD version 4.1 or later. The latest stable version is 4.14.
      tag: 4.14
  # -- Image pull policy that applies to all user-deployed Longhorn components, such as Longhorn Manager, Longhorn driver, and Longhorn UI.
  pullPolicy: IfNotPresent

service:
  ui:
    # -- Service type for Longhorn UI. (Options: "ClusterIP", "NodePort", "LoadBalancer", "Rancher-Proxy")
    type: ClusterIP
    # -- NodePort port number for Longhorn UI. When unspecified, Longhorn selects a free port between 30000 and 32767.
    nodePort: null
  manager:
    # -- Service type for Longhorn Manager.
    type: ClusterIP
    # -- NodePort port number for Longhorn Manager. When unspecified, Longhorn selects a free port between 30000 and 32767.
    nodePort: ""

persistence:
  # -- Setting that allows you to specify the default Longhorn StorageClass.
  defaultClass: true
  # -- Filesystem type of the default Longhorn StorageClass.
  defaultFsType: ext4
  # -- mkfs parameters of the default Longhorn StorageClass.
  defaultMkfsParams: ""
  # -- Replica count of the default Longhorn StorageClass.
  defaultClassReplicaCount: 3
  # -- Data locality of the default Longhorn StorageClass. (Options: "disabled", "best-effort")
  defaultDataLocality: disabled
  # -- Reclaim policy that provides instructions for handling of a volume after its claim is released. (Options: "Retain", "Delete")
  reclaimPolicy: Delete
  # -- Setting that allows you to enable live migration of a Longhorn volume from one node to another.
  migratable: false
  # -- Set NFS mount options for Longhorn StorageClass for RWX volumes
  nfsOptions: ""
  recurringJobSelector:
    # -- Setting that allows you to enable the recurring job selector for a Longhorn StorageClass.
    enable: false
    # -- Recurring job selector for a Longhorn StorageClass. Ensure that quotes are used correctly when specifying job parameters. (Example: `[{"name":"backup", "isGroup":true}]`)
    jobList: []
  backingImage:
    # -- Setting that allows you to use a backing image in a Longhorn StorageClass.
    enable: false
    # -- Backing image to be used for creating and restoring volumes in a Longhorn StorageClass. When no backing images are available, specify the data source type and parameters that Longhorn can use to create a backing image.
    name: ~
    # -- Data source type of a backing image used in a Longhorn StorageClass.
    # If the backing image exists in the cluster, Longhorn uses this setting to verify the image.
    # If the backing image does not exist, Longhorn creates one using the specified data source type.
    dataSourceType: ~
    # -- Data source parameters of a backing image used in a Longhorn StorageClass.
    # You can specify a JSON string of a map. (Example: `'{\"url\":\"https://backing-image-example.s3-region.amazonaws.com/test-backing-image\"}'`)
    dataSourceParameters: ~
    # -- Expected SHA-512 checksum of a backing image used in a Longhorn StorageClass.
    expectedChecksum: ~
  defaultNodeSelector:
    # -- Setting that allows you to enable the node selector for the default Longhorn StorageClass.
    enable: false
    # -- Node selector for the default Longhorn StorageClass. Longhorn uses only nodes with the specified tags for storing volume data. (Examples: "storage,fast")
    selector: ""
  # -- Setting that allows you to enable automatic snapshot removal during filesystem trim for a Longhorn StorageClass. (Options: "ignored", "enabled", "disabled")
  removeSnapshotsDuringFilesystemTrim: ignored

preUpgradeChecker:
  # -- Setting that allows Longhorn to perform pre-upgrade checks. Disable this setting when installing Longhorn using Argo CD or other GitOps solutions.
  jobEnabled: true
  # -- Setting that allows Longhorn to perform upgrade version checks after starting the Longhorn Manager DaemonSet Pods. Disabling this setting also disables `preUpgradeChecker.jobEnabled`. Longhorn recommends keeping this setting enabled.
  upgradeVersionCheck: true

csi:
  # -- kubelet root directory. When unspecified, Longhorn uses the default value.
  kubeletRootDir: ~
  # -- Replica count of the CSI Attacher. When unspecified, Longhorn uses the default value ("3").
  attacherReplicaCount: ~
  # -- Replica count of the CSI Provisioner. When unspecified, Longhorn uses the default value ("3").
  provisionerReplicaCount: ~
  # -- Replica count of the CSI Resizer. When unspecified, Longhorn uses the default value ("3").
  resizerReplicaCount: ~
  # -- Replica count of the CSI Snapshotter. When unspecified, Longhorn uses the default value ("3").
  snapshotterReplicaCount: ~

defaultSettings:
  # -- Endpoint used to access the backupstore. (Options: "NFS", "CIFS", "AWS", "GCP", "AZURE")
  backupTarget: ~
  # -- Name of the Kubernetes secret associated with the backup target.
  backupTargetCredentialSecret: ~
  # -- Setting that allows Longhorn to automatically attach a volume and create snapshots or backups when recurring jobs are run.
  allowRecurringJobWhileVolumeDetached: ~
  # -- Setting that allows Longhorn to automatically create a default disk only on nodes with the label "node.longhorn.io/create-default-disk=true" (if no other disks exist). When this setting is disabled, Longhorn creates a default disk on each node that is added to the cluster.
  createDefaultDiskLabeledNodes: true
  # -- Default path for storing data on a host. The default value is "/var/lib/longhorn/".
  defaultDataPath: /var/lib/longhorn
  # -- Default data locality. A Longhorn volume has data locality if a local replica of the volume exists on the same node as the pod that is using the volume.
  defaultDataLocality: ~
  # -- Setting that allows scheduling on nodes with healthy replicas of the same volume. This setting is disabled by default.
  replicaSoftAntiAffinity: ~
  # -- Setting that automatically rebalances replicas when an available node is discovered.
  replicaAutoBalance: ~
  # -- Percentage of storage that can be allocated relative to hard drive capacity. The default value is "100".
  storageOverProvisioningPercentage: ~
  # -- Percentage of minimum available disk capacity. When the minimum available capacity exceeds the total available capacity, the disk becomes unschedulable until more space is made available for use. The default value is "25".
  storageMinimalAvailablePercentage: ~
  # -- Percentage of disk space that is not allocated to the default disk on each new Longhorn node.
  storageReservedPercentageForDefaultDisk: ~
  # -- Upgrade Checker that periodically checks for new Longhorn versions. When a new version is available, a notification appears on the Longhorn UI. This setting is enabled by default
  upgradeChecker: ~
  # -- Default number of replicas for volumes created using the Longhorn UI. For Kubernetes configuration, modify the `numberOfReplicas` field in the StorageClass. The default value is "3".
  defaultReplicaCount: ~
  # -- Default Longhorn StorageClass. "storageClassName" is assigned to PVs and PVCs that are created for an existing Longhorn volume. "storageClassName" can also be used as a label, so it is possible to use a Longhorn StorageClass to bind a workload to an existing PV without creating a Kubernetes StorageClass object. The default value is "longhorn-static".
  defaultLonghornStaticStorageClass: ~
  # -- Number of seconds that Longhorn waits before checking the backupstore for new backups. The default value is "300". When the value is "0", polling is disabled.
  backupstorePollInterval: ~
  # -- Number of minutes that Longhorn keeps a failed backup resource. When the value is "0", automatic deletion is disabled.
  failedBackupTTL: ~
  # -- Setting that restores recurring jobs from a backup volume on a backup target and creates recurring jobs if none exist during backup restoration.
  restoreVolumeRecurringJobs: ~
  # -- Maximum number of successful recurring backup and snapshot jobs to be retained. When the value is "0", a history of successful recurring jobs is not retained.
  recurringSuccessfulJobsHistoryLimit: ~
  # -- Maximum number of failed recurring backup and snapshot jobs to be retained. When the value is "0", a history of failed recurring jobs is not retained.
  recurringFailedJobsHistoryLimit: ~
  # -- Maximum number of snapshots or backups to be retained.
  recurringJobMaxRetention: ~
  # -- Maximum number of failed support bundles that can exist in the cluster. When the value is "0", Longhorn automatically purges all failed support bundles.
  supportBundleFailedHistoryLimit: ~
  # -- Taint or toleration for system-managed Longhorn components.
  # Specify values using a semicolon-separated list in `kubectl taint` syntax (Example: key1=value1:effect; key2=value2:effect).
  taintToleration: Longhorn=true:NoSchedule
  # -- Node selector for system-managed Longhorn components.
  systemManagedComponentsNodeSelector: "node.longhorn.io/create-default-disk:true"
  # -- PriorityClass for system-managed Longhorn components.
  # This setting can help prevent Longhorn components from being evicted under Node Pressure.
  # Notice that this will be applied to Longhorn user-deployed components by default if there are no priority class values set yet, such as `longhornManager.priorityClass`.
  priorityClass: &defaultPriorityClassNameRef "longhorn-critical"
  # -- Setting that allows Longhorn to automatically salvage volumes when all replicas become faulty (for example, when the network connection is interrupted). Longhorn determines which replicas are usable and then uses these replicas for the volume. This setting is enabled by default.
  autoSalvage: ~
  # -- Setting that allows Longhorn to automatically delete a workload pod that is managed by a controller (for example, daemonset) whenever a Longhorn volume is detached unexpectedly (for example, during Kubernetes upgrades). After deletion, the controller restarts the pod and then Kubernetes handles volume reattachment and remounting.
  autoDeletePodWhenVolumeDetachedUnexpectedly: ~
  # -- Setting that prevents Longhorn Manager from scheduling replicas on a cordoned Kubernetes node. This setting is enabled by default.
  disableSchedulingOnCordonedNode: ~
  # -- Setting that allows Longhorn to schedule new replicas of a volume to nodes in the same zone as existing healthy replicas. Nodes that do not belong to any zone are treated as existing in the zone that contains healthy replicas. When identifying zones, Longhorn relies on the label "topology.kubernetes.io/zone=<Zone name of the node>" in the Kubernetes node object.
  replicaZoneSoftAntiAffinity: ~
  # -- Setting that allows scheduling on disks with existing healthy replicas of the same volume. This setting is enabled by default.
  replicaDiskSoftAntiAffinity: ~
  # -- Policy that defines the action Longhorn takes when a volume is stuck with a StatefulSet or Deployment pod on a node that failed.
  nodeDownPodDeletionPolicy: ~
  # -- Policy that defines the action Longhorn takes when a node with the last healthy replica of a volume is drained.
  nodeDrainPolicy: ~
  # -- Setting that allows automatic detaching of manually-attached volumes when a node is cordoned.
  detachManuallyAttachedVolumesWhenCordoned: ~
  # -- Number of seconds that Longhorn waits before reusing existing data on a failed replica instead of creating a new replica of a degraded volume.
  replicaReplenishmentWaitInterval: ~
  # -- Maximum number of replicas that can be concurrently rebuilt on each node.
  concurrentReplicaRebuildPerNodeLimit: ~
  # -- Maximum number of volumes that can be concurrently restored on each node using a backup. When the value is "0", restoration of volumes using a backup is disabled.
  concurrentVolumeBackupRestorePerNodeLimit: ~
  # -- Setting that disables the revision counter and thereby prevents Longhorn from tracking all write operations to a volume. When salvaging a volume, Longhorn uses properties of the "volume-head-xxx.img" file (the last file size and the last time the file was modified) to select the replica to be used for volume recovery. This setting applies only to volumes created using the Longhorn UI.
  disableRevisionCounter: ~
  # -- Image pull policy for system-managed pods, such as Instance Manager, engine images, and CSI Driver. Changes to the image pull policy are applied only after the system-managed pods restart.
  systemManagedPodsImagePullPolicy: ~
  # -- Setting that allows you to create and attach a volume without having all replicas scheduled at the time of creation.
  allowVolumeCreationWithDegradedAvailability: ~
  # -- Setting that allows Longhorn to automatically clean up the system-generated snapshot after replica rebuilding is completed.
  autoCleanupSystemGeneratedSnapshot: ~
  # -- Setting that allows Longhorn to automatically clean up the snapshot generated by a recurring backup job.
  autoCleanupRecurringJobBackupSnapshot: ~
  # -- Maximum number of engines that are allowed to concurrently upgrade on each node after Longhorn Manager is upgraded. When the value is "0", Longhorn does not automatically upgrade volume engines to the new default engine image version.
  concurrentAutomaticEngineUpgradePerNodeLimit: ~
  # -- Number of minutes that Longhorn waits before cleaning up the backing image file when no replicas in the disk are using it.
  backingImageCleanupWaitInterval: ~
  # -- Number of seconds that Longhorn waits before downloading a backing image file again when the status of all image disk files changes to "failed" or "unknown".
  backingImageRecoveryWaitInterval: ~
  # -- Percentage of the total allocatable CPU resources on each node to be reserved for each instance manager pod when the V1 Data Engine is enabled. The default value is "12".
  guaranteedInstanceManagerCPU: ~
  # -- Setting that notifies Longhorn that the cluster is using the Kubernetes Cluster Autoscaler.
  kubernetesClusterAutoscalerEnabled: ~
  # -- Setting that allows Longhorn to automatically delete an orphaned resource and the corresponding data (for example, stale replicas). Orphaned resources on failed or unknown nodes are not automatically cleaned up.
  orphanAutoDeletion: ~
  # -- Storage network for in-cluster traffic. When unspecified, Longhorn uses the Kubernetes cluster network.
  storageNetwork: ~
  # -- Flag that prevents accidental uninstallation of Longhorn.
  deletingConfirmationFlag: ~
  # -- Timeout between the Longhorn Engine and replicas. Specify a value between "8" and "30" seconds. The default value is "8".
  engineReplicaTimeout: ~
  # -- Setting that allows you to enable and disable snapshot hashing and data integrity checks.
  snapshotDataIntegrity: ~
  # -- Setting that allows disabling of snapshot hashing after snapshot creation to minimize impact on system performance.
  snapshotDataIntegrityImmediateCheckAfterSnapshotCreation: ~
  # -- Setting that defines when Longhorn checks the integrity of data in snapshot disk files. You must use the Unix cron expression format.
  snapshotDataIntegrityCronjob: ~
  # -- Setting that allows Longhorn to automatically mark the latest snapshot and its parent files as removed during a filesystem trim. Longhorn does not remove snapshots containing multiple child files.
  removeSnapshotsDuringFilesystemTrim: ~
  # -- Setting that allows fast rebuilding of replicas using the checksum of snapshot disk files. Before enabling this setting, you must set the snapshot-data-integrity value to "enable" or "fast-check".
  fastReplicaRebuildEnabled: ~
  # -- Number of seconds that an HTTP client waits for a response from a File Sync server before considering the connection to have failed.
  replicaFileSyncHttpClientTimeout: ~
  # -- Log levels that indicate the type and severity of logs in Longhorn Manager. The default value is "Info". (Options: "Panic", "Fatal", "Error", "Warn", "Info", "Debug", "Trace")
  logLevel: ~
  # -- Setting that allows you to specify a backup compression method.
  backupCompressionMethod: ~
  # -- Maximum number of worker threads that can concurrently run for each backup.
  backupConcurrentLimit: ~
  # -- Maximum number of worker threads that can concurrently run for each restore operation.
  restoreConcurrentLimit: ~
  # -- Setting that allows you to enable the V1 Data Engine.
  v1DataEngine: ~
  # -- Setting that allows you to enable the V2 Data Engine, which is based on the Storage Performance Development Kit (SPDK). The V2 Data Engine is a preview feature and should not be used in production environments.
  v2DataEngine: ~
  # -- Setting that allows you to configure maximum huge page size (in MiB) for the V2 Data Engine.
  v2DataEngineHugepageLimit: ~
  # -- Setting that allows rebuilding of offline replicas for volumes using the V2 Data Engine.
  offlineReplicaRebuilding: ~
  # -- Number of millicpus on each node to be reserved for each Instance Manager pod when the V2 Data Engine is enabled. The default value is "1250".
  v2DataEngineGuaranteedInstanceManagerCPU: ~
  # -- Setting that allows scheduling of empty node selector volumes to any node.
  allowEmptyNodeSelectorVolume: ~
  # -- Setting that allows scheduling of empty disk selector volumes to any disk.
  allowEmptyDiskSelectorVolume: ~
  # -- Setting that allows Longhorn to periodically collect anonymous usage data for product improvement purposes. Longhorn sends collected data to the [Upgrade Responder](https://github.com/longhorn/upgrade-responder) server, which is the data source of the Longhorn Public Metrics Dashboard (https://metrics.longhorn.io). The Upgrade Responder server does not store data that can be used to identify clients, including IP addresses.
  allowCollectingLonghornUsageMetrics: ~
  # -- Setting that temporarily prevents all attempts to purge volume snapshots.
  disableSnapshotPurge: ~
  # -- Maximum snapshot count for a volume. The value should be between 2 to 250
  snapshotMaxCount: ~

privateRegistry:
  # -- Setting that allows you to create a private registry secret.
  createSecret: ~
  # -- URL of a private registry. When unspecified, Longhorn uses the default system registry.
  registryUrl: ~
  # -- User account used for authenticating with a private registry.
  registryUser: ~
  # -- Password for authenticating with a private registry.
  registryPasswd: ~
  # -- Kubernetes secret that allows you to pull images from a private registry. This setting applies only when creation of private registry secrets is enabled. You must include the private registry name in the secret name.
  registrySecret: ~

longhornManager:
  log:
    # -- Format of Longhorn Manager logs. (Options: "plain", "json")
    format: plain
  # -- PriorityClass for Longhorn Manager.
  priorityClass: *defaultPriorityClassNameRef
  # -- Toleration for Longhorn Manager on nodes allowed to run Longhorn Manager.
  tolerations:
    - key: "Longhorn"
      operator: "Equal"
      value: "true"
      effect: "NoSchedule"
  ## If you want to set tolerations for Longhorn Manager DaemonSet, delete the `[]` in the line above
  ## and uncomment this example block
  # - key: "key"
  #   operator: "Equal"
  #   value: "value"
  #   effect: "NoSchedule"
  # -- Node selector for Longhorn Manager. Specify the nodes allowed to run Longhorn Manager.
  nodeSelector:
    node.longhorn.io/create-default-disk: "true"
  ## If you want to set node selector for Longhorn Manager DaemonSet, delete the `{}` in the line above
  ## and uncomment this example block
  #  label-key1: "label-value1"
  #  label-key2: "label-value2"
  # -- Annotation for the Longhorn Manager service.
  serviceAnnotations: {}
  ## If you want to set annotations for the Longhorn Manager service, delete the `{}` in the line above
  ## and uncomment this example block
  #  annotation-key1: "annotation-value1"
  #  annotation-key2: "annotation-value2"

longhornDriver:
  # -- PriorityClass for Longhorn Driver.
  priorityClass: *defaultPriorityClassNameRef
  # -- Toleration for Longhorn Driver on nodes allowed to run Longhorn components.
  tolerations:
    - key: "Longhorn"
      operator: "Equal"
      value: "true"
      effect: "NoSchedule"
  ## If you want to set tolerations for Longhorn Driver Deployer Deployment, delete the `[]` in the line above
  ## and uncomment this example block
  # - key: "key"
  #   operator: "Equal"
  #   value: "value"
  #   effect: "NoSchedule"
  # -- Node selector for Longhorn Driver. Specify the nodes allowed to run Longhorn Driver.
  nodeSelector:
    node.longhorn.io/create-default-disk: "true"
  ## If you want to set node selector for Longhorn Driver Deployer Deployment, delete the `{}` in the line above
  ## and uncomment this example block
  #  label-key1: "label-value1"
  #  label-key2: "label-value2"

longhornUI:
  # -- Replica count for Longhorn UI.
  replicas: 2
  # -- PriorityClass for Longhorn UI.
  priorityClass: *defaultPriorityClassNameRef
  # -- Toleration for Longhorn UI on nodes allowed to run Longhorn components.
  tolerations:
    - key: "Longhorn"
      operator: "Equal"
      value: "true"
      effect: "NoSchedule"
  ## If you want to set tolerations for Longhorn UI Deployment, delete the `[]` in the line above
  ## and uncomment this example block
  # - key: "key"
  #   operator: "Equal"
  #   value: "value"
  #   effect: "NoSchedule"
  # -- Node selector for Longhorn UI. Specify the nodes allowed to run Longhorn UI.
  nodeSelector:
    node.longhorn.io/create-default-disk: "true"
  ## If you want to set node selector for Longhorn UI Deployment, delete the `{}` in the line above
  ## and uncomment this example block
  #  label-key1: "label-value1"
  #  label-key2: "label-value2"

ingress:
  # -- Setting that allows Longhorn to generate ingress records for the Longhorn UI service.
  enabled: true

  # -- IngressClass resource that contains ingress configuration, including the name of the Ingress controller.
  # ingressClassName can replace the kubernetes.io/ingress.class annotation used in earlier Kubernetes releases.
  ingressClassName: ~

  # -- Hostname of the Layer 7 load balancer.
  host: sslip.io

  # -- Setting that allows you to enable TLS on ingress records.
  tls: false

  # -- Setting that allows you to enable secure connections to the Longhorn UI service via port 443.
  secureBackends: false

  # -- TLS secret that contains the private key and certificate to be used for TLS. This setting applies only when TLS is enabled on ingress records.
  tlsSecret: longhorn.local-tls

  # -- Default ingress path. You can access the Longhorn UI by following the full ingress path {{host}}+{{path}}.
  path: /

  ## If you're using kube-lego, you will want to add:
  ## kubernetes.io/tls-acme: true
  ##
  ## For a full list of possible ingress annotations, please see
  ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
  ##
  ## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
  # -- Ingress annotations in the form of key-value pairs.
  annotations:
  #  kubernetes.io/ingress.class: nginx
  #  kubernetes.io/tls-acme: true

  # -- Secret that contains a TLS private key and certificate. Use secrets if you want to use your own certificates to secure ingresses.
  secrets:
  ## If you're providing your own certificates, please use this to add the certificates as secrets
  ## key and certificate should start with -----BEGIN CERTIFICATE----- or
  ## -----BEGIN RSA PRIVATE KEY-----
  ##
  ## name should line up with a tlsSecret set further up
  ## If you're using kube-lego, this is unneeded, as it will create the secret for you if it is not set
  ##
  ## It is also possible to create and manage the certificates outside of this helm chart
  ## Please see README.md for more information
  # - name: longhorn.local-tls
  #   key:
  #   certificate:

# -- Setting that allows you to enable pod security policies (PSPs) that allow privileged Longhorn pods to start. This setting applies only to clusters running Kubernetes 1.25 and earlier, and with the built-in Pod Security admission controller enabled.
enablePSP: false

# -- Specify override namespace, specifically this is useful for using longhorn as sub-chart and its release namespace is not the `longhorn-system`.
namespaceOverride: ""

# -- Annotation for the Longhorn Manager DaemonSet pods. This setting is optional.
annotations: {}

serviceAccount:
  # -- Annotations to add to the service account
  annotations: {}

metrics:
  serviceMonitor:
    # -- Setting that allows the creation of a Prometheus ServiceMonitor resource for Longhorn Manager components.
    enabled: false

## openshift settings
openshift:
  # -- Setting that allows Longhorn to integrate with OpenShift.
  enabled: false
  ui:
    # -- Route for connections between Longhorn and the OpenShift web console.
    route: "longhorn-ui"
    # -- Port for accessing the OpenShift web console.
    port: 443
    # -- Port for proxy that provides access to the OpenShift web console.
    proxy: 8443

# -- Setting that allows Longhorn to generate code coverage profiles.
enableGoCoverDir: false
PreviousK3s集群安装Nextkubesphere 管理界面

Last updated 9 months ago

参考: 参考: :

参考: 参考:

😘
https://www.qikqiak.com/k3s/storage/local/
https://blog.x2b.net/1964569963/#%E5%8A%9F%E8%83%BD%E8%AE%BE%E7%BD%AEsetting
https://mritd.com/2021/03/06/longhorn-storage-test/#3-3%E3%80%81%E5%88%9B%E5%BB%BA%E5%BF%AB%E7%85%A7%E5%8F%8A%E5%9B%9E%E6%BB%9A
https://www.cnblogs.com/hacker-linner/p/15168416.html
https://zhangzhuo.ltd/articles/2022/05/19/1652929973831.html