Hi I'm new to k8s and helm ecosystem.
I constructed my own k8s cluster using kubespray with EC2 (I can use EKS but for the purpose of practice) and the next step is using helm.
I'm trying to deploy mysql chart to my k8s cluster.
My env
- k8s cluster with 1 master and 3 nodes (all of them are ec2 t2.small instance)
- using mysql chart from https://github.com/helm/charts/tree/master/stable/mysql
# storage class manifest
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
#volumeBindingMode: WaitForFirstConsumer
# values.yaml from mysql chart
## Persist data to a persistent volume
persistence:
enabled: true
## database data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: "local-storage" # <-- Changed this to use my own storage class
accessMode: ReadWriteOnce
size: 1Gi # <-- Changed this since only 2.5GB is available on each node
annotations: {}
...
Problem
There is an error on pvc. Below is related logs.
ubuntu@nodec1:~/charts/stable/mysql$ kubectl describe pvc/mysqlserver
Name: mysqlserver
Namespace: default
StorageClass: local-storage
Status: Pending
Volume:
Labels: app=mysqlserver
app.kubernetes.io/managed-by=Helm
chart=mysql-1.6.9
heritage=Helm
release=mysqlserver
Annotations: meta.helm.sh/release-name: mysqlserver
meta.helm.sh/release-namespace: default
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Mounted By: mysqlserver-5d5cfcd5f8-922k4
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ProvisioningFailed 6s (x3 over 21s) persistentvolume-controller no volume plugin matched name: kubernetes.io/no-provisioner
I have no idea why pvc cannot use kubernetes.io/no-provisioner
plugin from my own local-storage
storageclass.
Can anybody help on this issue?