Kubernetes With Object Storage (EOS)

  1. Create Object storage and Kubernetes cluster through my account dashboard

  2. Check the cluster nodes using kubectl config

  3. Configure/Install the dependencies of Datashim such as CRDs, SA, etc.. using the below commands:

kubectl create ns dlf
kubectl apply -f https://raw.githubusercontent.com/datashim-io/datashim/master/release-tools/manifests/dlf.yaml
kubectl wait --for=condition=ready pods -l app.kubernetes.io/name=datashim -n dlf

kubectl label namespace default monitor-pods-datasets=enabled

  1. Create a new dataset using the below configuration:

cat <<EOF | kubectl apply -f -
apiVersion: datashim.io/v1alpha1
kind: Dataset
metadata:
name: example-dataset
spec:
local:
    type: "COS"
    accessKeyID: "{EOS_ACCESS_KEY_ID}"
    secretAccessKey: "{EOS_SECRET_ACCESS_KEY}"
    endpoint: "{EOS_URL}"
    bucket: "{BUCKET_NAME}"
    readonly: "true" #OPTIONAL, default is false
    region: "" #OPTIONAL
EOF

Provide the credentials, URL, and Region such as Delhi/Mumbai

If everything works okay, you should see a PVC and a ConfigMap named example-dataset which you can mount in your pods. As an easier way to use the Dataset in your pod, you can instead label the pod as follows:

../_images/kubernetes_eos1.png ../_images/kubernetes_eos2.png

Once verified, you can create a new pod/deployment connected with EOS through the below similar YAML configurations:

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
    dataset.0.id: "example-dataset"
    dataset.0.useas: "mount"
spec:
containers:
    - name: nginx
    image: nginx
EOF

As a convention, the Dataset will be mounted in /mnt/datasets/example-dataset

../_images/kubernetes_eos3.png

We recommend using secrets to pass your Object Storage Service credentials to Datashim. For more info Click Here

Refer to for more information: Click Here