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

hcloud-cloud-controller-manager not working #10273

Closed
cortex3 opened this issue Jul 4, 2023 · 0 comments · Fixed by #10297
Closed

hcloud-cloud-controller-manager not working #10273

cortex3 opened this issue Jul 4, 2023 · 0 comments · Fixed by #10297
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@cortex3
Copy link
Contributor

cortex3 commented Jul 4, 2023

Hi,
the cluster installed via kubespray is not working when utilizing the hcloud-cloud-controller-manager.
I'm using the following configuration and getting the following error:

external_hcloud_cloud:
  hcloud_api_token: "{{ vault_hcloud_api_token }}"
  token_secret_name: hcloud
  with_networks: false
  service_account_name: cloud-controller-manager
  controller_image_tag: "latest"
E0628 10:53:10.820756       1 node_controller.go:236] error syncing 'k8s-worker-stg-04.test.local': failed to get node modifiers from cloud provider: provided node ip for node "k8s-worker-stg-04.test.local" is not valid: failed to get node address from cloud provider that matches ip: 10.0.1.1, requeuing

The Hetzner Documentation describes the following

If you manage the network yourself it might still be required to let the CCM know about private networks. You can do this by adding the environment variable with the network name/ID in the CCM deployment.

(source: https://github.com/hetznercloud/hcloud-cloud-controller-manager#networks-support)

After adding the network name the following error occurs:
error running controllers: invalid CIDR[0]: <nil> (invalid CIDR address: )

This could be solved by adding an extra var described here:
hetznercloud/hcloud-cloud-controller-manager#328 (comment)

Furthermore when looking at the source code I noticed that currently the cloud-controller can only be used if the kubespray Terraform is used:


the var is gathered from here:

If it is welcome I would create a Pull Request for this issue since I already solved this issue on my side.

Here's my env in case any of this is of any relevancy:

Environment:

  • Cloud provider or hardware configuration: Hetzner

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"): Ubuntu 22.04.2 LTS

  • Version of Ansible (ansible --version): using quay.io/kubespray/kubespray:v2.22.0

  • Version of Python (python --version): using quay.io/kubespray/kubespray:v2.22.0

Kubespray version (commit) (git rev-parse --short HEAD): f8b93fa

Network plugin used: default

Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"):

Command used to invoke ansible:ansible-playbook playbooks/$ENVIRONMENT/deploy.yml -i inventories/$ENVIRONMENT/hcloud.yml

Output of ansible run:

@cortex3 cortex3 added the kind/bug Categorizes issue or PR as related to a bug. label Jul 4, 2023
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant