-
Notifications
You must be signed in to change notification settings - Fork 25
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
Support cluster api operator #221
Comments
Thanks for addressing this. |
I use the cluster API operator to spin up proxmox as my InfrastructureProvider. Is there anything in particular that you are wondering about? |
@isZumpo would you mind raising a PR to add this to our documentation? I suppose that's what the OP is wondering about. |
If possible, I would like to manage the creation of the cluster through the Cluster API Operator instead of using clusterctl. I would appreciate it if some assistance could be provided. However, I've just started using PVE, so I think maybe I need to operate according to the usage.md to familiarize myself with the technical principles. |
Sure, let us see if we can put something together for that. Suppose it might be best to start here in the chat and then based on how it goes for @abrahamhwj write some documentation about it :)
Sure, highly recommend using the cluster API operator, it is very nice having everything as YAML files in your gitops repository rather than having to execute clusterctl commands. I am using the cluster API operator helm chart to deploy the cluster API operator using argocd. Will give you the whole thing: Chart.yaml ....
dependencies:
- name: cluster-api-operator
version: 0.10.1
repository: https://kubernetes-sigs.github.io/cluster-api-operator values.yaml cluster-api-operator:
core: "cluster-api:v1.7.1"
controlPlane: "kubeadm:v1.4.2"
bootstrap: "kubeadm:v1.4.2"
manager:
featureGates:
kubeadm:
EXP_CLUSTER_RESOURCE_SET: true
ClusterTopology: true
core:
ClusterTopology: true
templates/proxmox-infrastructure apiVersion: v1
kind: Namespace
metadata:
name: proxmox-infrastructure-system
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: proxmox-variables
namespace: proxmox-infrastructure-system
spec:
secretStoreRef:
kind: ClusterSecretStore
name: akeyless-secret-store
target:
name: proxmox-variables
creationPolicy: Owner
dataFrom:
- extract:
key: proxmox-variables
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: InfrastructureProvider
metadata:
name: proxmox
namespace: proxmox-infrastructure-system
spec:
version: v0.4.0
configSecret:
name: proxmox-variables
---
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: IPAMProvider
metadata:
name: in-cluster
namespace: proxmox-infrastructure-system
spec:
version: v0.1.0 In my setup, I am using the external secrets operator to generate the secret named proxmox-variables, containing the required variables to setup the proxmox operator. If you don't use external secrets you can just create it manually instead, it should look like this in the end:
My setup also contains the IPAMProvider, I had issues running without it. Now with this setup you should be able to deploy your cluster objects |
@isZumpo Thank you very much for your guidance. capmox-controller-manager, kubeadm-control-plane-controller-manager, capi-kubeadm-bootstrap-controller-manager, ipam-in-cluster-controller-manager all did not show any error logs. Do you have any suggestions? |
Try taking a look at the logs of the different mentioned managers. I have found especially the logs of capmox-controller-manager to be very valuable. |
@isZumpo Logs capmox-system/capmox-controller-manager: |
Since the control plane is waiting for |
@65278 |
That's always the most difficult to debug part. |
@65278 Thank you for your reply. I attempted to manually configure the IP and account password via CLI commands on the PVE Host, and it successfully allowed me to log in. After configuring the address, I was able to ping it from the host where the cluster API resides, which suggests that the network configuration is likely correct. |
Make a template that has netplan installed, and cloud-init should do the right thing: https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v2.html#networking-config-version-2 |
I reviewed some of CAPMOX's code and documentation on how Cloud-init works. Based on troubleshooting my test environment, the reason could be as follows:
I am very grateful for the CAPMOX project and everyone's enthusiastic responses. If you have any test suggestions, you can let me know and I will be happy to try them. |
You will need to make sure that your VM template doesn't have Cloud-init Driver provided by Proxmox, |
Thank you for your Response Should the Virtual Machine Template be Preconfigured with the K8S Deployment Environment, Such as Installing containerd, kubeadm, kubectl, kubelet etc.? I couldn't find the related scripts. If these are not prepared, cloud-init initialization will fail and reconcile stoped. |
@abrahamhwj Yes, you will need to build a VM template first. |
Describe the solution you'd like
[A clear and concise description of what you want to happen.]
Support cluster api operator, Install PVE provider with InfrastructureProvider CRD without clusterctl tool.
If already supported, hope to update the document to guide how to operate.
Currently the cluster api operator doc with a link to PVE provider doc, but this doc only for clusterctl
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: