kubernetes-notes
  • 目录
    • 序言
  • 云原生体系
    • 12-Factor
    • K8S知识体系
  • 安装与配置
    • 部署k8s集群
      • 使用kubeadm安装生产环境kubernetes
      • 使用kubespray安装kubernetes
      • 使用minikube安装kubernetes
      • 使用kind安装kubernetes
    • k8s证书及秘钥
    • k8s版本说明
  • 基本概念
    • kubernetes架构
      • Kubernetes总架构图
      • 基于Docker及Kubernetes技术构建容器云(PaaS)平台概述
    • kubernetes对象
      • 理解kubernetes对象
      • kubernetes常用对象说明
    • Pod
      • Pod介绍
      • Pod定义文件
      • Pod生命周期
      • Pod健康检查
      • Pod存储卷
      • Pod控制器
      • Pod伸缩与升级
    • 配置
      • ConfigMap
    • Workload
  • 核心原理
    • 核心组件
      • Api Server
      • Controller Manager
      • Scheduler
      • Kubelet
    • 流程图
      • Pod创建流程
      • PVC创建流程
  • 容器网络
    • Docker网络
    • K8S网络
    • 网络插件
      • Flannel介绍
    • CNI
      • CNI接口介绍
      • Macvlan介绍
  • 容器存储
    • 存储卷概念
      • Volume
      • Persistent Volume
      • Persistent Volume Claim
      • Storage Class
      • Dynamic Volume Provisioning
    • CSI
      • csi-cephfs-plugin
      • 部署csi-cephfs
      • 部署cephfs-provisioner
      • FlexVolume介绍
  • 资源隔离
    • 资源配额
    • Pod限额
    • 资源服务质量
    • Lxcfs资源视图隔离
  • 运维指南
    • kubectl工具
      • kubectl安装与配置
      • kubectl命令说明
      • kubectl命令别名
    • kubernetes集群问题排查
    • 节点调度
      • 安全迁移节点
      • 指定Node调度与隔离
    • 镜像仓库配置
      • 配置私有的镜像仓库
      • 拉取私有镜像
  • 开发指南
    • client-go的使用及源码分析
    • CSI插件开发
      • nfs-client-provisioner源码分析
      • csi-provisioner源码分析
    • operator开发
      • kubebuilder的使用
  • 问题排查
    • 节点相关问题
      • keycreate permission denied
      • Cgroup不支持pid资源
      • Cgroup子系统无法挂载
    • Pod驱逐
    • 镜像拉取失败问题
    • PVC Terminating
  • 源码分析
    • Kubernetes源码分析笔记
    • kubelet
      • NewKubeletCommand
      • NewMainKubelet
      • startKubelet
      • syncLoopIteration
      • syncPod
    • kube-controller-manager
      • NewControllerManagerCommand
      • DeploymentController
      • Informer机制
    • kube-scheduler
      • NewSchedulerCommand
      • registerAlgorithmProvider
      • scheduleOne
      • findNodesThatFit
      • PrioritizeNodes
      • preempt
    • kube-apiserver
      • NewAPIServerCommand
  • Runtime
    • Runtime
      • Runc和Containerd概述
    • Containerd
      • 安装Containerd
    • Docker
      • Docker学习笔记
    • Kata Container
      • kata容器简介
      • kata配置
    • GPU
      • nvidia-device-plugin介绍
  • Etcd
    • Etcd介绍
    • Raft算法
    • Etcd启动配置参数
    • Etcd访问控制
    • etcdctl命令工具
      • etcdctl命令工具-V3
      • etcdctl命令工具-V2
    • Etcd中的k8s数据
    • Etcd-Operator的使用
  • 多集群管理
    • k8s多集群管理的思考
    • Virtual Kubelet
      • Virtual Kubelet介绍
      • Virtual Kubelet 命令
    • Karmada
      • Karmada介绍
  • 边缘容器
    • KubeEdge介绍
    • KubeEdge源码分析
      • cloudcore
      • edgecore
    • OpenYurt部署
  • 虚拟化
    • 虚拟化相关概念
    • KubeVirt
      • KubeVirt的介绍
      • KubeVirt的使用
  • 监控体系
    • 监控体系介绍
    • cAdvisor介绍
    • Heapster介绍
    • Influxdb介绍
由 GitBook 提供支持

www.huweihuang.com

在本页
  • 1. 编译CSI CephFS plugin
  • 1.1. 编译二进制
  • 1.2. 编译Docker镜像
  • 2. 配置项
  • 2.1. 命令行参数
  • 2.2. volume参数
  • 2.3. provisionVolume

这有帮助吗?

在GitHub上编辑
  1. 容器存储
  2. CSI

csi-cephfs-plugin

上一页CSI下一页部署csi-cephfs

最后更新于2年前

这有帮助吗?

1. 编译CSI CephFS plugin

CSI CephFS plugin用来提供CephFS存储卷和挂载存储卷,源码参考: 。

1.1. 编译二进制

$ make cephfsplugin

1.2. 编译Docker镜像

$ make image-cephfsplugin

2. 配置项

2.1. 命令行参数

Option
Default value
Description

--endpoint

unix://tmp/csi.sock

CSI endpoint, must be a UNIX socket

--drivername

csi-cephfsplugin

name of the driver (Kubernetes: provisioner field in StorageClass must correspond to this value)

--nodeid

empty

This node’s ID

--volumemounter

empty

default volume mounter. Available options are kernel and fuse. This is the mount method used if volume parameters don’t specify otherwise. If left unspecified, the driver will first probe for ceph-fuse in system’s path and will choose Ceph kernel client if probing failed.

2.2. volume参数

Parameter
Required
Description

monitors

yes

Comma separated list of Ceph monitors (e.g. 192.168.100.1:6789,192.168.100.2:6789,192.168.100.3:6789)

mounter

no

Mount method to be used for this volume. Available options are kernel for Ceph kernel client and fuse for Ceph FUSE driver. Defaults to “default mounter”, see command line arguments.

provisionVolume

yes

Mode of operation. BOOL value. If true, a new CephFS volume will be provisioned. If false, an existing CephFS will be used.

pool

for provisionVolume=true

Ceph pool into which the volume shall be created

rootPath

for provisionVolume=false

Root path of an existing CephFS volume

csiProvisionerSecretName, csiNodeStageSecretName

for Kubernetes

name of the Kubernetes Secret object containing Ceph client credentials. Both parameters should have the same value

csiProvisionerSecretNamespace, csiNodeStageSecretNamespace

for Kubernetes

namespaces of the above Secret objects

2.3. provisionVolume

2.3.1. 管理员密钥认证

当provisionVolume=true时,必要的管理员认证参数如下:

  • adminID: ID of an admin client

  • adminKey: key of the admin client

2.3.2. 普通用户密钥认证

当provisionVolume=false时,必要的用户认证参数如下:

  • userID: ID of a user client

  • userKey: key of a user client

参考文章:

  • https://github.com/ceph/ceph-csi/blob/master/docs/deploy-cephfs.md

https://github.com/ceph/ceph-csi