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

Generating MicroK8s manifests with clusterctl #76

Open
lieberlois opened this issue Aug 29, 2023 · 6 comments
Open

Generating MicroK8s manifests with clusterctl #76

lieberlois opened this issue Aug 29, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@lieberlois
Copy link

Hi everybody,
I tried to use the microk8s bootstrap provider together with the hetzner infrastructure provider. However when using clusterctl generate, the generated manifests used Kubeadm rather than MikroK8s. Do we need to enable feature flags to use this? Would be great if we could figure this out - I'd be happy to document this in a PR afterwards 🤭 the documentation only uses pregenerated manifests so it's not very descriptive there

Thanks in advance!

@neoaggelos
Copy link

Hi @lieberlois

Thank you for raising this issue. Unfortunately, having a cluster template is typically the work of an infrastructure provider. Seeing as this is a bootstrap provider, even if we added cluster-templates in our releases, they would be ignored by clusterctl.

Note, however, that there are multiple cluster templates for existing infrastructures in https://github.com/canonical/cluster-api-bootstrap-provider-microk8s/tree/main/templates, currently supporting AWS, Azure, GCP and OpenStack (with more expected to be added).

There is no cluster template available at the moment for Hetzner. The way forward would be to get the default cluster template from the hetzner infrastructure provider, and then adjust it to use a MicroK8sControlPlane instead. The existing templates might be enough to get started, though there could be issues (e.g. if no LoadBalancer is available, you have to adjust the templates to include something like kube-vip).

We are not currently working on this, but would be more than happy to help if you are interested to contribute! For ongoing discussion, we can either use the issue, or use the Kubernetes Slack #microk8s channel for more direct back and forth.

Hope this helps, thanks!

@syncronize-issues-to-jira
Copy link

.github/.jira_sync_config.yaml file was not found

@sachinkumarsingh092 sachinkumarsingh092 added the enhancement New feature or request label Aug 30, 2023
@lieberlois
Copy link
Author

Thanks @neoaggelos ,

so just to summarize: the clusterctl generate functionality doesn't take bootstrap providers into consideration and hence can't generate e.g. a control plane with a custom control plane provider. If we want to use a custom one, we have to write the according custom resource objects ourselves?

Cheers,
Luis

@neoaggelos
Copy link

Hi @lieberlois

Essentially yes. The good thing is that clusterctl can use a local file as the cluster template, and you can find existing templates in https://github.com/canonical/cluster-api-bootstrap-provider-microk8s/tree/main/templates

Example usage for example for OpenStack could be (see also README.md):

git clone https://github.com/canonical/cluster-api-bootstrap-provider-microk8s
cd cluster-api-bootstrap-provider-microk8s
clusterctl generate microk8s-openstack --from ./templates/cluster-template-openstack.yaml > cluster-openstack.yaml

There is indeed no existing tooling to get a cluster-template from the infrastructure provider https://github.com/syself/cluster-api-provider-hetzner/releases/download/v1.0.0-beta.20/cluster-template.yaml and convert it to use MicroK8s. Essentially, you have to manually strip out the KubeadmControlPlane resources and replace it with MicroK8sControlPlane etc.

@rgarcia
Copy link

rgarcia commented May 3, 2024

FWIW I have a Hetzner template working and have opened a PR: #106

@bg-automation
Copy link

Hello Team, I faced with the same issue, but for Oracle OCI Cloud. Would be great to have one more "popular" provider for microk8s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants