电子书网站 跟我学做家常菜800正规货源网站大全

张小明 2026/3/3 0:25:10
电子书网站 跟我学做家常菜800,正规货源网站大全,电商怎么做如何从零开始视频教学,宝尊代运营一年要多少钱k8s部署 nfs-client-provisioner 是 Kubernetes 中实现 NFS 动态存储供应的核心方式1.NFS 服务端已部署需提前准备一台 NFS 服务器#xff08;如 CentOS/Ubuntu#xff09;#xff0c;并创建共享目录.如果有单独的NFS存储#xff0c;此步骤可忽略。# 1. 安装 NFS 服务…k8s部署nfs-client-provisioner是 Kubernetes 中实现 NFS 动态存储供应的核心方式1.NFS 服务端已部署需提前准备一台 NFS 服务器如 CentOS/Ubuntu并创建共享目录.如果有单独的NFS存储此步骤可忽略。# 1. 安装 NFS 服务以 CentOS 为例 yum install -y nfs-utils rpcbind # 2. 创建共享目录 mkdir -p /kubernetes-nfs # 3. 配置 NFS 共享修改 /etc/exports echo /kubernetes-nfs *(rw,sync,no_root_squash,no_all_squash) /etc/exports # 4. 生效配置并启动服务 exportfs -r systemctl start rpcbind systemctl enable rpcbind systemctl start nfs-server systemctl enable nfs-server # 5. 验证 NFS 共享 showmount -e 本机IP # 输出应包含 /kubernetes-nfs2.K8s 集群节点能访问 NFS 服务端所有 K8s 节点安装 NFS 客户端避免挂载失败# CentOS yum install -y nfs-utils # Ubuntu apt install -y nfs-common3.部署步骤3.1创建命名空间本次使用的是kube-system命名空间可忽略kubectl create ns nfs-deploy3.2创建 ServiceAccount 和 RBAC 权限apiVersion: v1 kind: ServiceAccount metadata: name: nfs-client-provisioner-sa # replace with namespace where provisioner is deployed namespace: kube-system --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: nfs-client-provisioner-runner rules: - apiGroups: [] resources: [persistentvolumes] verbs: [get, list, watch, create, delete] - apiGroups: [] resources: [persistentvolumeclaims] verbs: [get, list, watch, update] - apiGroups: [storage.k8s.io] resources: [storageclasses] verbs: [get, list, watch] - apiGroups: [] resources: [events] verbs: [create, update, patch] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: run-nfs-client-provisioner subjects: - kind: ServiceAccount name: nfs-client-provisioner-sa # replace with namespace where provisioner is deployed namespace: kube-system roleRef: kind: ClusterRole name: nfs-client-provisioner-runner apiGroup: rbac.authorization.k8s.io --- kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: name: leader-locking-nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: kube-system rules: - apiGroups: [] resources: [endpoints] verbs: [get, list, watch, create, update, patch] --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: leader-locking-nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: kube-system subjects: - kind: ServiceAccount name: nfs-client-provisioner-sa # replace with namespace where provisioner is deployed namespace: kube-system roleRef: kind: Role name: leader-locking-nfs-client-provisioner apiGroup: rbac.authorization.k8s.io ---应用配置kubectl apply -f nfs-client-provisioner-rbac.yaml3.3部署 nfs-client-provisioner 应用--- apiVersion: apps/v1 kind: Deployment metadata: name: nfs-client-provisioner labels: app: nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: kube-system spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: nfs-client-provisioner template: metadata: labels: app: nfs-client-provisioner spec: serviceAccountName: nfs-client-provisioner-sa containers: - name: nfs-client-provisioner image: quay.io/external_storage/nfs-client-provisioner:latest volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes env: - name: PROVISIONER_NAME value: choerodon.io/nfs-client-provisioner - name: NFS_SERVER value: 10.10.10.211 - name: NFS_PATH value: /kubernetes_data volumes: - name: nfs-client-root nfs: server: 10.10.10.211 path: /kubernetes_data ---应用配置kubectl apply -f nfs-client-provisioner-deploy.yaml3.4创建 StorageClass存储类--- apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: nfs-cloud provisioner: choerodon.io/nfs-client-provisioner # or choose another name, must match deployments env PROVISIONER_NAME parameters: archiveOnDelete: false reclaimPolicy: Delete # PV 回收策略Delete/Retain volumeBindingMode: Immediate # 立即绑定 PVC 和 PV应用配置kubectl apply -f nfs-client-storageclass.yaml # 可选设置为默认存储类PVC 不指定 storageClassName 时自动使用 kubectl patch storageclass nfs-cloud -p {metadata:{annotations:{storageclass.kubernetes.io/is-default-class:true}}}4.自动执行脚本#!/bin/bash # 安装nfs-storageclass NSkube-system NFS_SERVER_HOST10.10.20.8 # 填写NFS服务器IP地址 NFS_SERVER_PATH/kubernetes-nfs # 填写NFS路径 NFS_PROVISIONER_NAMEnfs-server # 服务供应商标识随便起 NFS_STORAGE_CLASS_NAMEmanaged-nfs-storage # K8S中StorageClass的显示名称随便起 cat EOF /tmp/k8s-init-nfs-storageclass.yaml apiVersion: v1 kind: ServiceAccount metadata: name: nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: ${NS} --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: nfs-client-provisioner-runner rules: - apiGroups: [] resources: [persistentvolumes] verbs: [get, list, watch, create, delete] - apiGroups: [] resources: [persistentvolumeclaims] verbs: [get, list, watch, update] - apiGroups: [storage.k8s.io] resources: [storageclasses] verbs: [get, list, watch] - apiGroups: [] resources: [events] verbs: [create, update, patch] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: run-nfs-client-provisioner subjects: - kind: ServiceAccount name: nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: ${NS} roleRef: kind: ClusterRole name: nfs-client-provisioner-runner apiGroup: rbac.authorization.k8s.io --- kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: name: leader-locking-nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: ${NS} rules: - apiGroups: [] resources: [endpoints] verbs: [get, list, watch, create, update, patch] --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: leader-locking-nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: ${NS} subjects: - kind: ServiceAccount name: nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: ${NS} roleRef: kind: Role name: leader-locking-nfs-client-provisioner apiGroup: rbac.authorization.k8s.io --- apiVersion: apps/v1 kind: Deployment metadata: name: nfs-client-provisioner labels: app: nfs-client-provisioner # replace with namespace where provisioner is deployed namespace: ${NS} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: nfs-client-provisioner template: metadata: labels: app: nfs-client-provisioner spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner image: quay.io/external_storage/nfs-client-provisioner:latest volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes env: - name: PROVISIONER_NAME value: ${NFS_PROVISIONER_NAME} - name: NFS_SERVER value: ${NFS_SERVER_HOST} - name: NFS_PATH value: ${NFS_SERVER_PATH} volumes: - name: nfs-client-root nfs: server: ${NFS_SERVER_HOST} path: ${NFS_SERVER_PATH} --- apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ${NFS_STORAGE_CLASS_NAME} provisioner: ${NFS_PROVISIONER_NAME} # or choose another name, must match deployments env PROVISIONER_NAME parameters: archiveOnDelete: false EOF kubectl apply -f /tmp/k8s-init-nfs-storageclass.yaml
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

