ansible-role-kubernetes
ansible-role-kubernetes copied to clipboard
Execution issue with kubernetes version
I have an issue when using the role:
version \"stable-1.21.2\" doesn't match patterns for neither semantic version nor labels (stable, latest, ...)`
My config files contains:
kubernetes_version: 1.21.2
I had to update my conf:
kubernetes_config_cluster_configuration:
networking:
podSubnet: "{{ kubernetes_pod_network.cidr }}"
kubernetesVersion: "{{ kubernetes_version }}"
In master defaults/main.yml reads:
kubernetes_config_cluster_configuration:
networking:
podSubnet: "{{ kubernetes_pod_network.cidr }}"
kubernetesVersion: "{{ kubernetes_version_kubeadm }}"
....
kubernetes_version_kubeadm: 'stable-{{ kubernetes_version }}'
I think it shoudl be changed.
For information full log:
fatal: [VHELIOSPREPRODL1]: FAILED! => {"changed": true, "cmd": ["kubeadm", "init", "--config", "/etc/kubernetes/admin.conf", "--ignore-preflight-errors=
all"], "delta": "0:00:00.065060", "end": "2022-03-14 17:19:54.236822", "msg": "non-zero return code", "rc": 1, "start": "2022-03-14 17:19:54.171762", "s
tderr": "version \"stable-1.21.2\" doesn't match patterns for neither semantic version nor labels (stable, latest, ...)\nTo see the stack trace of this
error execute with --v=5 or higher", "stderr_lines": ["version \"stable-1.21.2\" doesn't match patterns for neither semantic version nor labels (stable,
latest, ...)", "To see the stack trace of this error execute with --v=5 or higher"], "stdout": "", "stdout_lines": []}
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
I think you are setting the kubernetes_version variable wrong. As far as I understood, you should not mention the patch level.
So you would use kubernetes_version: 1.21 instead of kubernetes_version: 1.21.2.
This issue is no longer marked for closure.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.