Pls enable magnum debug logs and take a look, Nguyen Huu Khoi
On Mon, Dec 18, 2023 at 4:02 AM Satish Patel satish.txt@gmail.com wrote:
Little progress here. Looks like there is an issue in my CAPI deployment.
I have tried the following which changed my error mesg but still my cluster build process failed.
CAPI_VERSION=${CAPI_VERSION:-v1.5.1} CAPO_VERSION=${CAPO_VERSION:-v0.8.0}
# Install the `clusterctl` CLI sudo curl -Lo /usr/local/bin/clusterctl https://github.com/kubernetes-sigs/cluster-api/releases/download/$%7BCAPI_VE... sudo chmod +x /usr/local/bin/clusterctl
# Initialize the `clusterctl` CLI export EXP_CLUSTER_RESOURCE_SET=true export EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION=true export CLUSTER_TOPOLOGY=true clusterctl init \ --core cluster-api:${CAPI_VERSION} \ --bootstrap kubeadm:${CAPI_VERSION} \ --control-plane kubeadm:${CAPI_VERSION} \ --infrastructure openstack:${CAPO_VERSION}
# ./kubectl get provider -A NAMESPACE NAME AGE TYPE PROVIDER VERSION capi-kubeadm-bootstrap-system bootstrap-kubeadm 17m BootstrapProvider kubeadm v1.5.1 capi-kubeadm-control-plane-system control-plane-kubeadm 17m ControlPlaneProvider kubeadm v1.5.1 capi-system cluster-api 17m CoreProvider cluster-api v1.5.1 capo-system infrastructure-openstack 17m InfrastructureProvider openstack v0.8.0
# Here is my template
# openstack coe cluster template show k8s-v1.27.4 +-----------------------+--------------------------------------+ | Field | Value | +-----------------------+--------------------------------------+ | insecure_registry | - | | labels | {'kube_tag': 'v1.27.4'} | | updated_at | - | | floating_ip_enabled | True | | fixed_subnet | - | | master_flavor_id | m1.medium | | uuid | 2ddfdf2a-5962-42ee-a2e2-ff9e0b19dbe5 | | no_proxy | - | | https_proxy | - | | tls_disabled | False | | keypair_id | - | | public | False | | http_proxy | - | | docker_volume_size | - | | server_type | vm | | external_network_id | public-network-201 | | cluster_distro | ubuntu | | image_id | 7b6130b4-8374-4dd7-b6ff-91e06e6a9afd | | volume_driver | - | | registry_enabled | False | | docker_storage_driver | overlay2 | | apiserver_port | - | | name | k8s-v1.27.4 | | created_at | 2023-12-16T21:50:21+00:00 | | network_driver | calico | | fixed_network | - | | coe | kubernetes | | flavor_id | m1.medium | | master_lb_enabled | False | | dns_nameserver | 8.8.8.8 | | hidden | False | | tags | - | +-----------------------+--------------------------------------+
### create a cluster but there isn't any ERROR message. in status_reason
# openstack coe cluster create --cluster-template k8s-v1.27.4 mycluster4
# openstack coe cluster show mycluster4 +----------------------+--------------------------------------+ | Field | Value | +----------------------+--------------------------------------+ | status | CREATE_FAILED | | health_status | None | | cluster_template_id | 2ddfdf2a-5962-42ee-a2e2-ff9e0b19dbe5 | | node_addresses | [] | | uuid | 8eaf2db3-d13c-4849-a517-5528219fc32f | | stack_id | kube-8kyrq | | status_reason | | | created_at | 2023-12-17T20:54:01+00:00 | | updated_at | 2023-12-17T20:54:08+00:00 | | coe_version | None | | labels | {'kube_tag': 'v1.27.4'} | | labels_overridden | {} | | labels_skipped | {} | | labels_added | {} | | fixed_network | None | | fixed_subnet | None | | floating_ip_enabled | True | | faults | {} | | keypair | None | | api_address | None | | master_addresses | [] | | master_lb_enabled | False | | create_timeout | 60 | | node_count | 1 | | discovery_url | None | | docker_volume_size | None | | master_count | 1 | | container_version | None | | name | mycluster4 | | master_flavor_id | m1.medium | | flavor_id | m1.medium | | health_status_reason | {} | | project_id | 08cae850a5bb47d998da180a7f0e2660 | +----------------------+--------------------------------------+
Can someone share their CAPI deployment code if I am missing anything?
On Sun, Dec 17, 2023 at 8:54 AM kmceliker@gmail.com wrote:
Hey Nguyen,
I'm sorry to hear that you are stuck with your OpenStack cluster.
It seems that you are getting a 404 Client Error when trying to create a cluster using the magnum API. This could be due to several reasons, such as:
- The cluster template ID that you are using is not valid or does not
exist. You can check the list of available cluster templates by running “openstack coe cluster“ template list
- The image ID that you are using is not compatible with the COE that you
have selected. You can check the supported COEs and images by running “openstack coe list”
- The network driver or volume driver that you are using is not supported
by the COE or the image. You can check the supported drivers and options by running “openstack coe driver list” and “openstack image show <image-id>”
- The security group or firewall rules that you have configured on your
OpenStack instance or network are blocking the access to the magnum API endpoint. You can check the security group settings by running “openstack security group show <security-group-id>” and “openstack firewall show <firewall-id>”
To troubleshoot your issue, I suggest that you try the following steps below:
- Verify that your cluster template ID, image ID, network driver, volume
driver, and security group settings are correct and match your requirements.
Restart your OpenStack instance and/or network to apply any changes.
Run “openstack coe cluster show <cluster-id>” to see if your cluster is
in a valid state.
- Run “kubectl version --certificate-authority=ca.pem \
--client-key=key.pem \ --client-certificate=cert.pem -s <kubernetes-url>” to see if your Kubernetes client can connect to your cluster.
- If none of these steps resolve your issue, you may need to contact
OpenStack support if you have a Premium License instead of Commercial one :)
I hope this helps you fix your problem. Please let me know if you have any other questions or feedback. 😊
Best, Kerem Çeliker Head of Cloud Architecture tr.linkedin.com/in/keremceliker