广西工程建设质量管理协会网站seo关键词排名优化

在复杂的前端应用中,错误监控和异常处理是保障用户体验的重要环节。本文将介绍如何建立完善的前端错误监控体系。 1 JavaScript运行时错误捕获 // 全局错误捕获 window.addEventListener(error, (event) > {console.error(全局错误:, event.error)// 上报错误信…

张小明 2026/1/12 4:11:22 网站建设

成品网站1688网页网络营销组织是什么

管理SUSE Linux的全面指南 1. 创建基础配置 完成基础设置后,即可开始基础配置。步骤如下: 1. 建立与SUSE Manager Server的HTTPS会话。 2. 系统会提示创建管理员用户,输入所需的登录名和密码,然后点击“Create Login”。 3. 创建管理员用户后,即可访问SUSE Manager W…

张小明 2026/1/12 11:54:28 网站建设

浙江省建设工程监理管理协会网站wordpress以前版本

超市管理 目录 基于ssm vue超市管理系统 一、前言 二、系统功能演示 三、技术选型 四、其他项目参考 五、代码参考 六、测试参考 七、最新计算机毕设选题推荐 八、源码获取: 基于ssm vue超市管理系统 一、前言 博主介绍:✌️大厂码农|毕设布道…

张小明 2026/1/7 7:25:14 网站建设

硬件开发语言有哪些seo综合查询 站长工具

目录 1.在REMIX中集成透明升级合约 2.在HARDHAT中集成透明升级合约 合约一旦部署,是不可以更改了,项目初期必须提前设计,决定是否需要升级,否则是无法升级的,只要提前用代理模式,就能升级。演示一下升级的…

张小明 2026/1/7 16:24:22 网站建设

广州营销网站建设公司排名西安购物网站建设

FontCenter:AutoCAD字体缺失的终极解决方案指南 【免费下载链接】FontCenter AutoCAD自动管理字体插件 项目地址: https://gitcode.com/gh_mirrors/fo/FontCenter 还在为AutoCAD字体缺失而烦恼吗?FontCenter作为专业的AutoCAD字体管理插件&#x…

张小明 2026/1/7 13:50:16 网站建设