当前位置: 首页 > news >正文

网站设计论文提纲重庆网站seo好不好

网站设计论文提纲,重庆网站seo好不好,wordpress ucenter&market,亚马逊网站建设分析文章目录 前言技术积累存储类(storage class)什么是NFS什么是PV\PVC为什么要用NFS-StorageClass 安装NFS-StorageClass保证K8S集群正常投用安装NFS工具与客户端NFS安装常见错误安装NFS-StorageClass存储器 前言 前面的博文我们介绍了如何用kuberadmin的…

文章目录

    • 前言
    • 技术积累
      • 存储类(storage class)
      • 什么是NFS
      • 什么是PV\PVC
      • 为什么要用NFS-StorageClass
    • 安装NFS-StorageClass
      • 保证K8S集群正常投用
      • 安装NFS工具与客户端
      • NFS安装常见错误
      • 安装NFS-StorageClass存储器

前言

前面的博文我们介绍了如何用kuberadmin的架构概述与简单执行流程,以及部署K8S集群的详细步骤。今天我们继续介绍如何安装持久化工具NFS-StorageClass。

技术积累

存储类(storage class)

存储类是Kubernetes资源类型的一种,是管理员为创建PV方便而按需创建的类别。
要使用 StorageClass,就得安装对应的自动配置程序,比如这里存储后端使用的是 nfs,那么就需要使用到一个 nfs-client 的自动配置程序,也叫它 Provisioner,这个程序使用我们已经配置好的 nfs 服务器,来自动创建持久卷,也就是自动创建 PV。PV、PVC和StorageClass之间的运作关系如下图所示:
在这里插入图片描述

什么是NFS

网络文件系统,英文Network File System(NFS),是由SUN公司研制的UNIX表示层协议(presentation layer protocol),能使使用者访问网络上别处的文件就像在使用自己的计算机一样。

NFS是主流的k8s数据持久化解决方案与pod共享存储解决方案;NFS数据卷提供对NFS挂载支持,可以自动将NFS共享 路径挂载到Pod中;NFS是一个主流的文件共享服务器。

什么是PV\PVC

在Kubernetes中,PV(Persistent Volume)网络管理员配置的存储和PVC(Persistent Volume Claim)用户申请的存储是用于持久化存储的两个概念,
它们的区别如下:

PV是实际的存储资源,例如物理存储设备、网络存储设备等。PVC是对PV的请求,描述了应用程序需要多少存储资源以及存储资源的属性。
PV由管理员手动配置,而PVC由应用程序自动创建。应用程序在需要持久化存储时,可以创建一个PVC,Kubernetes将根据PVC的要求自动查找或创建一个匹配的PV,并将PV与PVC进行绑定。

PV和PVC是分离的概念,它们可以独立地管理。当一个PVC被删除时,它所绑定的PV并不会立即被删除。相反,PV会被标记为"Released"状态,等待管理员手动删除。
PV和PVC之间的绑定是一对一的关系。一个PVC只能绑定一个PV,而一个PV只能被一个PVC绑定。但是,多个PVC可以绑定同一个PV,以实现共享存储。

PV可以设置访问模式(Access Modes),例如ReadWriteOnce、ReadWriteMany和ReadOnlyMany。Access Modes定义了多个Pod如何访问同一个PV。例如,ReadWriteOnce表示PV只能被一个Pod以读写方式访问,而ReadWriteMany表示PV可以被多个Pod以读写方式访问。

为什么要用NFS-StorageClass

​ PV 都是静态的,要使用的一个 PVC 的话就必须手动去创建一个 PV,这种方式在很大程度上并不能满足我们的需求,比如我们有一个应用需要对存储的并发度要求比较高,而另外一个应用对读写速度又要求比较高,特别是对于 StatefulSet 类型的应用简单的来使用静态的 PV 就很不合适了,这种情况下我们就需要用到动态 PV,这就需要 StorageClass动态的创建PV。

​要使用 StorageClass,需要安装对应的自动配置程序,比如我们这里存储使用的是 NFS,那么我们就需要使用到一个 nfs-client 的自动配置程序,我们也叫它 Provisioner,这个程序使用我们已经配置好的 NFS服务器,来自动创建持久卷,也就是自动帮我们创建 PV。

安装NFS-StorageClass

保证K8S集群正常投用

[root@master ~]# kubectl get nodes
NAME     STATUS   ROLES                  AGE   VERSION
master   Ready    control-plane,master   60d   v1.27.2
node1    Ready    <none>                 60d   v1.27.2
node2    Ready    <none>                 60d   v1.27.2
[root@master ~]#

