2

I try to install minikube on my server - it is a virtual server, therefore I only have the option to run it with --vm-driver=none. However, I face an error during preflight:

error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

When I run the following command (to fix problem), I get a permission denied, even as root.

echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables

This question is not really about minikube, more about why I don't have write access to that file, even when I am root.

I followed the suggestions in this post, but got stuck with the permission denied. The post is relevant as minikube internally uses kubeadm.

Alex Menz
  • 51
  • 1
  • 5
  • The link you shared is connected to kubeadm and not to minikube. Please post the output from your preflight. What is the error? – Mark Watney Jun 09 '20 at 10:51
  • error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1 [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...` – Alex Menz Jun 09 '20 at 17:11
  • This message is coming from the minikube vm created by minikube. That's why you actually can't run the command. Update your question and include how are you installing and starting your minikube. Please give as much details as you can so I can reproduce it. It's really hard to guess what is happening with the information you gave. Please read [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). – Mark Watney Jun 10 '20 at 11:26
  • I do not use a VM - I start minikube like this: [root@localhost ~]# minikube start --vm-driver=none * minikube v1.11.0 on Centos 7.8.2003 (openvz/amd64) * Using the none driver based on existing profile * Starting control plane node minikube in cluster minikube * Restarting existing none bare metal machine for "minikube" ... * OS release is CentOS Linux 7 (Core) * Preparing Kubernetes v1.18.3 on Docker 18.06.1-ce ... – Alex Menz Jun 10 '20 at 12:46
  • You can edit your question and include this information in a better way. – Mark Watney Jun 10 '20 at 12:49
  • Did you had time to check my answer? It helped you to solve your problem? If yes, please consider to accept and upvote it. [What should I do when someone answers my question?](https://stackoverflow.com/help/someone-answers). – Mark Watney Jun 25 '20 at 07:37
  • unfortunately not yet - the clean installation will of the OS will have to wait. – Alex Menz Jun 26 '20 at 08:25

1 Answers1

0

I tried to reproduce your scenario but it worked as designed for me. I will share with you the steps I followed to install it and you can follow the same steps on a freshly installed CentOS (please, don't use the same installation as it may have something wring that is avoiding it from working).

NOTE: Run all commands as root.

Installing Docker CE:

# yum install -y yum-utils
# yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
# yum install docker-ce docker-ce-cli containerd.io

Installing minikube:

# yum install conntrack
# curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64   && chmod +x minikube
# mkdir -p /usr/local/bin/
# install minikube /usr/local/bin/

Installing kubectl:

# curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
# chmod +x ./kubectl
# mv ./kubectl /usr/local/bin/kubectl

Running Minikube:

# minikube start --vm-driver=none

Testing your Cluster:

# kubectl get nodes
NAME              STATUS   ROLES    AGE   VERSION
centos-minikube   Ready    master   19m   v1.18.3
Mark Watney
  • 5,268
  • 2
  • 11
  • 33