I have installed a microstack snap environment on two ubuntu 18.04. machines. After installing juju and deploying kubernetes-core, I realized that I could not deploy k8s-charms on an openstack-cloud (correct me if I am wrong). So I am trying to add another k8s-cloud through juju add-k8s k8s-cloud, but getting
ERROR Juju needs to know what storage class to use to provision workload and operator storage
Is there a command to list all available storage classes or is there another way to solve this problem ?
There’s a couple of ways to solve it depending on where k8s is provisioned.
You can always deploy Charmed Kubernetes to your openstack and use the Openstack integrator charm, which will create a Storage Class with the correct annotations for Juju to recognise.
Or you could snap install microk8s and Juju will recognise its hostpath storage and use that.
Or if it’s some other k8s cluster Juju doesn’t know about, just ensure you have a default Storage Class set up and Juju will use that. Not that nodes in your k8s will need to be able to talk back to the Openstack cloud as that’s where the controller is running.
BTW, to list available k8s storage classes, use kubectl get sc
Another option is to bootstrap a new controller to the k8s cluster - there’s no hard requirement to have to use the Openstack controller to manage the k8s workloads. And you can still cross model relate k8s to Openstack workloads between the 2 separate controllers if needed.