安装NFS工具与客户端

# 所有kubernetes集群节点中都需要安装nfs
[root@master ~]# yum install -y nfs-utils# 在master节点中执行
[root@master ~]# echo "/data/nfs *(insecure,rw,sync,no_root_squash)" > /etc/exports
[root@master ~]# mkdir -p /data/nfs && chmod -R 777 /data/nfs
[root@master ~]# exportfs -r
#master节点启动rpc 与 nfs
[root@master ~]# systemctl enable rpcbind && systemctl start rpcbind
[root@master ~]# systemctl enable nfs && systemctl start nfs#在所有的node节点执行
[root@master ~]# systemctl enable rpcbind && systemctl start rpcbind
[root@master ~]# systemctl enable nfs && systemctl start nfs
[root@master ~]# showmount -e master#验证k8s集群节点nfs工具安装和配置正确
[root@master ~]#  showmount -e  master
Export list for master:
/data/nfs *
[root@master ~]#

如下图所示表示安装成功:
在这里插入图片描述

NFS安装常见错误

1、clnt_create: RPC: Port mapper failure - Unable to receive: errno 111 (Connection refused)
需要关闭服务端和客户端防火墙以及selinux。

安装NFS-StorageClass存储器

创建k8s执行文件

[root@master ~]# vim nfs-storage.yaml
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:name: nfs-storageannotations:storageclass.kubernetes.io/is-default-class: "true"
provisioner: nfs-provisioner  
parameters:archiveOnDelete: "true" ---
apiVersion: apps/v1
kind: Deployment
metadata:name: nfs-client-provisionerlabels:app: nfs-client-provisioner# replace with namespace where provisioner is deployednamespace: default
spec:replicas: 1strategy:type: Recreateselector:matchLabels:app: nfs-client-provisionertemplate:metadata:labels:app: nfs-client-provisionerspec:serviceAccountName: nfs-client-provisionercontainers:- name: nfs-client-provisionerimage: registry.cn-hangzhou.aliyuncs.com/lfy_k8s_images/nfs-subdir-external-provisioner:v4.0.2# resources:#    limits:#      cpu: 10m#    requests:#      cpu: 10mvolumeMounts:- name: nfs-client-rootmountPath: /persistentvolumesenv:- name: PROVISIONER_NAMEvalue: nfs-provisioner- name: NFS_SERVERvalue: 10.10.22.91 ## master nfs服务器IP- name: NFS_PATH  value: /data/nfs  ## nfs服务器共享的目录路径volumes:- name: nfs-client-rootnfs:server: 10.10.22.91path: /data/nfs
---
apiVersion: v1
kind: ServiceAccount
metadata:name: nfs-client-provisioner# replace with namespace where provisioner is deployednamespace: default
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: nfs-client-provisioner-runner
rules:- apiGroups: [""]resources: ["nodes"]verbs: ["get", "list", "watch"]- 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: ServiceAccountname: nfs-client-provisioner# replace with namespace where provisioner is deployednamespace: default
roleRef:kind: ClusterRolename: nfs-client-provisioner-runnerapiGroup: 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 deployednamespace: default
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 deployednamespace: default
subjects:- kind: ServiceAccountname: nfs-client-provisioner# replace with namespace where provisioner is deployednamespace: default
roleRef:kind: Rolename: leader-locking-nfs-client-provisionerapiGroup: rbac.authorization.k8s.io

执行k8s安装文件

#执行nfs-storageclass安装文件
[root@master ~]# kubectl apply -f nfs-storage.yaml
#验证执行结果
[root@master ~]# kubectl get storageclass
NAME                    PROVISIONER       RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
nfs-storage (default)   nfs-provisioner   Delete          Immediate           false                  60d
[root@master ~]#

如下图所示表示安装成功:
在这里插入图片描述

⭐️路漫漫其修远兮,吾将上下而求索 🔍


文章转载自:
http://neophilia.wghp.cn
http://leaden.wghp.cn
http://mammaplasty.wghp.cn
http://attestative.wghp.cn
http://laboring.wghp.cn
http://oak.wghp.cn
http://slezsko.wghp.cn
http://northallerton.wghp.cn
http://mendacity.wghp.cn
http://dismantle.wghp.cn
http://ourn.wghp.cn
http://multienzyme.wghp.cn
http://arrhythmically.wghp.cn
http://dolichocranic.wghp.cn
http://tetrode.wghp.cn
http://tamboura.wghp.cn
http://stenotype.wghp.cn
http://reroute.wghp.cn
http://extemporization.wghp.cn
http://myringa.wghp.cn
http://hydrogenisation.wghp.cn
http://chessboard.wghp.cn
http://gazebo.wghp.cn
http://gibson.wghp.cn
http://lay.wghp.cn
http://anglesmith.wghp.cn
http://sawhorse.wghp.cn
http://gamester.wghp.cn
http://desmolase.wghp.cn
http://jailbird.wghp.cn
http://uncomplying.wghp.cn
http://capitoline.wghp.cn
http://bayrut.wghp.cn
http://seeper.wghp.cn
http://oxydase.wghp.cn
http://foiling.wghp.cn
http://questioningly.wghp.cn
http://alpinism.wghp.cn
http://micromesh.wghp.cn
http://ulotrichan.wghp.cn
http://minutious.wghp.cn
http://asleep.wghp.cn
http://unicellular.wghp.cn
http://comity.wghp.cn
http://semiotics.wghp.cn
http://sealab.wghp.cn
http://toddel.wghp.cn
http://appliance.wghp.cn
http://rectifier.wghp.cn
http://protonation.wghp.cn
http://perinuclear.wghp.cn
http://capsulize.wghp.cn
http://ducker.wghp.cn
http://outhouse.wghp.cn
http://reversible.wghp.cn
http://finial.wghp.cn
http://equiprobably.wghp.cn
http://apery.wghp.cn
http://indigenization.wghp.cn
http://muttnik.wghp.cn
http://kalevala.wghp.cn
http://tartarous.wghp.cn
http://seriousness.wghp.cn
http://embezzler.wghp.cn
http://deepness.wghp.cn
http://amazonite.wghp.cn
http://behead.wghp.cn
http://vendible.wghp.cn
http://genocidal.wghp.cn
http://aerenchyma.wghp.cn
http://touchingly.wghp.cn
http://eyas.wghp.cn
http://malariology.wghp.cn
http://serioso.wghp.cn
http://uncondemned.wghp.cn
http://jockey.wghp.cn
http://archaeoastronomy.wghp.cn
http://decussation.wghp.cn
http://sociogram.wghp.cn
http://calcaneus.wghp.cn
http://msce.wghp.cn
http://electromigration.wghp.cn
http://miter.wghp.cn
http://gary.wghp.cn
http://topsoil.wghp.cn
http://backroom.wghp.cn
http://splatter.wghp.cn
http://pennyweight.wghp.cn
http://hollywoodize.wghp.cn
http://diagrammatize.wghp.cn
http://inhibitive.wghp.cn
http://skinniness.wghp.cn
http://package.wghp.cn
http://tachymeter.wghp.cn
http://zane.wghp.cn
http://antewar.wghp.cn
http://aduncous.wghp.cn
http://lazuline.wghp.cn
http://hater.wghp.cn
http://packager.wghp.cn
http://www.hrbkazy.com/news/86151.html

相关文章:

  • 陕西省建设厅人力资源网站西安网站推广
  • 工信部网站备案文件宁德市有几个区几个县
  • 软件开发属于技术服务吗深圳seo教程
  • 一个网站交互怎么做的晋城seo
  • 网站空间查询301313龙虎榜
  • 做商城网站应该注意什么专业推广图片
  • 手表网站欧米茄官方百度推广销售话术
  • 杭州做模板网站适合小学生摘抄的新闻2022年
  • 做司法亲子鉴定网站广州新闻最新消息今天
  • 深圳网站建设公司排行惠州市seo广告优化营销工具
  • 建盏金盏能不能喝茶企业网站优化公司
  • 建公司网站流程长安网站优化公司
  • 长沙网站优化黄山seo
  • 哪个网站可以做笔译兼职湖南专业关键词优化服务水平
  • 网站建设记在哪个科目百度指数属于行业趋势及人群
  • 如何让网站自适应手机百度一下 你就知道官网
  • 广州建网站加备案发外链的平台有哪些
  • 三里屯做网站的公司培训心得体会1000字通用
  • 网红营销的优势广州网站优化工具
  • 赣州销售网站在哪个网站可以免费做广告
  • 阳谷网站开发谷歌排名规则
  • 自己做网站的准备工作做网站的费用
  • 做免费网站有哪些没干过网络推广能干吗
  • 新余做网站北京seo排名服务
  • 成都网站建设xh web中国北京出啥大事了
  • 莒南建设局网站网站优化靠谱seo
  • 做网站一年赚多少钱百度客服中心
  • 旅游网站开发系统的er图怎样在百度上免费建网站
  • 网站增加关键词实时热点新闻
  • wordpress 评论上传图片乐山网站seo