Closed Madhu-1 closed 4 years ago
am seeing this issue when i enable --extra-config=apiserver.enable-admission-plugins=PodSecurityPolicy
when starting minkube
Your root cause is here:
Mar 30 04:12:35 minikube kubelet[3731]: E0330 04:12:35.270384 3731 kubelet.go:1663] Failed creating a mirror pod for "kube-apiserver-minikube_kube-system(261527358c97b97187fa626a08a809b6)": pods "kube-apiserver-minikube" is forbidden: no providers available to validate pod request
I believe you will need to provide additional configuration to use PSP, otherwise the apiserver won't be allowed to start-up. Do you mind checking if the guidance at https://minikube.sigs.k8s.io/docs/tutorials/using_psp/ is helpful?
@tstromberg we are using PSP with minikube 1.6.0 and all is working fine https://github.com/ceph/ceph-csi/blob/master/scripts/minikube.sh#L81-L97 this is failing on minikube 1.8.0 onwards
@Madhu-1 here are couple things to try. and I am curious to see the result:
1- Does it work with latest minikube and setting kubernetes version to an older version ? (the one existed before 1.8.0) ?
minikube start --kubernetes-version=....
2- Does it with work latest minikube version and an old VM ISO? you can specify the iso_url
minikube start --kubernetes-version=.... iso_url=""
@medyagh no its didn't work with any of the kubernetes version. Even I specified 1.6.0. ISO when starting the minikube it failed for me
minikube start --memory="${MEMORY}" --iso-url='https://storage.googleapis.com/minikube/iso/minikube-v1.6.0.iso' -b kubeadm --kubernetes-version="${KUBE_VERSION}" --vm-driver="${VM_DRIVER}" --feature-gates="${K8S_FEATURE_GATES}" ${EXTRA_CONFIG}
@Madhu-1 - When you mention that this works in minikube v1.6.0, what version of Kubernetes were you using?
@Madhu-1 - When you mention that this works in minikube v1.6.0, what version of Kubernetes were you using?
we are using kubernetes 1.14.10, 1.15.6 and 1.17.0
Same to me with minikube v1.9.2, k8s v1.18.0, docker 19.03.8
Same setup as @elluvium + driver=docker , same issue.
Looking through the logs it appears this issue occurs because psp admission controller is enabled but the psp.yaml (as described in tutorial ) is not applied which blocks system pods from starting.
Manually running the psp.yaml using kubectl during the 'minikube start' in separate terminal after control plane is active gets round this issue.
@tstromberg @medyagh any update on this one?
@GaryBissland has the right workaround. @Madhu-1 - you didn't mention anything about psp.yaml
, did you place it in the appropriate place?
https://minikube.sigs.k8s.io/docs/tutorials/using_psp/
If so, I think we have a regression with supporting a local addons directory. Please include the output of minikube start --alsologtostderr
yes am placing PSP at the same location specified in the tutorial ( things are working fine if I use minikube 1.6.2
minikube.log attaching the logs here
@tstromberg any update on when this will be fixed?
I think to fix this issue, on minikube start
we need to get all of the files in /etc/kubernetes/addons
and apply all of them.
This could be added in this function:
and we would add the additional files to this list:
If anyone is interested in fixing this, feel free to assign yourself to the issue by commenting /assign
Steps to reproduce the issue:
1.download minikube 1.9.0
Full output of failed command: >
Full output of
minikube start
command used, if not already included:attaching logs in a file minikube.log
Optional: Full output of
minikube logs
command: