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

failed to install kubeadm #442

Closed
Kube-ASY opened this issue May 13, 2019 · 0 comments · Fixed by #443
Closed

failed to install kubeadm #442

Kube-ASY opened this issue May 13, 2019 · 0 comments · Fixed by #443
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.
Milestone

Comments

@Kube-ASY
Copy link

What happened:
I tried to install a new KubeOne cluster with the following config:

apiVersion: kubeone.io/v1alpha1
kind: KubeOneCluster
name: demo
versions:
  kubernetes: "1.13.2"
cloudProvider:
  name: "none"
hosts:
- publicAddress: '1.2.3.4'
  privateAddress: '172.18.0.1'
  sshPort: 22 # can be left out if using the default (22)
  sshUsername: ubuntu
machineController:
  deploy: false
  provider: "none"

This failed with the following issue:

~/go/bin/kubeone install config.yaml
INFO[15:33:05 CEST] Installing prerequisites…
INFO[15:33:05 CEST] Determine operating system…                   node=172.18.0.1
INFO[15:33:05 CEST] Determine hostname…                           node=172.18.0.1
INFO[15:33:05 CEST] Creating environment file…                    node=172.18.0.1
INFO[15:33:05 CEST] Installing kubeadm…                           node=172.18.0.1 os=centos
ERRO[15:33:05 CEST] failed to install kubeadm: + sudo swapoff -a
+ sudo sed -i '/.*swap.*/d' /etc/fstab
+ sudo setenforce 0
setenforce: SELinux is disabled: failed to exec command: export "PATH=$PATH:/sbin:/usr/local/bin:/opt/bin"

set -xeu pipefail


sudo swapoff -a
sudo sed -i '/.*swap.*/d' /etc/fstab
sudo setenforce 0
sudo sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/sysconfig/selinux

source /etc/kubeone/proxy-env

# Short-Circuit the installation if it was arleady executed
if type docker &>/dev/null && type kubelet &>/dev/null; then exit 0; fi

cat <<EOF |sudo tee  /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sudo sysctl --system

cat <<EOF |sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
exclude=kube*
EOF

sudo yum install -y --disableexcludes=kubernetes \
                        docker kubelet-1.13.2-0\
                        kubeadm-1.13.2-0 \
                        kubectl-1.13.2-0 \
                        kubernetes-cni-0.6.0-0
sudo systemctl enable --now docker
: Process exited with status 1  node=172.18.0.1
WARN[15:33:05 CEST] Task failed, retrying…
Error: failed to install prerequisites: at least one of the tasks has encountered an error

What is the expected behavior:
Installation proceeds.

How to reproduce the issue:
Try to install on a host with already disabled SELinux.

Anything else we need to know?

sudo setenforce 0
setenforce: SELinux is disabled
echo $?
1

Information about the environment:
KubeOne version (kubeone version): v0.6.0-4-g532c39b
Operating system: CentOS Linux release 7.6.1810 (Core)
Provider you're deploying cluster on: Bare-metal
Operating system you're deploying on: CentOS Linux release 7.6.1810 (Core)

@Kube-ASY Kube-ASY added the kind/bug Categorizes issue or PR as related to a bug. label May 13, 2019
@kron4eg kron4eg mentioned this issue May 13, 2019
@xmudrii xmudrii added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label May 13, 2019
@kron4eg kron4eg added this to the v0.6.0 milestone May 13, 2019
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. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants