Comments (7)
Hi,
I think there is another possible solution. An another point of view.
If I understand correctly, the idea is wait until the kubeapi is up and running ?
There is a more "ansible" approach with the module: ansible.builtin.wait_for
You can add :
- name: Wait for k8s apiserver
wait_for:
host: "{{ kubernetes_api_server_host }}"
port: "6443"
state: present
timeout: 300
This is what kubespray seems to do that here:
https://github.com/kubernetes-sigs/kubespray/blob/33a60fe919b50a149ef6402f56e342989f6eea23/roles/kubernetes/client/tasks/main.yml#L44
And if you just want to verify if each node are up and running, I think kubectl
command is a good approach, after checking that the kube api is up.
This approach, if you create an ansible role can also be useful for issue #15 : rolling upgrade playbook and node addition playbook.
What do you think ?
from rke2-ansible.
This seems related to #38.
I moved past this frustrating issue using @AYDEV-FR 's solution at the bottom of the rke2_server > first_server.yaml
task, along with adding serial: 1
to the site.yml
rke2_servers
playbook. Thanks for that.
However, I think a watch script that isn't tied to a play might have more flexibility for re-use.
from rke2-ansible.
should be addressed in #54
from rke2-ansible.
@mddamato Yes, the introduction of the throttle
directive here solved the problems we had with the 3rd server hanging on startup in a 3-server cluster deployment. Thanks.
from rke2-ansible.
You might wait until the necessary commit hits main before closing this issue.
from rke2-ansible.
I'm having the same issue right now. Why is this issue closed?
TASK [rke2_server : Start rke2-server] ***************************************** ok: [rkectlplane01] Wednesday 28 September 2022 00:46:09 +0000 (0:00:01.183) 0:00:36.379 *** TASK [rke2_server : Wait for k8s apiserver] ************************************ fatal: [rkectlplane01]: FAILED! => {"changed": false, "elapsed": 300, "msg": "Timeout when waiting for rkectlplane01:6443"} NO MORE HOSTS LEFT *************************************************************
from rke2-ansible.
@siulcode The error you posted shows that the server isn't starting properly but it's not enough information for me to go off of. Could you post the errors from the rke2 server logs or other applicable components?
from rke2-ansible.
Related Issues (20)
- Templated Variables do not work within `rke2_config` HOT 1
- default yum repo points to latest
- add support for nftables HOT 1
- automate the configuration of kubectl/ctr/cri
- Add support for ARM64 HOT 2
- Implement ansible managed files concept for all user provided files so that ansible will clean up as well as add files
- Update automated tests to use Ubuntu 22
- Clarification request regarding hosts.yml HOT 9
- Add support for creating cluster with a load balancer / fixed registration address HOT 6
- CIS Hardening tasks errors if install directory is in /opt
- Systemd Start RKE2 task fails sometimes HOT 1
- Tasks to wait for Apiserver, Kubelet don't wait long enough for some very slow servers.
- Previous install tasks fails to catch rke2 installed in /opt directory
- Secure files that get generated via ansible HOT 1
- Agent Nodes not showing up or usable despite the service running on the machine HOT 9
- refactor code
- How to access the rancher dashboard? HOT 3
- Version number in yum/dnf install HOT 2
- Adding nodes to the cluster HOT 3
- rke2-server and rke2-agent RPM Installations Fail Intermittently
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rke2-ansible.