Skip to content

Commit 379d108

Browse files
committed
[OSDOCS-14539]: Custom KubeAPI name
1 parent 0d88cea commit 379d108

File tree

8 files changed

+73
-4
lines changed

8 files changed

+73
-4
lines changed

hosted_control_planes/hcp-deploy/hcp-deploy-aws.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ include::modules/hcp-aws-create-dns-hosted-zone.adoc[leveloffset=+2]
4646

4747
include::modules/hcp-aws-hc-ext-dns.adoc[leveloffset=+2]
4848

49+
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
50+
4951
include::modules/hcp-aws-deploy-hc.adoc[leveloffset=+1]
5052

5153
[role="_additional-resources"]
@@ -72,9 +74,8 @@ include::modules/hcp-create-np-arm64-aws.adoc[leveloffset=+2]
7274
7375
include::modules/hcp-create-private-hc-aws.adoc[leveloffset=+1]
7476

75-
[role="_additional-resources"]
76-
.Additional resources
77-
77+
//[role="_additional-resources"]
78+
//.Additional resources
7879
//Identity and Access Management (IAM) permissions
7980

8081
include::modules/hcp-access-priv-mgmt-aws.adoc[leveloffset=+2]

hosted_control_planes/hcp-deploy/hcp-deploy-bm.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ include::modules/hcp-bm-infra-reqs.adoc[leveloffset=+2]
4646
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#ansible-config-hosted-cluster[Configuring Ansible Automation Platform jobs to run on hosted clusters]
4747
4848
include::modules/hcp-bm-dns.adoc[leveloffset=+1]
49+
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
50+
4951
include::modules/hcp-bm-hc.adoc[leveloffset=+1]
5052

5153
[role="_additional-resources"]

hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ include::modules/hcp-ibm-power-prereqs.adoc[leveloffset=+1]
3535
include::modules/hcp-ibm-power-infra-reqs.adoc[leveloffset=+1]
3636

3737
include::modules/hcp-ibm-power-dns.adoc[leveloffset=+1]
38+
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
3839

3940
include::modules/hcp-bm-hc.adoc[leveloffset=+1]

hosted_control_planes/hcp-deploy/hcp-deploy-ibmz.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ include::modules/hcp-ibm-z-infra-reqs.adoc[leveloffset=+1]
4141
* xref:../../hosted_control_planes/hcp-prepare/hcp-enable-disable.adoc[Enabling or disabling the {hcp} feature]
4242
4343
include::modules/hcp-ibm-z-dns.adoc[leveloffset=+1]
44+
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
45+
4446
include::modules/hcp-bm-hc.adoc[leveloffset=+1]
4547

4648
[role="_additional-resources"]

hosted_control_planes/hcp-deploy/hcp-deploy-non-bm.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ include::modules/hcp-non-bm-infra-reqs.adoc[leveloffset=+2]
5353
* link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#ansible-config-hosted-cluster[Configuring Ansible Automation Platform jobs to run on hosted clusters]
5454
5555
include::modules/hcp-non-bm-dns.adoc[leveloffset=+1]
56+
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
57+
5658
include::modules/hcp-non-bm-hc.adoc[leveloffset=+1]
5759

5860
[role="_additional-resources"]

hosted_control_planes/hcp-deploy/hcp-deploy-virt.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ include::modules/hcp-virt-create-hc-console.adoc[leveloffset=+2]
6262
* To access the hosted cluster, see xref:../../hosted_control_planes/hcp-manage/hcp-manage-virt.adoc#hcp-virt-access_hcp-manage-virt[Accessing the hosted cluster].
6363

6464
include::modules/hcp-virt-ingress-dns.adoc[leveloffset=+1]
65+
include::modules/hcp-custom-dns.adoc[leveloffset=+2]
6566

6667
[id="hcp-virt-ingress-dns-custom"]
6768
== Customizing ingress and DNS behavior

hosted_control_planes/hcp-manage/hcp-manage-aws.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ include::modules/hcp-managed-aws-hc-separate.adoc[leveloffset=+2]
3535

3636
include::modules/hcp-migrate-aws-single-to-multiarch.adoc[leveloffset=+1]
3737

