How to change the cluster domain name
Changing the domain via ClusterConfig.
Use this instruction if you need to change the domain shturval.link to a new FQDN in your deployed management cluster and/or client cluster.
Note:
- Changing the domain name of a management cluster will block access to its client clusters using kubeconfig. To restore access, you will need to change domain names or re-create clusters.
Changes are made via ClusterConfig with the name corresponding to the cluster name. After ClusterConfig is changed, cluster-manager updates the associated cluster resources.
Preconditions
- The management cluster or client cluster has already been deployed with one of the providers: Shturval v2, oVirt and similar providers, VMware vSphere.
- An internal load balancer is used for the Ingress controller.
- You have access to the management cluster with rights to view and change the resource
ClusterConfigAPI groupcluster.shturval.tech. For a description of the resource, see the Custom Platform Resources section.
ClusterConfig cluster you can get:
- in the GUI: management cluster → Administration → Custom Resources page → API group cluster.shturval.tech → ClusterConfig.
- in CLI: management cluster → command
kubectl -n ENTER-CLUSTER-NAME get clusterconfig ENTER-CLUSTER-NAME
Change domain
Step 1: Save ClusterConfig
Save the original configuration so that if an error occurs you can rollback the changes:
export CLUSTER_NAMESPACE=<cluster_namespace>
export CLUSTER_NAME=<cluster_name>
kubectl -n "$CLUSTER_NAMESPACE" get clusterconfig "$CLUSTER_NAME" -o yaml > "clusterconfig-$CLUSTER_NAME-backup.yaml"
Step 2: Change defaultIngressFQDN
Open ClusterConfig for editing:
kubectl -n "$CLUSTER_NAMESPACE" edit clusterconfig "$CLUSTER_NAME"
In the spec.systemServicesConfig.ingress block, change defaultIngressFQDN.
Example fragment ClusterConfig:
apiVersion: cluster.shturval.tech/v1beta1
kind: ClusterConfig
metadata:
name: <cluster_name>
namespace: <cluster_namespace>
spec:
clusterName: <cluster_name>
systemServicesConfig:
ingress:
setupVIP: true
defaultIngressFQDN: "*.mydomain.ru"
| Parameter | Description | Data type |
|---|---|---|
defaultIngressFQDN | New wildcard FQDN for Ingress | string |
Step 3. Check the result
After applying the changes, check that:
- the cluster opens on a new domain;
- logs and merics arrive inthe cluster;
- from the cluster GUI or namespace you can go to Argo CD with a new FQDN.
If you need to install a corporate certificate after changing the domain, follow the instructions in the Scenario for adding a corporate certificate to a cluster section.
What cluster-manager updates
After changing the FQDN in ClusterConfig, cluster-manager triggers a resource update. The list of updated resources depends on where the domain name is changed: in the management cluster or in the client cluster.
For the management cluster, cluster-manager updates:
- default cluster profile
default-client-cluster-profile: parametersspec.loggingEndpointandspec.monitoringEndpoint; ShturvalServicePatchshturval-ingress-controller-ingress: parameterspec.custom values.controller.shturval.commonName;ShturvalServiceConfigin all arguments where the previous FQDN was used:shturval-auth,shturval-backend,shturval-cd,shturval-dashboards,shturval-frontend,shturval-metrics-collector,shturval-monitoring.
For a client cluster, cluster-manager updates:
ShturvalServicePatchshturval-ingress-controller-ingress: parameterspec.custom values.controller.shturval.commonName;ShturvalServiceConfigin all arguments where the previous FQDN of the client or management cluster was used:shturval-cd,shturval-metrics-collector,shturval-log-collector.