Hi,
I am relatively new to rancher (4 weeks) and I am trying to use helm to install kong on rancher2.2.2 with kubernetes1.13.5. I’ve followed the 2.x installation instructions for a high availability cluster running on two boxes and created a second cluster to manage nonprod services. This is intentional. My next task is to install kong on this cluster using helm and after a little bit of trial and error have that working as well, but I now have concerns about my configuration.
To accomplish this I ran:
helm install stable/kong
And I provisioned a persistent volume with:
kubectl apply -f volume.yml
However, I need to add a lot more services and I suspect that a more scalable approach to this is storage classes. I tried to use them with little to no success (From command line or UI) and I now suspect that something about the second cluster is wrong. My exact issue is hard to pin down because the storage classes appear to be healthy, they just do not interact with the deployed kong and there is no kubernetes service discovery, which exists in the high availability cluster.
The storage classes are created by
kubectl apply -f storage.yml
It is very possible I have failed to create storage classes properly, but the UI is pretty simple and the code comes directly from the kubernetes documentation. I understand the forum probably wants logs/configs of some variety but I’m not sure exactly which ones to provide. I’ve attached all of the relevant code below, I’ll do my best to provide any other resources.
References
volume.yml:
apiVersion: v1
kind: PersistentVolume
metadata:
name: example-local-pv
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
local:
path: /data
nodeAffinity:
required:
nodeSelectorTerms:- matchExpressions:
- key: hostname
operator: DoesNotExist
- key: hostname
- matchExpressions:
storage.yml:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
Documentation
https://hub.kubeapps.com/charts/stable/kong
https://rancher.com/docs/rancher/v2.x/en/installation/ha/
https://kubernetes.io/docs/concepts/storage/storage-classes/