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

做网站分辨率多少石家庄百度关键词优化

做网站分辨率多少,石家庄百度关键词优化,电子商务学什么课程内容,便宜的网站制作文章目录 前言一、openebs是什么?二、准备步骤1.下载yaml文件2.准备一个新的单点k8s用于测试2.将openebs-operator.yaml中的镜像修改成使用国内加速源的 三、执行yaml1.openebs-operator.yaml2.local-hostpath-pvc.yaml和local-hostpath-pod.yaml 四、关于默认存储路…

文章目录

  • 前言
  • 一、openebs是什么?
  • 二、准备步骤
    • 1.下载yaml文件
    • 2.准备一个新的单点k8s用于测试
    • 2.将openebs-operator.yaml中的镜像修改成使用国内加速源的
  • 三、执行yaml
    • 1.openebs-operator.yaml
    • 2.local-hostpath-pvc.yaml和local-hostpath-pod.yaml
  • 四、关于默认存储路径/var/openebs/local/修改的问题
  • 五、设置默认存储类
  • 总结


前言

x86架构上,k8s设置openebs的hostpath作为默认存储类的部署记录
甲方的一个环境,需要将k8s集群缩容由3节点缩小为1节点,因为之前使用的存储方案是rook-ceph,需要找一个替换方案。我就想到了openebs。这里记录一下相关的操作


一、openebs是什么?

OpenEBS turns any storage available to Kubernetes worker nodes into Local or Distributed Kubernetes Persistent Volumes.

官网地址: https://openebs.io/docs/3.3.x/user-guides/installation
在这里插入图片描述
Hostpath地址:https://openebs.io/docs/3.3.x/user-guides/localpv-hostpath

在这里插入图片描述


二、准备步骤

1.下载yaml文件

mkdir -p /data/openebs/
cd /data/openebs/
wget https://openebs.github.io/charts/openebs-operator.yaml
wget https://openebs.github.io/charts/examples/local-hostpath/local-hostpath-pod.yaml
wget https://openebs.github.io/charts/examples/local-hostpath/local-hostpath-pvc.yaml

2.准备一个新的单点k8s用于测试

kubectl get pod -A 
NAMESPACE              NAME                                       READY   STATUS    RESTARTS   AGE
kube-system            calico-kube-controllers-676c86494f-jwfv5   1/1     Running   0          38m
kube-system            calico-node-v5vnq                          1/1     Running   0          38m
kube-system            coredns-757cd945b-5767j                    1/1     Running   0          38m
kube-system            coredns-757cd945b-k6rvk                    1/1     Running   0          38m
kube-system            kube-apiserver-clamav                      1/1     Running   0          38m
kube-system            kube-controller-manager-clamav             1/1     Running   0          38m
kube-system            kube-proxy-d8fq6                           1/1     Running   0          38m
kube-system            kube-scheduler-clamav                      1/1     Running   0          38m
kube-system            nodelocaldns-5wmhs                         1/1     Running   0          38m
kubernetes-dashboard   dashboard-metrics-scraper-9966c679-d877s   1/1     Running   0          36m
kubernetes-dashboard   kubernetes-dashboard-574df6df5f-2r89r      1/1     Running   0          36m

2.将openebs-operator.yaml中的镜像修改成使用国内加速源的

我用的是dockerpull.cn的国内源,一共涉及到下列5个镜像

openebs/node-disk-manager:2.1.0
openebs/node-disk-operator:2.1.0
openebs/node-disk-exporter:2.1.0
openebs/provisioner-localpv:3.4.0
openebs/linux-utils:3.5.0

pull 镜像

docker pull dockerpull.cn/openebs/node-disk-manager:2.1.0
docker pull dockerpull.cn/openebs/node-disk-operator:2.1.0
docker pull dockerpull.cn/openebs/node-disk-exporter:2.1.0
docker pull dockerpull.cn/openebs/provisioner-localpv:3.4.0
docker pull dockerpull.cn/openebs/linux-utils:3.5.0

替换openebs-operator.yaml中的镜像
这里使用的perl命令,没有使用sed命令,左斜杠转义太烦人,不如用#来当分隔符

perl -pi -e  's#openebs/node-disk-manager:2.1.0#dockerpull.cn/openebs/node-disk-manager:2.1.0#g'  openebs-operator.yamlperl -pi -e  's#openebs/node-disk-operator:2.1.0#dockerpull.cn/openebs/node-disk-operator:2.1.0#g'  openebs-operator.yamlperl -pi -e  's#openebs/node-disk-exporter:2.1.0#dockerpull.cn/openebs/node-disk-exporter:2.1.0#g'  openebs-operator.yamlperl -pi -e  's#openebs/provisioner-localpv:3.4.0#dockerpull.cn/openebs/provisioner-localpv:3.4.0#g'  openebs-operator.yamlperl -pi -e  's#openebs/linux-utils:3.5.0#dockerpull.cn/openebs/linux-utils:3.5.0#g'  openebs-operator.yaml

三、执行yaml

1.openebs-operator.yaml

