From d926a3bb7f8e16847d32d39308e98271ae566129 Mon Sep 17 00:00:00 2001 From: sowm9802 Date: Fri, 17 Jan 2025 16:03:26 +0530 Subject: [PATCH] Add default cluster template to magnum kubernetes cluster setup guide --- docs/magnum-kubernetes-cluster-setup-guide.md | 22 ++++++++++++++++++- docs/openstack-magnum.md | 12 +++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/docs/magnum-kubernetes-cluster-setup-guide.md b/docs/magnum-kubernetes-cluster-setup-guide.md index 331d59dd..46559755 100644 --- a/docs/magnum-kubernetes-cluster-setup-guide.md +++ b/docs/magnum-kubernetes-cluster-setup-guide.md @@ -34,6 +34,26 @@ openstack keypair create mykey > mykey.pem A ClusterTemplate is a collection of parameters to describe how a cluster can be constructed. Some parameters are relevant to the infrastructure of the cluster, while others are for the particular COE. In a typical workflow, a user would create a ClusterTemplate, then create one or more clusters using the ClusterTemplate. A ClusterTemplate cannot be updated or deleted if a cluster using this ClusterTemplate still exists. +!!! note "Information about the Default Public ClusterTemplate" + + A default ClusterTemplate named default-cluster-template, should be created in the environment and can be used to deploy new Kubernetes clusters. To use the default template, pass the --cluster-template default-cluster-template parameter during cluster creation. + + ??? example "ClusterTemplate Creation" + + ``` shell + openstack coe cluster template create default-cluster-template \ + --image magnum-fedora-coreos-40 \ + --external-network PUBLICNET \ + --dns-nameserver 8.8.8.8 \ + --master-flavor gp.0.4.8 \ + --flavor gp.0.4.8 \ + --network-driver calico \ + --volume-driver cinder \ + --docker-volume-size 10 \ + --coe kubernetes \ + --public + ``` + ### Create a ClusterTemplate Create a Kubernetes cluster template using the `magnum-fedora-coreos-40` image with the following configuration: `m1.large` flavor for both master and nodes, `public` as the external network, `8.8.8.8` for the DNS nameserver, `calico` for the network driver, and `cinder` for the volume driver. Below is the example command to create the clustertemplate. For more detailed information about the parameters and labels used in the ClusterTemplate, please refer to the [ClusterTemplate](https://docs.openstack.org/magnum/latest/user/index.html#clustertemplate). @@ -47,7 +67,7 @@ openstack coe cluster template create new-cluster-template \ --flavor m1.large \ --network-driver calico \ --volume-driver cinder \ - --docker-volume-size 3 \ + --docker-volume-size 10 \ --coe kubernetes ``` diff --git a/docs/openstack-magnum.md b/docs/openstack-magnum.md index c9b20957..06d71660 100644 --- a/docs/openstack-magnum.md +++ b/docs/openstack-magnum.md @@ -8,7 +8,7 @@ OpenStack Magnum is the container orchestration service within the OpenStack eco ## Create secrets -!!! note "Information about the secretes used" +!!! note "Information about the secrets used" Manual secret generation is only required if you haven't run the `create-secrets.sh` script located in `/opt/genestack/bin`. @@ -42,3 +42,13 @@ OpenStack Magnum is the container orchestration service within the OpenStack eco You may need to provide custom values to configure your openstack services, for a simple single region or lab deployment you can supply an additional overrides flag using the example found at `base-helm-configs/aio-example-openstack-overrides.yaml`. In other cases such as a multi-region deployment you may want to view the [Multi-Region Support](multi-region-support.md) guide to for a workflow solution. + +## Validate functionality + +``` shell +kubectl --namespace openstack exec -ti openstack-admin-client -- openstack coe cluster list +``` + +## Create a Default Public ClusterTemplate + +User must have the admin role to create the public ClusterTemplate. For instructions on creating the default public ClusterTemplate and using it for Kubernetes cluster creation, please refer to the ClusterTemplate section of the [Magnum Kubernetes Cluster Setup Guide](https://docs.rackspacecloud.com/magnum-kubernetes-cluster-setup-guide/#create-a-clustertemplate).