Skip to content

Commit 1e95462

Browse files
authored
multi-cluster: add pre-installation steps for KinD (#16723)
* multi-cluster: add pre-installation steps for KinD Signed-off-by: Jacek Ewertowski <[email protected]> * Add "Makefile" to spelling Signed-off-by: Jacek Ewertowski <[email protected]> * Add hyperlinks to script paths Signed-off-by: Jacek Ewertowski <[email protected]> --------- Signed-off-by: Jacek Ewertowski <[email protected]>
1 parent 8652b61 commit 1e95462

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.spelling

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ macOS
838838
Maertens
839839
Maglev
840840
maintainership
841+
Makefile
841842
Mandar
842843
Manolache
843844
Mansing

content/en/docs/setup/install/multicluster/before-you-begin/index.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ In addition, review the requirements and perform the initial steps below.
1919
This guide requires that you have two Kubernetes clusters with any of the
2020
[supported Kubernetes versions:](/docs/releases/supported-releases#support-status-of-istio-releases) {{< supported_kubernetes_versions >}}.
2121

22+
{{< tip >}}
23+
If you are testing multicluster setup on `kind`, you can use the script `samples/kind-lb/setupkind.sh` to quickly set up clusters with load balancer support:
24+
25+
{{< text bash >}}
26+
$ @samples/kind-lb/setupkind.sh@ --cluster-name cluster-1 --ip-space 254
27+
$ @samples/kind-lb/setupkind.sh@ --cluster-name cluster-2 --ip-space 255
28+
{{< /text >}}
29+
30+
{{< /tip >}}
31+
2232
### API Server Access
2333

2434
The API Server in each cluster must be accessible to the other clusters in the
@@ -46,6 +56,16 @@ $ export CTX_CLUSTER1=<your cluster1 context>
4656
$ export CTX_CLUSTER2=<your cluster2 context>
4757
{{< /text >}}
4858

59+
{{< tip >}}
60+
If you're using `kind`, set the following contexts:
61+
62+
{{< text bash >}}
63+
$ export CTX_CLUSTER1=$(kubectl config get-contexts -o name | grep kind-cluster-1)
64+
$ export CTX_CLUSTER2=$(kubectl config get-contexts -o name | grep kind-cluster-2)
65+
{{< /text >}}
66+
67+
{{< /tip >}}
68+
4969
## Configure Trust
5070

5171
A multicluster service mesh deployment requires that you establish trust
@@ -79,6 +99,48 @@ CA typically requires reinstalling Istio. The installation instructions
7999
below may have to be altered based on your choice of CA.
80100
{{< /tip >}}
81101

102+
{{< tip >}}
103+
If you're using `kind`, you can quickly generate self-signed CA certificates
104+
for your clusters using the provided Makefile:
105+
106+
{{< text bash >}}
107+
$ make -f @tools/certs/Makefile.selfsigned.mk@ \
108+
ROOTCA_CN="Root CA" \
109+
ROOTCA_ORG=istio.io \
110+
root-ca
111+
$ make -f @tools/certs/Makefile.selfsigned.mk@ \
112+
INTERMEDIATE_CN="Cluster 1 Intermediate CA" \
113+
INTERMEDIATE_ORG=istio.io \
114+
cluster1-cacerts
115+
$ make -f @tools/certs/Makefile.selfsigned.mk@ \
116+
INTERMEDIATE_CN="Cluster 2 Intermediate CA" \
117+
INTERMEDIATE_ORG=istio.io \
118+
cluster2-cacerts
119+
{{< /text >}}
120+
121+
This will create a root CA and intermediate CA certificates for each cluster, which you can then use to set up trust between your clusters.
122+
123+
To create the `cacerts` secret in each cluster, use the following command after generating the certificates:
124+
125+
{{< text bash >}}
126+
$ kubectl --context="${CTX_CLUSTER1}" create namespace istio-system
127+
$ kubectl --context="${CTX_CLUSTER1}" create secret generic cacerts -n istio-system \
128+
--from-file=ca-cert.pem=cluster1/ca-cert.pem \
129+
--from-file=ca-key.pem=cluster1/ca-key.pem \
130+
--from-file=root-cert.pem=cluster1/root-cert.pem \
131+
--from-file=cert-chain.pem=cluster1/cert-chain.pem
132+
$ kubectl --context="${CTX_CLUSTER2}" create namespace istio-system
133+
$ kubectl --context="${CTX_CLUSTER2}" create secret generic cacerts -n istio-system \
134+
--from-file=ca-cert.pem=cluster2/ca-cert.pem \
135+
--from-file=ca-key.pem=cluster2/ca-key.pem \
136+
--from-file=root-cert.pem=cluster2/root-cert.pem \
137+
--from-file=cert-chain.pem=cluster2/cert-chain.pem
138+
{{< /text >}}
139+
140+
This will create the `cacerts` secret in the `istio-system` namespace of each cluster, allowing Istio to use your custom CA certificates.
141+
142+
{{< /tip >}}
143+
82144
## Next steps
83145

84146
You're now ready to install an Istio mesh across multiple clusters. The

0 commit comments

Comments
 (0)