Skip to content

Kubernetes Container Storage Interface Plugin for XetHub

License

Notifications You must be signed in to change notification settings

xetdata/k8s-csi-xetfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

No Maintenance Intended

[DEPRECATED] k8s-csi-xetfs

XetHub has joined Hugging Face 🤗. Follow our work to improve large scale collaboration on Hugging Face Hub.


Kubernetes Container Storage Interface Plugin for XetHub. This plugin enables mounting and accessing XetHub repository from Kubernetes by implementing CSI specification

csi plugin name: csi.xethub.xetdata.com

Project status: alpha

Container Images & Kubernetes Compatibility

driver version Image supported k8s version
main branch docker.io/xethub/k8s-csi-xetfs:latest 1.25+

Features

Since this plugin is in alpha version, it supports minimal set of features provided by CSI spec.

Example usage

This repository contains an example python application under example directory that uses XetHub CSI driver to mount Flickr30k repository, reads all the files and prints out the total size of the repository. Start the example application by running the following commands:

kubectl apply -f - <<EOF
---
apiVersion: v1
kind: Pod
metadata:
  name: app1
spec:
  containers:
    - name: app1
      image: docker.io/xethub/counter-app:latest
      volumeMounts:
        - name: xet-flickr-30
          mountPath: /data
  volumes:
    - name: xet-flickr-30
      csi:
        driver: csi.xethub.xetdata.com
        readOnly: true
        volumeAttributes:
          repo: https://xethub.com/XetHub/Flickr30k.git
          commit: main
          # following is setup for a private repo mount
          # requires a secret configured like in secret.yaml.template
          #- name: private-repo
          #csi:
          #driver: csi.xethub.xetdata.com
          #readOnly: true
          #volumeAttributes:
          #repo: <https url of private repo>
          #commit: main
          #nodePublishSecretRef:
          #name: <secret name>
EOF

Driver Parameters

Name Meaning Example Mandatory Default value
volumeAttributes.repo URL to the repository to mount https://xethub.com/XetHub/Flickr30k.git Yes
volumeAttributes.commit Commit SHA or branch name to mount from the repository main Yes
nodePublishSecretRef.name Secret name that stores user and pat value for mounting private repository (See secret.yaml.template for more details existing Kubernetes secret name No (yes for mounting private repositories)

Install driver on a Kubernetes cluster via kubectl

Option 1: remote install

curl -skSL https://raw.githubusercontent.com/xetdata/k8s-csi-xetfs/main/deploy/install-driver.sh | bash -s main --

Option 2: local install

git clone git@github.com:xetdata/k8s-csi-xetfs.git
cd k8s-csi-xetfs
./deploy/install-driver.sh main local

After installing

  • Check pod status
    kubectl -n kube-system get pod -o wide -l app=  kubectl -n kube-system get pod -o wide -l app=csi-blob-node
  • Example output
    NAME                 READY   STATUS    RESTARTS   AGE     IP             NODE    
    xet-csi-node-zvfj9   3/3     Running   0          5m59s   192.168.49.2   minikube

Uninstall driver on a Kubernetes cluster

Option 1: remote uninstall

curl -skSL https://raw.githubusercontent.com/xetdata/k8s-csi-xetfs/main/deploy/uninstall-driver.sh | bash -s main --

Option 2: local uninstall

git clone git@github.com:xetdata/k8s-csi-xetfs.git
cd k8s-csi-xetfs
./deploy/uninstall-driver.sh main local

About

Kubernetes Container Storage Interface Plugin for XetHub

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •