I use managed k8s silution on AliCloud. I created storageClass such as:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: alicloud-pv-class
parameters:
type: cloud_ssd
regionid: cn-beijing
zoneid: cn-beijing-g
provisioner: alicloud/disk
reclaimPolicy: Retain
volumeBindingMode: Immediate
When I try to create pvc:
apiVersion: v1
kind: List
items:
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: node-pv
spec:
accessModes:
- ReadWriteOnce
storageClassName: alicloud-pv-class
resources:
requests:
storage: 8Gi
I get:
Name: node-pv
Namespace: default
StorageClass: alicloud-pv-class
Status: Pending
Volume:
Labels: <none>
Annotations: volume.beta.kubernetes.io/storage-provisioner: alicloud/disk
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Mounted By: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ExternalProvisioning 11s (x6 over 75s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "alicloud/disk" or manually created by system administrator
Eventhough I create manually pvc and bind it to pv and install helm chart for zookeeeper I am getting from the pod:
mkdir: cannot create directory '/bitnami/zookeeper/data': Permission denied
Any ideas?
I was not able to solve the issue but the problems I had was related to Aliyun Managed Serverless K8s. Even Aliyun Support admitted that such configuration is difficult. They have not provided any solution. We decided to go with Managed K8s (non-serveless). We use Terraform scripts. Everything works out of the box including Ingress, LogTrail, PvC which were a real pain with serverless managed k8s.
The point is - dont waste your time with Managed Serveless K8s if you need logs and pvc. It doesnt work - at least hasn't worked for us and not much help from Aliyun support for that matter.