Hello.

I would like to recommend you should update something about your problem when it is finished. It may be good infonation for communication.

Nguyen Huu Khoi


On Wed, Dec 20, 2023 at 6:12 AM Satish Patel <satish.txt@gmail.com> wrote:
Closing the loop here. I have successfully set up CAPI and it works great. Build k8s cluster 1 Master and 1 Worker node in less than 3 minutes. 

I will blog out my stuff for people looking for help like me :) 

On Sun, Dec 17, 2023 at 4:53 PM <kmceliker@gmail.com> wrote:
Here is an example of a CAPI deployment code for OpenStack, mate - using the clusterctl tool and the cluster-template.yaml file. This code will create a cluster named capi-openstack with one control plane node and three worker nodes, using the ubuntu-2204 image and the m1.medium flavor. You need to replace the placeholders with your own values

# Install clusterctl
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.1/clusterctl-linux-amd64 -o clusterctl
chmod +x ./clusterctl
sudo mv ./clusterctl /usr/local/bin/clusterctl

# Set environment variables
export OPENSTACK_CLOUD=<openstack-cloud>
export OPENSTACK_USERNAME=<openstack-username>
export OPENSTACK_PASSWORD=<openstack-password>
export OPENSTACK_DOMAIN_NAME=<openstack-domain-name>
export OPENSTACK_PROJECT_ID=<openstack-project-id>
export OPENSTACK_SSH_KEY_NAME=<openstack-ssh-key-name>
export OPENSTACK_DNS_NAMESERVERS=<openstack-dns-nameservers>
export OPENSTACK_EXTERNAL_NETWORK_ID=<openstack-external-network-id>
export OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR=m1.medium
export OPENSTACK_NODE_MACHINE_FLAVOR=m1.medium
export OPENSTACK_IMAGE_NAME=ubuntu-2204
export KUBERNETES_VERSION=v1.23.15

# Initialize clusterctl
clusterctl init --infrastructure openstack

# Create cluster
clusterctl config cluster capi-openstack --kubernetes-version $KUBERNETES_VERSION --control-plane-machine-count=1 --worker-machine-count=3 > cluster-template.yaml
clusterctl create cluster --kubeconfig ~/.kube/config --infrastructure openstack:v0.6.0 --bootstrap kubeadm:v0.4.4 --control-plane kubeadm:v0.4.4 --cluster capi-openstack --namespace default --from cluster-template.yaml

Also you can turn on Enable to Magnum Report Log on OpenStack to provide with us or Take a look deep dively as the following link;
https://github.com/kubernetes-sigs/cluster-api-provider-openstack

Best,
Kerem Çeliker
Head of Cloud Architecture
tr.linkedin.com/in/keremceliker