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

Updating minikube version #301

Merged
merged 1 commit into from
May 6, 2020

Conversation

liranmauda
Copy link
Contributor

@liranmauda liranmauda commented May 6, 2020

  • Update minikube version to 1.8.2
  • Update kubernetes version to 1.17.3
  • Installing conntrack
  • Added MINIKUBE_DEBUG="--alsologtostderr --v=5" commented out by default
  • removed the "--extra-config=apiserver.authorization-mode=RBAC" flag as it no longer needed in kubernetes 1.17 and up

@liranmauda liranmauda requested a review from nimrod-becker May 6, 2020 06:38
@liranmauda
Copy link
Contributor Author

Currently failing due to kubernetes/minikube#7058

@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda Are you sure this is the same issue from minikube? In our case we use minikube config set vm-driver none and in the issue it was virtualbox.

Perhaps with vm-driver none the issue is that minikube doesn't support ubuntu xenial out of the box and requires some prior setup. Here is where we configure the distro:
https://github.com/noobaa/noobaa-operator/blob/master/.travis.yml#L1-L2

I would look for issues with ubuntu xenial and driver none.

@guymguym
Copy link
Member

guymguym commented May 6, 2020

Here are the minikube docs for driver none:
https://minikube.sigs.k8s.io/docs/drivers/none/

@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda
Copy link
Contributor Author

in the example above, they use kubectl 1.18.1, let's try that.

@guymguym
Copy link
Member

guymguym commented May 6, 2020

Still failing but I see this info - seems like the only error is that you need to install conntrack

W0506 11:14:28.324671    5132 exit.go:101] Error starting cluster: init failed. output: "

-- stdout --
[init] Using Kubernetes version: v1.18.1
[preflight] Running pre-flight checks

-- /stdout --

** stderr ** 
W0506 11:14:27.469164    5265 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
    [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
    [WARNING FileExisting-ebtables]: ebtables not found in system path
    [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR FileExisting-conntrack]: conntrack not found in system path
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher

** /stderr **

": /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.18.1:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml  --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,SystemVerification": exit status 1

@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda add sudo apt-get -y install conntrack like we see here

@liranmauda
Copy link
Contributor Author

@guymguym already did, it failed.
lets try change the distro to ubuntu bionic ?

@guymguym
Copy link
Member

guymguym commented May 6, 2020

Can you add --v=5 like they suggest?

@guymguym
Copy link
Member

guymguym commented May 6, 2020

Also worth trying minikube version 1.8.1 like in the minikube-travis example

@guymguym
Copy link
Member

guymguym commented May 6, 2020

Check this out - 11 days ago - kubernetes/minikube#7905

@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda OK ignore previous link, but I think this one might be the issue:
kubernetes/minikube#6061

Here is the solution from it:

Notice this warning:
W1211 16:40:12.204626 4562 manifests.go:214] the default kube-apiserver authorization-mode is "Node,RBAC"; using "RBAC"

If you really want to specify particular modes, please use --extra-config=apiserver.authorization-mode=Node,RBAC with Kubernetes v1.17.x and newer.

@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda How about trying to remove that extra-config flag altogether? I don't think we need it on new kubernetes (not sure, but worth trying)

@liranmauda
Copy link
Contributor Author

@liranmauda How about trying to remove that extra-config flag altogether? I don't think we need it on new kubernetes (not sure, but worth trying)

ho, i thought so but first pushed with --extra-config=apiserver.authorization-mode=Node,RBAC

@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda The tests are still running but minikube start finally worked!

@guymguym
Copy link
Member

guymguym commented May 6, 2020

I think it will work the same if you remove this flag so I would do that.

Also remember to revert the dist back to xenial, set the minikube/kubernetes versions you want to use, and move these flags MINIKUBE_DEBUG="--alsologtostderr --v=5" that will be commented out by default.

@liranmauda
Copy link
Contributor Author

It is looping on

+ main@.travis/install-minikube.sh:49 kubectl get pods --all-namespaces

NAMESPACE     NAME                                                                      READY   STATUS             RESTARTS   AGE

kube-system   coredns-66bff467f8-s6w9v                                                  0/1     CrashLoopBackOff   6          7m11s

kube-system   coredns-66bff467f8-tzdpn                                                  0/1     CrashLoopBackOff   6          7m11s

kube-system   etcd-travis-job-7f17877f-c6d3-455a-8a2b-3b151eff4bd4                      1/1     Running            0          7m18s

kube-system   kube-apiserver-travis-job-7f17877f-c6d3-455a-8a2b-3b151eff4bd4            1/1     Running            0          7m18s

kube-system   kube-controller-manager-travis-job-7f17877f-c6d3-455a-8a2b-3b151eff4bd4   1/1     Running            0          7m18s

kube-system   kube-proxy-fnm4b                                                          1/1     Running            0          7m11s

kube-system   kube-scheduler-travis-job-7f17877f-c6d3-455a-8a2b-3b151eff4bd4            1/1     Running            0          7m18s

kube-system   storage-provisioner                                                       1/1     Running            0          7m17s

@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda It waits for kube-addon-manager. I think this check is unneeded (it's a check we copied from somewhere which is obviously outdated):

# waiting for kube-addon-manager to be ready
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lcomponent=kube-addon-manager -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-addon-manager to be available"; kubectl get pods --all-namespaces; done

@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda liranmauda force-pushed the liran-update-minikube-version branch from 6553511 to 5b4d16d Compare May 6, 2020 12:15
@guymguym
Copy link
Member

guymguym commented May 6, 2020

The two last steps in that script are irrelevant to us, because they try to deploy a redis pod, so that's not needed. But the first two are relevant:

# Following is just to demo that the kubernetes cluster works.
- kubectl cluster-info
# Wait for kube-dns to be ready.
- JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl -n kube-system get pods -lk8s-app=kube-dns -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1;echo "waiting for kube-dns to be available"; kubectl get pods --all-namespaces; done

@guymguym
Copy link
Member

guymguym commented May 6, 2020

failed on MINIKUBE_DEBUG unbound variable - you need to set it to empty by default, and no need to export it.

@liranmauda
Copy link
Contributor Author

is this relevant?

# Create example Redis deployment on Kubernetes.
- kubectl run travis-example --image=redis --labels="app=travis-example"

@guymguym
Copy link
Member

guymguym commented May 6, 2020

Not relevant - I tried to write about it in this previous comment

@liranmauda
Copy link
Contributor Author

Nice the tests started :)

- Update minikube version to 1.8.2
- Update kubernetes version to 1.17.3
- Installing conntrack
- Added MINIKUBE_DEBUG="--alsologtostderr --v=5"  commented out by default
- removed the "--extra-config=apiserver.authorization-mode=RBAC" flag as it no longer needed in kubernetes 1.17 and up
@liranmauda liranmauda force-pushed the liran-update-minikube-version branch from 68a1326 to 4042f25 Compare May 6, 2020 12:49
@liranmauda liranmauda requested a review from guymguym May 6, 2020 12:51
@guymguym
Copy link
Member

guymguym commented May 6, 2020

@liranmauda The failure is in test-cli-flow, is it related to the new version?

@liranmauda liranmauda merged commit cc7c912 into noobaa:master May 6, 2020
@liranmauda liranmauda deleted the liran-update-minikube-version branch October 18, 2022 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants