canonical / cluster-api-bootstrap-provider-microk8s

This project offers a cluster API bootstrap provider controller that manages the node provision of a MicroK8s cluster.
https://microk8s.io
21 stars 14 forks source link

add hetzner template #106

Open rgarcia opened 4 months ago

rgarcia commented 4 months ago

Addresses #76

Basically followed the directions of @neoaggelos in that issue and got a hetzner template up and running

clusterctl generate cluster hetzner-microk8s-test --from ./templates/cluster-template-hetzner.yaml | kubectl apply -f -

About 3 minutes later

clusterctl describe cluster hetzner-microk8s-test                 
NAME                                                                       READY  SEVERITY  REASON  SINCE  MESSAGE 
Cluster/hetzner-microk8s-test                                              True                     16m             
├─ClusterInfrastructure - HetznerCluster/hetzner-microk8s-test             True                     16m             
└─ControlPlane - MicroK8sControlPlane/hetzner-microk8s-test-control-plane  True                     16m             
  └─Machine/hetzner-microk8s-test-control-plane-x8hjp                      True                     19m             

Curious if 3 minutes is typical. Tailing journalctl -f --system on the control plane node during startup and it seemed to be generating a lot of logs that I've yet to inspect.

rgarcia commented 4 months ago

only thing that stood out to me in the logs:

May 03 00:34:59 hetzner-microk8s-test-control-plane-2cttj cloud-init[692]: 2024-05-03 00:34:59,509 - schema.py[WARNING]: Invalid cloud-config provided: Please run 'sudo cloud-init schema --system' to see the schema errors.

Running sudo cloud-init schema --system shows:

Found cloud-config data types: user-data, vendor-data, network-config

1. user-data at /var/lib/cloud/instances/46854496/cloud-config.txt:
  Invalid user-data /var/lib/cloud/instances/46854496/cloud-config.txt
  Error: Cloud config schema errors: bootcmd: [] is too short

2. vendor-data at /var/lib/cloud/instances/46854496/vendor-cloud-config.txt:
  Invalid vendor-data /var/lib/cloud/instances/46854496/vendor-cloud-config.txt
  Error: Cloud config schema errors: system_info: Additional properties are not allowed ('system_info' was unexpected)

3. network-config at /var/lib/cloud/instances/46854496/network-config.json:
  Invalid network-config /var/lib/cloud/instances/46854496/network-config.json
  Error: Cloud config schema errors: config.0.subnets.0: Additional properties are not allowed ('ipv4' was unexpected), config.0.subnets.1: Additional properties are not allowed ('ipv6' was unexpected)

Error: Invalid schema: user-data, vendor-data, network-config

Other than that I noticed two occurences of snap restart microk8s.daemon-kubelite within 15 seconds of each other which seemed odd.