Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change the default storage class. #3495

Closed
jasoncwik opened this issue Dec 29, 2018 · 1 comment
Closed

Unable to change the default storage class. #3495

jasoncwik opened this issue Dec 29, 2018 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jasoncwik
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
/kind bug

NOTE: This is a clone of kubernetes/kubernetes#66222. The original fix was done inside kubernetes core and didn't fix minikube. I will provide a PR for minikube shortly.

What happened:
Not able to change the default storage class.

What you expected to happen:
Default storage class to change.

How to reproduce it (as minimally and precisely as possible):

storageclass "standard" patched

$ kubectl describe sc standard
Name:            standard
IsDefaultClass:  No
Annotations:     kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{"storageclass.beta.kubernetes.io/is-default-class":"true"},"labels":{"addonmanager.kubernetes.io/mode":"Reconcile"},"name":"standard","namespace":""},"provisioner":"k8s.io/minikube-hostpath"}
,storageclass.beta.kubernetes.io/is-default-class=false
Provisioner:        k8s.io/minikube-hostpath
Parameters:         <none>
ReclaimPolicy:      Delete
VolumeBindingMode:  Immediate
Events:             <none>

$ kubectl get sc
NAME                        PROVISIONER                AGE
rook-ceph-block (default)   ceph.rook.io/block         14h
standard                    k8s.io/minikube-hostpath   14h

But after few mins.

$ kubectl get sc --watch
NAME                        PROVISIONER                AGE
rook-ceph-block (default)   ceph.rook.io/block         14h
standard                    k8s.io/minikube-hostpath   14h
standard (default)   k8s.io/minikube-hostpath   14h 

$ kubectl get sc
NAME                        PROVISIONER                AGE
rook-ceph-block (default)   ceph.rook.io/block         14h
standard (default)          k8s.io/minikube-hostpath   14h

$ kubectl describe sc rook-ceph-block
Name:               rook-ceph-block
IsDefaultClass:     Yes
Annotations:        storageclass.beta.kubernetes.io/is-default-class=true
Provisioner:        ceph.rook.io/block
Parameters:         clusterNamespace=rook-ceph,pool=replicapool
ReclaimPolicy:      Delete
VolumeBindingMode:  Immediate
Events:             <none>
Anything else we need to know?:
Tried to remove the annotation but no luck.

Please provide the following details:

Environment: Ubuntu 16.04

Minikube version (use minikube version): 0.31

  • OS (e.g. from /etc/os-release):
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): none
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION):
  • Install tools:
  • Others:
    The above can be generated in one go with the following commands (can be copied and pasted directly into your terminal):
minikube version
echo "";
echo "OS:";
cat /etc/os-release
echo "";
echo "VM driver:"; 
grep DriverName ~/.minikube/machines/minikube/config.json
echo "";
echo "ISO version";
grep -i ISO ~/.minikube/machines/minikube/config.json

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Output of minikube logs (if applicable):

Anything else do we need to know:

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 29, 2018
jasoncwik pushed a commit to jasoncwik/minikube that referenced this issue Dec 29, 2018
Change the policy for the minikube-hostpath storage class addon from
Reconcile to EnsureExists. When it's set to reconcile, it's impossible
to change the default storage class in Minikube because it will keep
setting the minikube-hostpath storageclass to default.

Ported from kubernetes/kubernetes#66235
jasoncwik added a commit to jasoncwik/minikube that referenced this issue Dec 29, 2018
Change the policy for the minikube-hostpath storage class addon from
Reconcile to EnsureExists. When it's set to reconcile, it's impossible
to change the default storage class in Minikube because it will keep
setting the minikube-hostpath storageclass to default.

Ported from kubernetes/kubernetes#66235
tstromberg added a commit that referenced this issue Jan 9, 2019
@tstromberg
Copy link
Contributor

Closing as the PR has merged. Please re-open if this is in error. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants