Configuring Application Storage

A PersistentVolume (PV) forms a vital part of the cluster's storage resources. Administered by the system's overseer, it signifies an allocated storage unit accessible to the cluster's nodes. This storage is designed for shared use among multiple pods, and its existence is decoupled from the lifecycle of any specific pod.

To access Control Center logs, a PersistentVolume must be established. The Cluster Administrator is responsible for creating the PersistentVolume, and this can be accomplished in two ways:
  1. Static PersistentVolume – For static PersistentVolume, Kubernetes PersistentVolume resource will be created. Following is the sample file ibm-sccm-pv.yaml of PersistentVolume with NFS :
    kind: PersistentVolume
    apiVersion: v1
    metadata:
      name: ibm-sccm-pv
      labels:
        app.kubernetes.io/name: ibm-scc-pv
        app.kubernetes.io/instance: ibm-sccm
        app.kubernetes.io/managed-by: ibm-sccm-service
        helm.sh/chart: ibm-sccm
        release: ibm-sccm
    spec:
      persistentVolumeReclaimPolicy: Retain
      storageClassName: manual
      capacity:
        storage: 20Gi # Storage capacity for this PV
      accessModes:
        - ReadWriteOnce
      nfs:
        server: 111.22.333.444
        path: /docker_volume/
        readOnly: false
    
    Now, create a Kubernetes PersistentVolume using following command:
    $ oc create -f ibm-sccm-pv.yaml

    To create a persistent volume, you need one NFS mounted directory per server so that it can be accessed from all worker nodes.

    Invoke the following command to verify if your Persistence Volume is created:
    $ oc get pv
  2. Dynamic Volume Provisioning - For Dynamic Volume Provisioning, only StorageClass needs to be setup, Kubernetes PersistentVolume resource will be created automatically on demand.

Configuration for Accessing Application Resources

Set up configuration for sharing external resources, such as database driver jars and certificate files, with the application pods. This can be done with any one of the following: