Skip to content

Instantly share code, notes, and snippets.

@andrenarchy
Last active June 6, 2019 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrenarchy/c72016d3620a5bf1849b283ddd140646 to your computer and use it in GitHub Desktop.
Save andrenarchy/c72016d3620a5bf1849b283ddd140646 to your computer and use it in GitHub Desktop.
Stellar on Kubernetes: initialization IBM Cloud

Stellar on Kubernetes: initialization IBM Cloud

(Provided by @todkap)

Stellar Core and Horizon leverage Kubernetes dynamic provisioning for their storage classes (https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/). The default storage class for IBM Cloud is file-based and has known limitations with regards to docker images running as non-root. To avoid this limitation, we can change the default storage class to block storage (requires the installation of an IBM block storage helm chart from the IBM Cloud Helm Repository) and a patch to the default storage classes we want to disable and enable.

# Get the IBM block storage classes from IKS helm repo
$ helm repo add iks-charts https://icr.io/helm/iks-charts
$ helm repo update
$ helm install iks-charts/ibmcloud-block-storage-plugin
## Change default storage class to be block versus file due to security permissions for NFS (https://cloud.ibm.com/docs/containers?topic=containers-cs_troubleshoot_storage)
## Change default storage class type from bronze to gold (required SLA for IOPs requirements for Stellar)
$ kubectl patch storageclass ibmc-file-bronze -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
$ kubectl patch storageclass ibmc-block-gold -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment