qingcloud-volume-provisioner is a volume plugin deployed on QingCloud. This plugin will handle the volume operations requested from Kubernetes API server. Support IaaS: QingCloud.
Extract the package and grant the extracted file with excuting access:
chmod +x *
Run command as this:
./qingcloud-flex-volume --install=true
Go to QingCloud console and create an API access key
Create the config file /etc/qingcloud/client.yaml, which is used to access QingCloud IaaS resource, example as below: qy_access_key_id: "your access key" qy_secret_access_key: "your secret key" zone: "your zone"
log_level: warn
connection_retries: 1
connection_timeout: 5
host: "api.ks.qingcloud.com"
port: 80
protocol: "http"
Modify kubelet config file and config volume plugin, example as below:
KUBELET_EXTRA_ARGS="--node-labels=role={{getv "/host/role"}},node_id={{getv "/host/node_id"}} --max-pods 60 --feature-gates=AllAlpha=true,DynamicKubeletConfig=false,RotateKubeletServerCertificate=false,RotateKubeletClientCertificate=false --root-dir=/data/var/lib/kubelet --cert-dir=/data/var/run/kubernetes --enable-controller-attach-detach=true --volume-plugin-dir=/usr/libexec/kubernetes/kubelet-plugins/volume/exec/", please make sure KUBELET_EXTRA_ARGS is added into your kubelet.service file
Modify the config file of controller manager, and enable flex volume plugin and related mount configuraiton, refer to kube-controller-manager.yaml, you could search with key word 'flex'