Closed spotlesscoder closed 3 years ago
@CodingSpiderFox - Typically you'd do that by deploying a StorageClass object / manifest using the module. The way a specific StorageClass is configured is very vendor/provider-specific. But in general, it is deployed using k8s
just like any other resource in Kubernetes.
@CodingSpiderFox Like @geerlingguy said -
---
- hosts: localhost
tasks:
- name: Create a storage class
community.kubernetes.k8s:
state: present
definition:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage
namespace: default
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
Closed as per above.
Feel free to open a new issue if there is any problem. Thanks.
Sorry, was very busy with other things, I will open a new issue in case there is a further problem
SUMMARY
After deploying a new cluster with kubespray, it has no storageClasses at all and I want to use ansible to provision a default storageClass.
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 20.04
STEPS TO REPRODUCE
See kubespray documentation for setting up kubespray
EXPECTED RESULTS
StorageClass is available in cluster
ACTUAL RESULTS
I can find nothing in the collection that would allow me to do that