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

taint node-role.kubernetes.io/master not found #58

Closed
papanito opened this issue Aug 1, 2019 · 3 comments
Closed

taint node-role.kubernetes.io/master not found #58

papanito opened this issue Aug 1, 2019 · 3 comments

Comments

@papanito
Copy link

papanito commented Aug 1, 2019

I've reset my kubernetes cluster and re-installed with latest role. I use

kubernetes_allow_pods_on_master: True

Which makes the role fail:

TASK [geerlingguy.kubernetes : Allow pods on master node (if configured).] *******************************************************************************************
fatal: [prds0001]: FAILED! => {"changed": true, "cmd": ["kubectl", "taint", "nodes", "--all", "node-role.kubernetes.io/master-"], "delta": "0:00:00.063716", "end": "2019-08-01 19:31:55.417939", "msg": "non-zero return code", "rc": 1, "start": "2019-08-01 19:31:55.354223", "stderr": "taint \"node-role.kubernetes.io/master:\" not found\ntaint \"node-role.kubernetes.io/master:\" not found", "stderr_lines": ["taint \"node-role.kubernetes.io/master:\" not found", "taint \"node-role.kubernetes.io/master:\" not found"], "stdout": "node/prds0001 untainted", "stdout_lines": ["node/prds0001 untainted"]}

My nodes are running Debian Buster

> cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Here my playbook:

- hosts: servers

  vars:
    - docker_users: ['ansible']
    - docker_edition: 'ce'

    - kubernetes_version: '1.15'
    - kubernetes_version_rhel_package: '1.15.0'
    - kubernetes_allow_pods_on_master: True
    - kubernetes_kubelet_extra_args: ""
    - kubernetes_kubeadm_init_extra_opts: "--apiserver-cert-extra-sans prds0001.intra"
    - kubernetes_apt_repository: "deb http://apt.kubernetes.io/ kubernetes-xenial {{ kubernetes_apt_release_channel }}"

  pre_tasks:
    - name: disable swap
      command: swapoff -a
  
  roles:
    - geerlingguy.docker
    - geerlingguy.kubernetes
@papanito
Copy link
Author

papanito commented Aug 2, 2019

I've reapplied the role and this time it passed.

@geerlingguy
Copy link
Owner

I'll chalk it up to a weird one-time issue. Please reopen if this happens again.

@imranrazakhan
Copy link

@papanito i think if taint already tainted nodes it will give this error "taint node-role.kubernetes.io/master not found"

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

No branches or pull requests

3 participants