Code Monkey home page Code Monkey logo

Comments (8)

geerlingguy avatar geerlingguy commented on June 7, 2024 2

@pmav99 - yeah, in the case of swap I usually use geerlingguy.swap to configure it and don't want this role to manage that aspect as well.

from ansible-role-kubernetes.

geerlingguy avatar geerlingguy commented on June 7, 2024 1

I have not had this issue, but I'm always running the playbook against at least the master (which is where the command comes from) and one node.

This role currently doesn't work that well if you're running it against individual hosts and not also the master, for the issue you've mentioned in the OP.

from ansible-role-kubernetes.

Ilshidur avatar Ilshidur commented on June 7, 2024

Same problem here. Any ideas ?

from ansible-role-kubernetes.

Ilshidur avatar Ilshidur commented on June 7, 2024

I figured it out.

I was running one playbook per server, which couldn't work because this role must be run on all the servers in just ONE TIME. Reason why is that I was using Terraform and running Ansible with https://github.com/radekg/terraform-provisioner-ansible.

from ansible-role-kubernetes.

pmav99 avatar pmav99 commented on June 7, 2024

I get the same error, even though I run a single playbook on all the hosts.

from ansible-role-kubernetes.

pmav99 avatar pmav99 commented on June 7, 2024

OK I think I figured this out.

The VM template I was using had a swapfile. As a result kubelet was constantly restarting because I had not added "--fail-swap-on=false" and consequently #28 was triggered. Due to the silent failure, the play moved on but then kubernetes_join_command was never being defined (or perhaps more accurately, kubeadm token create never wrote anything to stdout; I haven't tested this though).

Perhaps it would be a good idea to add an explicit check for swap but then again you might want to keep this more lightweight.

from ansible-role-kubernetes.

pmav99 avatar pmav99 commented on June 7, 2024

Thank you @geerlingguy
I agree that a kubernetes role should definitely not configure swap. That being said, explicitly checking if /proc/swaps has any entries might still make sense

from ansible-role-kubernetes.

geerlingguy avatar geerlingguy commented on June 7, 2024

For now I'll leave it as is. The kubelet output should always be consulted in the case of a failure to initialize or join nodes, as it usually has the answer pretty clearly logged somewhere (journalctl -xue kubelet).

from ansible-role-kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.