Manifest Installation
If you prefer not to use Helm, you can apply the individual YAML manifests directly. The manifests below are the rendered output of the Helm chart with default values.
Apply all manifests
Section titled “Apply all manifests”Apply the following six resources in order. All resources are created in the kube-system namespace except the cluster-scoped objects (CSIDriver, ClusterRole, ClusterRoleBinding).
1. CSIDriver
Section titled “1. CSIDriver”apiVersion: storage.k8s.io/v1kind: CSIDrivermetadata: name: csi.flexfs.iospec: attachRequired: false fsGroupPolicy: None2. ServiceAccount
Section titled “2. ServiceAccount”apiVersion: v1kind: ServiceAccountmetadata: name: flexfs-csi-controller namespace: kube-system3. ClusterRole
Section titled “3. ClusterRole”apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata: name: flexfs-csi-controllerrules: - apiGroups: ["storage.k8s.io"] resources: ["csinodes"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["events"] verbs: ["create", "list", "patch", "update", "watch"] - apiGroups: [""] resources: ["nodes"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["persistentvolumeclaims"] verbs: ["get", "list", "update", "watch"] - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["create", "delete", "get", "list", "watch"] - apiGroups: [""] resources: ["secrets"] verbs: ["get", "list"] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get", "list", "watch"]4. ClusterRoleBinding
Section titled “4. ClusterRoleBinding”apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: flexfs-csi-controllersubjects: - kind: ServiceAccount name: flexfs-csi-controller namespace: kube-systemroleRef: kind: ClusterRole name: flexfs-csi-controller apiGroup: rbac.authorization.k8s.io5. Controller Deployment
Section titled “5. Controller Deployment”apiVersion: apps/v1kind: Deploymentmetadata: name: flexfs-csi-controller namespace: kube-systemspec: replicas: 2 selector: matchLabels: app: flexfs-csi-controller template: metadata: labels: app: flexfs-csi-controller spec: serviceAccountName: flexfs-csi-controller priorityClassName: system-cluster-critical tolerations: - key: "CriticalAddonsOnly" operator: "Exists" nodeSelector: kubernetes.io/os: linux containers: - name: flexfs-csi-driver image: flexfs/csi-driver-1.9:latest imagePullPolicy: Always volumeMounts: - name: driver-dir mountPath: /csi - name: csi-provisioner image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.4 args: - "--csi-address=/csi/csi.sock" - "--leader-election=true" - "--leader-election-namespace=$(POD_NAMESPACE)" env: - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace volumeMounts: - name: driver-dir mountPath: /csi volumes: - name: driver-dir emptyDir: {}6. Node DaemonSet
Section titled “6. Node DaemonSet”apiVersion: apps/v1kind: DaemonSetmetadata: name: flexfs-csi-node namespace: kube-systemspec: updateStrategy: type: OnDelete selector: matchLabels: app: flexfs-csi-node template: metadata: labels: app: flexfs-csi-node spec: priorityClassName: system-node-critical nodeSelector: kubernetes.io/os: linux containers: - name: flexfs-csi-driver image: flexfs/csi-driver-1.9:latest imagePullPolicy: Always securityContext: privileged: true volumeMounts: - name: driver-dir mountPath: /csi - name: kubelet-dir mountPath: /var/lib/kubelet mountPropagation: Bidirectional - name: csi-node-driver-registrar image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.1 args: - "--csi-address=/csi/csi.sock" - "--kubelet-registration-path=/var/lib/kubelet/plugins/csi.flexfs.io/csi.sock" volumeMounts: - name: driver-dir mountPath: /csi - name: registration-dir mountPath: /registration tolerations: - operator: Exists volumes: - name: driver-dir hostPath: path: /var/lib/kubelet/plugins/csi.flexfs.io type: DirectoryOrCreate - name: kubelet-dir hostPath: path: /var/lib/kubelet type: Directory - name: registration-dir hostPath: path: /var/lib/kubelet/plugins_registry type: DirectoryApplying everything at once
Section titled “Applying everything at once”Save all six manifests into a single file (separated by ---) or a directory, then apply:
kubectl apply -f flexfs-csi-manifests.yamlOr if using a directory:
kubectl apply -f ./flexfs-csi-manifests/Verifying the installation
Section titled “Verifying the installation”# Check that the CSIDriver is registeredkubectl get csidriver csi.flexfs.io
# Check controller podskubectl get pods -n kube-system -l app=flexfs-csi-controller
# Check node pods (one per node)kubectl get pods -n kube-system -l app=flexfs-csi-nodeRemoving the driver
Section titled “Removing the driver”kubectl delete -f flexfs-csi-manifests.yaml