Skip to content

Commit 41adc52

Browse files
committed
[OSDOCS-14539]: Custom KubeAPI name
1 parent 50b9e72 commit 41adc52

File tree

9 files changed

+80
-6
lines changed

9 files changed

+80
-6
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-kubeapi.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-kubeapi.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-kubeapi.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-kubeapi.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-kubeapi.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-kubeapi.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-kubeapi.adoc

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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-kubeapi_{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+
In order to define a DNS name, you insert a domain name in the `KubeAPICustomName` field of a `HostedCluster` object. You can define the name either during your initial setup or as part of a post-deployment update.
21+
22+
.Procedure
23+
24+
. In the specification for the `HostedCluster` object, add the `kubeAPIServerDNSName` field and the address for the domain.
25+
+
26+
[source,yaml]
27+
----
28+
kubeAPIServerDNSName: <your_custom_address> <1>
29+
----
30+
+
31+
<1> The value for the `kubeAPIServerDNSName` field must be a valid, addressable domain.
32+
33+
. In the `namedCertificates` file of the OpenShift API, specify which certificate to use, as shown in the following example.
34+
+
35+
.Example `namedCertificates` file
36+
+
37+
[source,yaml]
38+
----
39+
spec:
40+
configuration:
41+
apiServer:
42+
servingCerts:
43+
namedCertificates:
44+
- names:
45+
- xxx.example.com
46+
- yyy.example.com
47+
servingCertificate:
48+
name: my-serving-certificate
49+
----
50+
51+
After the `kubeAPIServerDNSName` field is defined and the certificate is specified, 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.
52+
53+
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 `KubeAPICustomName` field.
54+
55+
The custom `kubeconfig` file is referenced in the `HostedCluster` object in the `status` field as `CustomKubeconfig`.
56+
57+
A new secret, named `<hosted_cluster_name>-custom-admin-kubeconfig`, is created in the `HostedCluster` namespace. You can use the secret to access the `HostedCluster` API server.
58+
59+
[NOTE]
60+
====
61+
This process does not directly affect the data plane, so no rollouts are expected to occur.
62+
====
63+
64+
If you remove the `kubeAPIServerDNSName` field from the specification, all newly generated secrets and the `CustomKubeconfig` reference will be removed from the cluster and from the `status` field.

modules/hcp-migrate-aws-single-to-multiarch.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ $ oc get hostedcluster/<hosted_cluster_name> \// <1>
3737
.Example output
3838
[source,terminal]
3939
----
40-
quay.io/openshift-release-dev/ocp-release:<4.y.z>-x86_64 <1>
40+
quay.io/openshift-release-dev/ocp-release:<4.y.z>-x86_64
4141
----
42-
<1> Replace `<4.y.z>` with the supported {product-title} version that you use.
42+
+
43+
where `<4.y.z>` is replaced with the supported {product-title} version that you use.
4344

4445
. In your {product-title} release image, if you use the digest instead of a tag, find the multi-architecture tag version of your release image:
4546

0 commit comments

Comments
 (0)