38-
include::modules/hcp-migrate-aws-multiarch-nodepools.adoc[leveloffset=+1]
38+
include::modules/hcp-migrate-aws-multiarch-nodepools.adoc[leveloffset=+1]

modules/hcp-custom-dns.adoc

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-deploy/hcp-deploy-aws.adoc
4+
// * hosted_control_planes/hcp-deploy/hcp-deploy-bm.adoc
5+
// * hosted_control_planes/hcp-deploy/hcp-deploy-virt.adoc
6+
// * hosted_control_planes/hcp-deploy/hcp-deploy-non-bm.adoc
7+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibm-power.adoc
8+
// * hosted_control_planes/hcp-deploy/hcp-deploy-ibmz.adoc
9+
10+
:_mod-docs-content-type: PROCEDURE
11+
[id="hcp-custom-dns_{context}"]
12+
= Defining a custom DNS name
13+
14+
As a cluster administrator, you can create a hosted cluster with an external API DNS name that is different from the internal endpoint that is used for node bootstraps and control plane communication. You might want to define a different DNS name for the following reasons:
15+
16+
* To replace the user-facing TLS certificate with one from a public CA without breaking the control plane functions that are bound to the internal root CA
17+
* To support split-horizon DNS and NAT scenarios
18+
* To ensure a similar experience to standalone control planes, where you can use functions, such as the "Show Login Command" function, with the correct `kubeconfig` and DNS configuration
19+
20+
You can define a DNS name either during your initial setup or during day-2 operations, by entering a domain name in the `kubeAPIServerDNSName` field of a `HostedCluster` object.
21+
22+
.Prerequisites
23+
24+
* You have a valid TLS certificate that covers the DNS name that you will set in the `kubeAPIServerDNSName` field.
25+
* Your DNS name is a resolvable URI that is reachable and pointing to the right address.
26+
27+
.Procedure
28+
29+
* In the specification for the `HostedCluster` object, add the `kubeAPIServerDNSName` field and the address for the domain and specify which certificate to use, as shown in the following example:
30+
+
31+
[source,yaml]
32+
----
33+
#...
34+
spec:
35+
configuration:
36+
apiServer:
37+
servingCerts:
38+
namedCertificates:
39+
- names:
40+
- xxx.example.com
41+
- yyy.example.com
42+
servingCertificate:
43+
name: <my_serving_certificate>
44+
kubeAPIServerDNSName: <your_custom_address> # <1>
45+
----
46+
+
47+
<1> The value for the `kubeAPIServerDNSName` field must be a valid, addressable domain.
48+
49+
After you define the `kubeAPIServerDNSName` field and specify the certificate, the Control Plane Operator controllers create a `kubeconfig` file named `custom-admin-kubeconfig`, which is stored in the `HostedControlPlane` namespace. The certificates are generated from the root CA, and the `HostedControlPlane` namespace manages their expiration and renewal.
50+
51+
The Control Plane Operator reports a new `kubeconfig` file named `CustomKubeconfig` in the `HostedControlPlane` namespace. That file uses the new server that is defined in the `kubeAPIServerDNSName` field.
52+
53+
The custom `kubeconfig` file is referenced in the `HostedCluster` object in the `status` field as `CustomKubeconfig`. The `CustomKubeConfig` field is optional, and can be added only if the `kubeAPIServerDNSName` field is not empty. When the `CustomKubeConfig` field is set, it triggers the generation of a secret named `<hosted_cluster_name>-custom-admin-kubeconfig` in the `HostedCluster` namespace. You can use the secret to access the `HostedCluster` API server. If you remove the `CustomKubeConfig` field during day-2 operations, all related secrets and status references are deleted.
54+
55+
[NOTE]
56+
====
57+
This process does not directly affect the data plane, so no rollouts are expected to occur. The `HostedControlPlane` namespace receives the changes from the HyperShift Operator and deletes the corresponding fields.
58+
====
59+
60+
If you remove the `kubeAPIServerDNSName` field from the specification, all newly generated secrets and the `CustomKubeconfig` reference are removed from the cluster and from the `status` field.

0 commit comments

Comments
 (0)