Skip to content

Latest commit

 

History

History
82 lines (64 loc) · 1.99 KB

getting-started.md

File metadata and controls

82 lines (64 loc) · 1.99 KB

Getting Started

We provide a Helm Chart to install TopoLVM on Kubernetes. The chart depends on cert-manager. If you don't have cert-manager installed, you can install it with the Helm Chart.

Prerequisites

A volume group must be created on all nodes where TopoLVM will run. The default volume group name defined in the Helm Chart is myvg1.

Install Instructions

First, add the TopoLVM helm repository.

helm repo add topolvm https://topolvm.github.io/topolvm
helm repo update

TopoLVM uses webhooks. To work webhooks properly, add a label to the target namespace. We also recommend to use a dedicated namespace.

kubectl label namespace topolvm-system topolvm.io/webhook=ignore
kubectl label namespace kube-system topolvm.io/webhook=ignore

Then, install TopoLVM with the release name topolvm.

helm install --namespace=topolvm-system topolvm topolvm/topolvm

If you want to install cert-manager together, use the following command instead.

kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/${VERSION}/cert-manager.crds.yaml

helm install --namespace=topolvm-system topolvm topolvm/topolvm --set cert-manager.enabled=true

Finally, check if TopoLVM is running. All TopoLVM pods should be running.

kubectl get pod -n topolvm-system

Usage

You can create PersistentVolumes (PV) by TopoLVM after installation succeeded. The StorageClass topolvm-provisioner is automatically created by the Helm Chart.

kubectl apply -f - <<EOF
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: my-pvc
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: topolvm-provisioner
---
apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
  - name: pause
    image: registry.k8s.io/pause
    volumeMounts:
    - mountPath: /data
      name: volume
  volumes:
  - name: volume
    persistentVolumeClaim:
      claimName: my-pvc
EOF