Hello All,
is it any way to turn dynamic provisioner off in kubernetes? I would like to force kubernetes using PVs which are defined and if it find no one I would like him to drop an error...
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
kubectl get sc
NAME TYPE
default kubernetes.io/aws-ebs
gp2 kubernetes.io/aws-ebs
tk-1a kubernetes.io/aws-ebs
tkvolumes kubernetes.io/aws-ebs
However dynamic provisioning is still working...
> You can delete the default storageclass by setting the is-default annotation to false:
> http://blog.kubernetes.io/2017/03/dynamic-provisioning-and-storage-classes-kubernetes.html
>
>
> On Sun, May 21, 2017 at 12:41 AM, <kape...@gmail.com> wrote:
> Hello All,
>
> is it any way to turn dynamic provisioner off in kubernetes? I would like to force kubernetes using PVs which are defined and if it find no one I would like him to drop an error...
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
>
> To post to this group, send email to kubernet...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/1P21gSLdX58/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-use...@googlegroups.com.
Thank you Michelle, I check the idea not using classes. It sounds like a solution for me ;)
pon., 22 maj 2017, 19:26 użytkownik 'Michelle Au' via Kubernetes user discussion and Q&A <kubernetes-users@googlegroups.com> napisał:
It looks like you have a number of user-installed storage classes. If you don't want to use storage classes at all, then you should delete all of them. Otherwise, in your PVC, specify "" as the storageclass name to bind to pre-existing PVs that don't have a storage class.On Sun, May 21, 2017 at 3:09 PM, <kape...@gmail.com> wrote:Actually, no one of my classes is 'default' class:
kubectl get sc
NAME TYPE
default kubernetes.io/aws-ebs
gp2 kubernetes.io/aws-ebs
tk-1a kubernetes.io/aws-ebs
tkvolumes kubernetes.io/aws-ebs
However dynamic provisioning is still working...
> You can delete the default storageclass by setting the is-default annotation to false:
> http://blog.kubernetes.io/2017/03/dynamic-provisioning-and-storage-classes-kubernetes.html
>
>
> On Sun, May 21, 2017 at 12:41 AM, <kape...@gmail.com> wrote:
> Hello All,
>
> is it any way to turn dynamic provisioner off in kubernetes? I would like to force kubernetes using PVs which are defined and if it find no one I would like him to drop an error...
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
>
> To post to this group, send email to kubernet...@googlegroups.com.
>
> Visit this group at https://groups.google.com/group/kubernetes-users.
>
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/1P21gSLdX58/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Name: default
IsDefaultClass: No
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1beta1","kind":"StorageClass","metadata":{"annotations":{},"labels":{"k8s-addon":"storage-aws.addons.k8s.io"},"name":"default","namespace":""},"parameters":{"type":"gp2"},"provisioner":"kubernetes.io/aws-ebs"}
Provisioner: kubernetes.io/aws-ebs
Parameters: type=gp2
Events: <none>
Name: gp2
IsDefaultClass: No
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1beta1","kind":"StorageClass","metadata":{"annotations":{"storageclass.beta.kubernetes.io/is-default-class":"true"},"labels":{"k8s-addon":"storage-aws.addons.k8s.io"},"name":"gp2","namespace":""},"parameters":{"type":"gp2"},"provisioner":"kubernetes.io/aws-ebs"}
,storageclass.beta.kubernetes.io/is-default-class=false,storageclass.kubernetes.io/is-default-class=false
Provisioner: kubernetes.io/aws-ebs
Parameters: type=gp2
Events: <none>
Name: tk-1a
IsDefaultClass: No
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1beta1","kind":"StorageClass","metadata":{"annotations":{},"name":"tk-1a","namespace":""},"parameters":{"type":"gp2","zone":"eu-west-1a"},"provisioner":"kubernetes.io/aws-ebs"}
,storageclass.beta.kubernetes.io/is-default-class=false,storageclass.kubernetes.io/is-default-class=false
Provisioner: kubernetes.io/aws-ebs
Parameters: type=gp2,zone=eu-west-1a
Events: <none>
Name: tkvolumes
IsDefaultClass: No
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1beta1","kind":"StorageClass","metadata":{"annotations":{},"name":"tkvolumes","namespace":""},"parameters":{"type":"gp2"},"provisioner":"kubernetes.io/aws-ebs"}
,storageclass.beta.kubernetes.io/is-default-class=false,storageclass.kubernetes.io/is-default-class=false
Provisioner: kubernetes.io/aws-ebs
Parameters: type=gp2
Events: <none>
According to documentation "gp2" should be default one, I tried to turn it off using:
kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.beta.kubernetes.io/is-default-class":"false"}}}'
But when I look at the result above I'm not sure it is correct.
If in your PVC, you:1. Specify a storage class: Will try to find an existing PV with the same storageclass. If none exists, it will try to dynamically provision one.2. Don't specify a storage class: If you have a default storageclass in your cluster, it will dynamically provision one. Otherwise it will look for PVs with an empty storageclass3. Specify empty storage class: It will look for PVs with an empty storageclassIt looks like your gp2 storageclass is set to be the default, when you look at the annotations. (I think there is a display bug in kubectl describe that shows the field as false).
On Sat, May 27, 2017 at 11:38 AM, <kape...@gmail.com> wrote:
OK, I think I got this now.
If I use storage class in PVClaim kubernetes will try to find existing PV first. If there is no one, then it will be created automatically regardless if selected class is default or not.
Correct me someone if I'm wrong here ;)
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.