skip to Main Content

I am trying to enable ingress in minkube. When I run minikube addons enable ingress it hangs for a while then I get the following error message:

❌  Exiting due to MK_ADDON_ENABLE: run callbacks: running callbacks: [sudo KUBECONFIG=/var/lib/minikube/kubeconfig /var/lib/minikube/binaries/v1.19.15/kubectl apply -f /etc/kubernetes/addons/ingress-deploy.yaml: Process exited with status 1
stdout:
namespace/ingress-nginx unchanged
serviceaccount/ingress-nginx unchanged
configmap/ingress-nginx-controller unchanged
configmap/tcp-services unchanged
configmap/udp-services unchanged
clusterrole.rbac.authorization.k8s.io/ingress-nginx unchanged
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx unchanged
role.rbac.authorization.k8s.io/ingress-nginx unchanged
rolebinding.rbac.authorization.k8s.io/ingress-nginx unchanged
service/ingress-nginx-controller-admission unchanged

stderr:
error: error validating "/etc/kubernetes/addons/ingress-deploy.yaml": error validating data: [ValidationError(Service.spec): unknown field "ipFamilies" in io.k8s.api.core.v1.ServiceSpec, ValidationError(Service.spec): unknown field "ipFamilyPolicy" in io.k8s.api.core.v1.ServiceSpec]; if you choose to ignore these errors, turn validation off with --validate=false
 waiting for app.kubernetes.io/name=ingress-nginx pods: timed out waiting for the condition]

╭───────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                           │
│    😿  If the above advice does not help, please let us know:                             │
│    👉  https://github.com/kubernetes/minikube/issues/new/choose                           │
│                                                                                           │
│    Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue.    │
│    Please also attach the following file to the GitHub issue:                             │
│    - /tmp/minikube_addons_2c0e0cafd16ea0f95ac51773aeef036b316005b6_0.log                  │
│                                                                                           │
╰───────────────────────────────────────────────────────────────────────────────────────────╯

This the the minikube start command I used:
minikube start --kubernetes-version=v1.19.15 --vm-driver=docker

I have tried reinstalling minikube. It was working fine last week when I ran the same command.

If more specific information is needed please let me know and I will edit the question. Does anyone know how I could go about fixing this?

Thanks in advance.

6

Answers


  1. Chosen as BEST ANSWER

    Downgrading to minikube v1.23.2 fixed the issue.


    1. Which operating system are you using?
    # If you are using Mac:
    brew install docker-machine-driver-vmware
    # Start a cluster using the vmware driver:
    minikube start --driver=vmware
    # To make vmware the default driver:
    minikube config set driver vmware
    
    Login or Signup to reply.
  2. Upgrading to minikube v1.26.0 fixed the issue.

    Login or Signup to reply.
  3. The error in my case is:

    X Exiting due to MK_ADDON_ENABLE: run callbacks: running callbacks: [NewSession: new client: new client: Error creating new native config from ssh using: docker, &{[] [C:Users<user>.minikubemachinesminikubeid_rsa]}: open C:Users<user>.minikubemachinesminikubeid_rsa: Access is denied. waiting for app.kubernetes.io/name=ingress-nginx pods: timed out waiting for the condition]

    Simple fix is to run PowerShell using Administrator (I’m on Windows).
    I am using v1.26.0.

    Login or Signup to reply.
  4. minikube delete --all --purge
    
    
    minikube addons enable ingress
    
    Login or Signup to reply.
  5. Bit late, but I hope someone find this useful, this happens becouse minikube could not pull the image(ingress-nginx-controller) in time, the way to know is:

    kubectl get pod -n ingress-nginx
    

    If the ingress-nginx-controller-xxxx (xxxx is the identifier of the pod) has a status of ImagePullBackOff or something like that, you are on this scenario.

    To fix you will need to first describe you pod:

    kubectl describe pod ingress-nginx-controller-xxxxx -n ingress-nginx
    

    Look under containers/controller/images and copy its value(don’t need to copyp the @sha256:… if it contains it). You must to manually pull it, but before probably delete the related deployment as well:

    kubectl delete deployment ingress-nginx-controller -n ingress-nginx
    

    And then pull the image from the vm itself, in my case looks like this:

    minikube ssh docker pull k8s.gcr.io/ingress-nginx/controller:v1.2.1
    

    Wait for it and then try to "addons enable ingress" again and see if it works, it did it for me.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search