Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageshell
titleShell Command
kubectl apply -f epik8s-backend.yaml

7 Install NFS storage class

Create app file called nfs_app.yaml


Code Block
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: nfs-subdir-external-provisioner
  namespace: argocd        # namespace dove gira Argo CD
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
    repoURL: https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
    chart: nfs-subdir-external-provisioner
    targetRevision: 4.0.18
    helm:
      values: |
        nfs:
          server: atlasdisk19.lnf.infn.it
          path: /St-Dell3800-A-A13Vd0
        storageClass:
          name: nfs-atlas
          accessModes: ReadWriteMany
  destination:
    server: https://kubernetes.default.svc
    namespace: nfs-provisioner
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

Apply:

Code Block
languageshell
titleShell Command
kubectl apply -f nfs_app.yaml

Test SC:


Code Block
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfs-test-pvc
  namespace: default
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
  storageClassName: nfs-atlas
---
apiVersion: v1
kind: Pod
metadata:
  name: nfs-test-pod
  namespace: default
spec:
  containers:
    - name: test
      image: busybox:1.36
      command: ["/bin/sh", "-c", "sleep 3600"]
      volumeMounts:
        - name: nfs-storage
          mountPath: /mnt/nfs
  volumes:
    - name: nfs-storage
      persistentVolumeClaim:
        claimName: nfs-test-pvc

Apply:

Code Block
languageshell
titleShell Command
kubectl apply -f pod_nfs.yaml

Test nfs inside pod:

Code Block
languageshell
titleShell Command
kubectl exec -it nfs-test-pod -- sh
cd /mnt/nfs
touch prova.txt
echo "ciao" > prova.txt
cat prova.txt

 8 Install EPIK8S beamline

A beamline GIT EPIK8s repo must exists.

...