When I run kos kubectl get storageclass
I notice it is not provisioned and I have to add it manually. I am little unsure though on the exact procedure. The [Documentation][https://docs.k0sproject.io/main/storage/] says k0s comes with OpenEBS installed. What I am unsure of is how to enable this extension in the config file.
My existing config file has this only (I assume this should be the default config file. Is this correct ?) :
spec:
api:
externalAddress
I have run k0s stop
then amended the config file as follows:
spec:
api:
externalAddress
extensions:
storage:
type: openebs_local_storage
After this config change I still get the same error they is no storageclass found for the cluster. Do I need to also reinstall/install k0s, am a bit unsure because the existing k0s.yaml seems to have very little config parameters as compared to the sample given in the link .
EDIT: Using Documentation I have proceeded to generate a new k0s.yaml that uses the existing default settings. Turns out it overwrites the existing k0s.yaml (given above) : I have also effected changes to the new yaml file to produce this :
apiVersion: k0s.k0sproject.io/v1beta1
kind: ClusterConfig
metadata:
creationTimestamp: null
name: k0s
spec:
api:
address: 10.XXX.XXX.XXX
k0sApiPort: 9443
port: 6443
sans:
- 10.XX.XX.XXX
- 172.XX.XX.XXX
- 10.XX.XX.XXX
- 10.XX.XX.XXX
- fe80::XXX:XXX:XXX:XXX
- fe80::XXX:XXX:XXX:XXX
- fe80::XXX:XXX:XXX:XXX
- fe80::XXX:XXX:XXX:XXX
- fe80::XXX:XXX:XXX:XXX
- fe80::XXX:XXX:XXX:XXX
tunneledNetworkingMode: false
controllerManager: {}
extensions:
helm:
charts: null
repositories: null
storage:
create_default_storage_class: true
type: openebs_local_storage
images:
calico:
cni:
image: docker.io/calico/cni
version: v3.21.2
kubecontrollers:
image: docker.io/calico/kube-controllers
After this change I proceed to do a reinstall of the cluster (with the new config) :
k0s install controller -c /etc/k0s/k0s.yaml
but I am now getting an error :
Error: failed to install k0s service: failed to install service: Init already exists: /etc/systemd/system/k0scontroller.service