From f678662cc1431ab21491ed0cf4625ae65bbbd690 Mon Sep 17 00:00:00 2001 From: <> Date: Fri, 21 Feb 2025 16:06:04 +0000 Subject: [PATCH] Deployed 426e16c with MkDocs version: 1.4.3 --- .nojekyll | 0 404.html | 440 ++ SUMMARY/index.html | 464 ++ admin/intro/index.html | 546 ++ admin/troubleshooting/index.html | 730 ++ assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.b4d07000.min.js | 29 + assets/javascripts/bundle.b4d07000.min.js.map | 8 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.208ed371.min.js | 42 + .../workers/search.208ed371.min.js.map | 8 + assets/stylesheets/main.26e3688c.min.css | 1 + assets/stylesheets/main.26e3688c.min.css.map | 1 + assets/stylesheets/palette.ecc896b0.min.css | 1 + .../stylesheets/palette.ecc896b0.min.css.map | 1 + developer/cluster-topology/index.html | 479 ++ developer/testing-and-development/index.html | 518 ++ developer/upgrade-in-atmosphere/index.html | 549 ++ index.html | 450 ++ sitemap.xml | 3 + sitemap.xml.gz | Bin 0 -> 127 bytes static/logo.png | Bin 0 -> 109658 bytes .../getting-started/cluster-create-info.png | Bin 0 -> 251894 bytes .../getting-started/cluster-create-mgmt.png | Bin 0 -> 103714 bytes .../cluster-create-network.png | Bin 0 -> 194680 bytes .../getting-started/cluster-create-size.png | Bin 0 -> 232947 bytes .../getting-started/cluster-created-show.png | Bin 0 -> 608629 bytes .../getting-started/cluster-list-create.png | Bin 0 -> 445679 bytes .../cluster-postcreate-list.png | Bin 0 -> 298101 bytes .../cluster-postcreate-show.png | Bin 0 -> 606272 bytes .../getting-started/cluster-template-list.png | Bin 0 -> 363951 bytes user/configs/index.html | 656 ++ user/getting-started/index.html | 871 +++ user/images/index.html | 561 ++ user/labels/index.html | 988 +++ 66 files changed, 14545 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 SUMMARY/index.html create mode 100644 admin/intro/index.html create mode 100644 admin/troubleshooting/index.html create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.b4d07000.min.js create mode 100644 assets/javascripts/bundle.b4d07000.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.208ed371.min.js create mode 100644 assets/javascripts/workers/search.208ed371.min.js.map create mode 100644 assets/stylesheets/main.26e3688c.min.css create mode 100644 assets/stylesheets/main.26e3688c.min.css.map create mode 100644 assets/stylesheets/palette.ecc896b0.min.css create mode 100644 assets/stylesheets/palette.ecc896b0.min.css.map create mode 100644 developer/cluster-topology/index.html create mode 100644 developer/testing-and-development/index.html create mode 100644 developer/upgrade-in-atmosphere/index.html create mode 100644 index.html create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 static/logo.png create mode 100644 static/user/getting-started/cluster-create-info.png create mode 100644 static/user/getting-started/cluster-create-mgmt.png create mode 100644 static/user/getting-started/cluster-create-network.png create mode 100644 static/user/getting-started/cluster-create-size.png create mode 100644 static/user/getting-started/cluster-created-show.png create mode 100644 static/user/getting-started/cluster-list-create.png create mode 100644 static/user/getting-started/cluster-postcreate-list.png create mode 100644 static/user/getting-started/cluster-postcreate-show.png create mode 100644 static/user/getting-started/cluster-template-list.png create mode 100644 user/configs/index.html create mode 100644 user/getting-started/index.html create mode 100644 user/images/index.html create mode 100644 user/labels/index.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..6968aa00 --- /dev/null +++ b/404.html @@ -0,0 +1,440 @@ + + + +
+ + + + + + + + + + + + + +The Cluster API driver for Magnum enables OpenStack Magnum, a container +orchestration service, to create and manage Kubernetes clusters using the +Cluster API framework. The Cluster API driver for Magnum leverages the power of +the Cluster API to simplify the deployment and management of Kubernetes clusters +within an OpenStack infrastructure.
+With the Cluster API driver for Magnum, Magnum takes on the responsibility of +creating and maintaining the Cluster API resources. Magnum interacts with the +Cluster API controllers and reconcilers to dynamically provision and manage +Kubernetes clusters.
+Magnum utilizes the capabilities of the Cluster API to define the desired state
+of the Kubernetes clusters using familiar Cluster API resources such as Cluster
,
+MachineDeployment
, and MachineSet
. These resources encapsulate important
+cluster configurations, including the number of control plane and worker nodes,
+their specifications, and other relevant attributes.
By leveraging the Cluster API driver for Magnum, Magnum translates the desired +cluster specifications into Cluster API resources. It creates and manages these +resources, ensuring that the Kubernetes clusters are provisioned and maintained +according to the specified configurations.
+Through this integration, Magnum empowers users to leverage the Cluster API's +declarative and consistent approach to manage their Kubernetes clusters in an +OpenStack environment. By leveraging Magnum's container orchestration +capabilities, users can easily create and scale Kubernetes deployments while +benefiting from the automation and extensibility provided by the Cluster API.
+Here references some awesome Intro and Install blogs:
+Openstack Magnum Cluster API
written by Satish Patel.OpenStack Magnum Kubernetes Cluster API driver in Kolla-Ansible
written by R0K5T4R.clusterctl
If you'd like to track the progress of a specific cluster from the clusterctl
+perspective, you can run the following command to find out the stack_id
of the
+cluster and then use clusterctl describe
to get the status of the cluster:
$ export CLUSTER_ID=$(openstack coe cluster show <cluster-name> -f value -c stack_id)
+$ watch -cn1 'clusterctl describe cluster -n magnum-system $CLUSTER_ID --grouping=false --color'
+
CREATE_IN_PROGRESS
stateWith the Cluster API driver for Magnum, the cluster creation process is +performed by the Cluster API for OpenStack. Due to the logic of how the +controller managers work, the process of creating a cluster is performed in +multiple steps and if a step fails, it will keep retrying until it succeeds.
+Unlike the legacy Heat driver, the Cluster API driver for Magnum does not
+move the state of the cluster to CREATE_FAILED
if a step fails. Instead,
+it will keep the cluster in CREATE_IN_PROGRESS
state until the cluster is
+successfully created or the cluster is deleted.
If you are experiencing issues with the cluster being stuck in CREATE_IN_PROGRESS
+state, you can follow the steps below to troubleshoot the issue:
Check the Cluster
name from the stack_id
field in Magnum:
$ openstack coe cluster show <cluster-name> -f value -c stack_id
+
Check if the Cluster
exists in the Kuberentes cluster using the stack_id
:
$ kubectl -n magnum-system get clusters <stack-id>
+
Note
+If the cluster exists and it is in Provisioned
state, you can skip to
+step 3.
You will need to lookup the OpenStackCluster
for the Cluster
:
$ kubectl -n magnum-system get openstackclusters -l cluster.x-k8s.io/cluster-name=<stack-id>
+
Note
+If the OpenStackCluster
shows true
for READY
, you can skip to
+step 4.
You will have to look at the KubeadmControlPlane
for
+ the OpenStackCluster
:
$ kubectl -n magnum-system get kubeadmcontrolplanes -l cluster.x-k8s.io/cluster-name=<stack-id>
+
If the number of READY
nodes does not match the number of REPLICAS
,
+ you will need to investigate if the instances are going up by looking at
+ the OpenStackMachine
for the KubeadmControlPlane
:
$ kubectl -n magnum-system describe openstackmachines -l cluster.x-k8s.io/control-plane=,cluster.x-k8s.io/cluster-name=<stack-id>
+
From the output, you will need to look at the Status
field and see if
+any of the conditions are False
. If they are, you will need to look at
+the Message
field to see what the error is.
DELETE_IN_PROGRESS
stateIf you have a case where a project has been deleted from OpenStack but the +cluster was not deleted, you will not be able to delete it even as an admin +user. You will find log messages such as the following which will indicate +that the project is missing:
+E0705 17:11:00.333902 1 controller.go:326] "Reconciler error" err=<providerClient authentication err: Resource not found: [POST https://cloud.atmosphere.dev/v3/auth/tokens], error message: {"error":{"code":404,"message":"Could not find project: 1dfcc1f4399948baac7a83a6607f693c.","title":"Not Found"}}
+
In order to work around this issue, you will need to create a new project,
+go into the database and update the id
of the new project to match the
+project_id
of the cluster.
Warning
+It is possible to corrupt the database if you do not know what you are +doing. Please make sure you have a backup of the database before
+Create a new project in OpenStack:
+$ export NEW_PROJECT_ID=$(openstack project create cleanup-project -f value -c id)
+
Get the existing project_id
of the cluster:
$ export CURRENT_PROJECT_ID=$(openstack coe cluster show <cluster-name> -f value -c project_id)
+
Update the id
of the project in Keystone to match the project_id
of
+ the cluster:
$ mysql -B -N -u root -p -e "update project set id='$CURRENT_PROJECT_ID' where id='$NEW_PROJECT_ID';" keystone
+
If you're using Atmosphere, you can run the following:
+$ kubectl -n openstack exec -it sts/percona-xtradb-pxc -- mysql -hlocalhost -uroot -p$(kubectl -n openstack get secret/percona-xtradb -ojson | jq -r '.data.root' | base64 --decode) -e "update project set id='$CURRENT_PROJECT_ID' where id='$NEW_PROJECT_ID';" keystone
+
Verify that the project now exists under the new id
:
$ openstack project show $CURRENT_PROJECT_ID
+
Give access to your current admin user to the new project:
+$ openstack role add --user $OS_USERNAME --project $CURRENT_PROJECT_ID member
+
Switch to the context of that user
+$ export OS_PROJECT_ID=$CURRENT_PROJECT_ID
+
Create a new set of application credentials and update the existing
+ cloud-config
secret for the cluster
$ export CAPI_CLUSTER_NAME=$(openstack coe cluster show tst1-useg-k8s-1 -f value -c stack_id)
+$ export EXISTING_APPCRED_ID=$(kubectl -n magnum-system get secret/$CAPI_CLUSTER_NAME-cloud-config -ojson | jq -r '.data."clouds.yaml"' | base64 --decode | grep application_credential_id | awk '{print $2}')
+$ export EXISTING_APPCRED_SECRET=$(kubectl -n magnum-system get secret/$CAPI_CLUSTER_NAME-cloud-config -ojson | jq -r '.data."clouds.yaml"' | base64 --decode | grep application_credential_secret | awk '{print $2}')
+$ export NEW_APPCRED_ID=$(openstack application credential create --secret $EXISTING_APPCRED_SECRET $CAPI_CLUSTER_NAME-cleanup -f value -c id)
+$ > /tmp/clouds.yaml
+$ kubectl -n magnum-system patch secret/$CAPI_CLUSTER_NAME-cloud-config -p '{"data":{"clouds.yaml":"'$(kubectl -n magnum-system get secret/$CAPI_CLUSTER_NAME-cloud-config -ojson | jq -r '.data."clouds.yaml"' | base64 --decode | sed "s/$EXISTING_APPCRED_ID/$NEW_APPCRED_ID/" | base64 --wrap=0)'"}}'
+
At this point, the cluster should start progressing on the deletion process, you +can verify this by running:
+$ kubectl -n capo-system logs deploy/capo-controller-manager -f
+
Once the cluster is gone, you can clean up the project:
+$ unset OS_PROJECT_ID
+$ openstack project delete $CURRENT_PROJECT_ID
+
The Cluster API driver for Magnum makes use of the Cluster topology feature of the Cluster API project. This allows it to delegate all of the work around building resources such as the OpenStackCluster
, MachineDeployments
and everything else managed entire by the Cluster API instead of the driver creating all of these resources.
In order to do this, the driver creates a ClusterClass
resource which is called magnum-v{VERSION}
where {VERSION}
is the current version of the driver because of the following reasons:
ClusterClass
because it is an immutable resource.ClusterClass
.It's important to note that there are only one scenarios where the spec.topology.class
for a given Cluster
will be modified and this will be when a cluster upgrade is done. This is because there is an expectation by the user that a rolling restart operation will occur if a cluster upgrade is requested. No other action should be allowed to change the spec.topology.class
of a Cluster
.
For users, it's important to keep in mind that if they want to use a newer ClusterClass
in order to make sure of a new feature available in a newer ClusterClass
, they can simply do an upgrade within Magnum to the same cluster template and it will actually force an update of the spec.topology.class
, which might then naturally cause a full rollout to occur.
In order to be able to test and develop the magnum-cluster-api
project, you
+will need to have an existing Magnum deployment. You can use the following
+steps to be able to test and develop the project.
./hack/stack.sh
+
pushd /tmp
+source /opt/stack/openrc
+export OS_DISTRO=ubuntu # you can change this to "flatcar" if you want to use Flatcar
+for version in v1.24.16 v1.25.12 v1.26.7 v1.27.4; do \
+ [[ "${OS_DISTRO}" == "ubuntu" ]] && IMAGE_NAME="ubuntu-2204-kube-${version}" || IMAGE_NAME="flatcar-kube-${version}"; \
+ curl -LO https://object-storage.public.mtl1.vexxhost.net/swift/v1/a91f106f55e64246babde7402c21b87a/magnum-capi/${IMAGE_NAME}.qcow2; \
+ openstack image create ${IMAGE_NAME} --disk-format=qcow2 --container-format=bare --property os_distro=${OS_DISTRO} --file=${IMAGE_NAME}.qcow2; \
+ openstack coe cluster template create \
+ --image $(openstack image show ${IMAGE_NAME} -c id -f value) \
+ --external-network public \
+ --dns-nameserver 8.8.8.8 \
+ --master-lb-enabled \
+ --master-flavor m1.medium \
+ --flavor m1.medium \
+ --network-driver calico \
+ --docker-storage-driver overlay2 \
+ --coe kubernetes \
+ --label kube_tag=${version} \
+ k8s-${version};
+done;
+popd
+
openstack coe cluster create \
+ --cluster-template k8s-v1.25.12 \
+ --master-count 3 \
+ --node-count 2 \
+ k8s-v1.25.12
+
CREATE_COMPLETE
state, you can interact with it:eval $(openstack coe cluster config k8s-v1.25.12)
+
In Atmosphere environment, Magnum cluster-api is embedded in the Magnum conductor container.
+Therefore, to upgrade Magnum cluster-api in your atmosphere environment, developers have to build a new Magnum container image with the desired revision.
+On the other hand, magnum-cluster-api
repository has a Github workflow to build and push Magnum container images which include the latest Magnum cluster-api driver code. So developers can trigger this workflow to get new Magnum images with the latest code.
Once a new release is published, image build workflow is triggered automatically and new container images is published to quay.io/vexxhost/magnum-cluster-api
. So there is no need to run images again and just need to upgrade the image ref in Atmosphere deployment code.
+Run the following cmd to update all Magnum image tags in Atmosphere
project.
+
earthly +pin-images
+
roles/default/vars/main.yaml
file. Then you can run ansible-playbook
command to deploy/upgrade atmosphere as normal.
+If you want to apply patches merged into main branch but not released yet, you can follow this instruction.
+- First, build new Magnum container images by running image workflow with Push images to Container Registry
enabled at https://github.com/vexxhost/magnum-cluster-api/actions/workflows/image.yml.
+- Once the workflow is successfully finished, new images will be pushed to quay.io/vexxhost/magnum-cluster-api
. You can get the exact image tag hash value from the workflow log. (note: It will not promote images so need to get the exact image digest hash value.)
+- Update the image tags in roles/default/vars/main.yaml
of atmosphere project. https://github.com/vexxhost/atmosphere/blob/c7c0de94112448522abb8973483da82eb5f937a8/roles/defaults/vars/main.yml#L101-L105
+- Run atmosphere playbook again.
Or you can just update the images on-fly using kubectl CLI in your Atmosphere environment once you know the image ref but this is not recommended. +
kubectl set image sts/magnum-conductor magnum-conductor=${IMAGE_REF} magnum-conductor-init=${IMAGE_REF} -n openstack
+kubectl set image deploy/magnum-api magnum-api=${IMAGE_REF} -n openstack
+kubectl set image deploy/magnum-registry registry=${IMAGE_REF} -n openstack
+
MX5=cvU @;W@_2rVTP{V30G?+J(?Zpg~KRds16D8?Ksp|qzQ0sL%U%@
z!KpYjF>5{tvCScse0Hs?Hfjwo>9Z=}xC?v{k(4km9Nw)`y?MswbH~Eog;+UG-IS+f
zfQ>ZoJ1<{BCq|XURJldWasCd5qZ_iIKzmZ+Ge3AXKX2~*)(uW@ngG|Be0XY3q$h#2
z9+p<5-yj0FOrt{8YA?wVsK}+E?fbbUdA!b?B?LVQZd5#hg1IgclAr5^4kG03J>f6d
zZ+hlzg+GLEVEZfUf8>0B$Q59 }w32s~3vD
zdAF#N$~V0(4xULkpucz@kdRqUOvJ?U!{uS(fW_)3IjVKQ7ecCn3(V8_u#^q|xDmGU(ITPI)g!<@Vh#
z#G@2gwg(-?f=(Imbu4bS3sdS;)3kKN|IB^sQcuFl4)_DvpwJ~}yk-82B}aoxW&ti*
zvr1t2`Hzumq0@t|#<jWgP*`-
z3RotEGggLu4>=H5)4v;<>fa`NDqyQliGK)x>c>uaU^!9=o^5%3dJKJIl
2?`*mBB$I--BwQOjMFaMNBrO;mPJRb(=4o{kJ(Ux3(skZv
z#rFwkiAu)LEcXm52@|`w506jV2ABQ&d@8Y+n?MhA8MH#W>lU|>HT8TPYNx+^q@@^!
zMzTNL+16cyE4VdesjUDU`rsuE#s4-D%e9!i{)+>KlDU5G5u-?^(K-eol#Wz~DmSoA
zMmxSn8~fH-GZO{m?@|xa%XO?`64QK9MUEQLn@;FHh%2Lq!QyaY7lxM+NN}5fY&J8i
z`}q~Vdldmy-5RmV*NqVWk1VFc6=-<^jqGQeNJ1VtP)Li@6T6lm!18A8$K-k3(8-)#
zR=dpl0)mi@GGK@r*{Ffc3ELcomb?7--Ct;H@80?SrQZcT?I=g}pQ2^=2JXoTJ=6_6
z?