cd /data/openebs/
kubectl create -f openebs-operator.yaml
# 输出
namespace/openebs created
serviceaccount/openebs-maya-operator created
clusterrole.rbac.authorization.k8s.io/openebs-maya-operator created
clusterrolebinding.rbac.authorization.k8s.io/openebs-maya-operator created
customresourcedefinition.apiextensions.k8s.io/blockdevices.openebs.io created
customresourcedefinition.apiextensions.k8s.io/blockdeviceclaims.openebs.io created
configmap/openebs-ndm-config created
daemonset.apps/openebs-ndm created
deployment.apps/openebs-ndm-operator created
deployment.apps/openebs-ndm-cluster-exporter created
service/openebs-ndm-cluster-exporter-service created
daemonset.apps/openebs-ndm-node-exporter created
service/openebs-ndm-node-exporter-service created
deployment.apps/openebs-localpv-provisioner created
storageclass.storage.k8s.io/openebs-hostpath created
storageclass.storage.k8s.io/openebs-device created

等待pod进入运行状态

kubectl get pod -n openebs
# 输出
NAME                                           READY   STATUS    RESTARTS   AGE
openebs-localpv-provisioner-866f75fd74-hhm98   1/1     Running   0          32s
openebs-ndm-cluster-exporter-c9cdc6864-ml9jd   1/1     Running   0          32s
openebs-ndm-node-exporter-5zpl9                1/1     Running   0          32s
openebs-ndm-operator-6d58d6fdf7-wcb22          1/1     Running   0          32s
openebs-ndm-pdcbm                              1/1     Running   0          32s

查看存储类

kubectl get sc -n default
# 输出
NAME               PROVISIONER        RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
openebs-device     openebs.io/local   Delete          WaitForFirstConsumer   false                  7m14s
openebs-hostpath   openebs.io/local   Delete          WaitForFirstConsumer   false                  7m14s

2.local-hostpath-pvc.yaml和local-hostpath-pod.yaml

docker pull dockerpull.cn/busybox
perl -pi -e  's#busybox#dockerpull.cn/busybox#g'  local-hostpath-pod.yaml
kubectl create -f local-hostpath-pvc.yaml
kubectl create -f local-hostpath-pod.yaml

查看测试的pv和pod

kubectl get pod -n default
# 输出
NAME                       READY   STATUS    RESTARTS   AGE
hello-local-hostpath-pod   1/1     Running   0          19skubectl get pvc -n default
# 输出
NAME                 STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS       AGE
local-hostpath-pvc   Bound    pvc-d2d776a1-656e-49e7-bfff-34ebaa26481a   5G         RWO            openebs-hostpath   5m18s

四、关于默认存储路径/var/openebs/local/修改的问题

默认的存储路径是/var/openebs/local/,在生产环境中最好是配置到一个高性能的有保障的目录下。
准备一个专属目录

mkdir -p /hdd_data/openebs_data/

修改存储类配置

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:name: openebs-hostpath
...- name: BasePath#value: "/var/openebs/local/"value: "/hdd_data/openebs_data/"

创建

kubectl create -f openebs-operator.yaml
kubectl create -f local-hostpath-pvc.yaml
kubectl create -f local-hostpath-pod.yaml
kubectl get pvc
# 输出
NAME                 STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS       AGE
local-hostpath-pvc   Bound    pvc-300671fc-34b1-46dd-bc1c-eaa2feeee754   5G         RWO            openebs-hostpath   4m18s

查看卷是否创建到专属目录

ll /hdd_data/openebs_data/
total 0
drwxrwxrwx 2 root root 23 Apr 29 15:59 pvc-300671fc-34b1-46dd-bc1c-eaa2feeee754

五、设置默认存储类

kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

总结

简单记录一下使用方式,

http://www.dtcms.com/wzjs/457622.html

相关文章:

  • 高端品牌网站建设策略seo技术员
  • 做号网站吗全国最新疫情实时状况地图
  • 百度网盟推广官方网站一级域名二级域名三级域名的区别
  • 深圳企业网站开发公司商丘网站建设公司
  • 北京网络运维公司灰色词seo推广
  • 做旅游网约车的网站竞价排名是什么意思
  • 拉萨中卫微网站设计怎么做苏州搜索引擎排名优化商家
  • 政府网站做3屏适配做seo用哪种建站程序最好
  • 长沙优化网站技巧广州seo培训
  • 西昌手机网国内好的seo
  • 河北建设银行石家庄分行招聘网站网络营销实践总结报告
  • 做外贸自己的公司网站2345网址导航删除办法
  • 网站建设公司深圳steam交易链接怎么改
  • cad外包网站百度推广退款电话
  • 做兼职哪个招聘网站比较靠谱广东网站关键词排名
  • 别人给公司做的网站字体侵权搜索引擎收录提交入口
  • 日本做仿牌网站seo关键词排名如何
  • 惠民县建设网站唐山百度提升优化
  • wordpress 定制 价钱徐州seo顾问
  • 佛山网站建设开发销售网络平台
  • 番禺网站建设如何做免费网络推广
  • 提升学历图片素材seo培训公司
  • 网站后台是怎么操作的北京疫情最新数据
  • 扬州哪里做网站好湖南seo快速排名
  • 上海注册公司需要什么资料保定seo推广
  • wordpress+mintyseo如何优化关键词上首页
  • 在哪里购买虚拟空间建设网站站长工具ip地址
  • 教育行业网站建设价格上海广告公司
  • 上海网络网站建设收录网
  • 做印尼购物网站如何发货营销推广计划