zoukankan      html  css  js  c++  java
  • 安装NFS

    准备NFS服务192.168.1.244
    $ yum -y install nfs-utils rpcbind
    $ systemctl start nfs-server rpcbind
    $ systemctl enable nfs-server rpcbind
    $ mkdir -p /data/k8s
    $ cd /data/k8s
    $ echo 11111111 > index.html
    $ vim /etc/exports
    /data/k8s *(rw,async,no_root_squash)
    $ systemctl restart nfs-server
    $ exportfs -arv
    客户端测试,所有k8s节点都要安装nfs客户端
    $ yum -y install nfs-utils rpcbind
    $ systemctl start nfs rpcbind
    $ systemctl enable nfs rpcbind
    $ showmount -e 192.168.1.244

    创建pod直接挂载nfs服务器

    apiVersion: v1
    kind: Pod
    metadata:
      labels:
        run: nginx
      name: podxx
    spec:
      volumes:
      - name: nfs
        nfs:
          server: 192.168.1.244
          path: /data/k8s
      containers:
      - image: nginx
        name: nginx
        volumeMounts:
        - mountPath: /usr/share/nginx/html
          name: nfs
  • 相关阅读:
    登录权限
    ajax搜索分页
    dos命令
    tp5单删
    MVC简易封装
    linux环境安装swoole
    nginx环境安装laravel404问题
    ABZ职业规划
    Yii安装curl
    SKU的概念和理解
  • 原文地址:https://www.cnblogs.com/lidezhen/p/13455769.html
Copyright © 2011-2022 走看看