Skip to content

Commit f3c6616

Browse files
DOCSP-32629 -- update kubconfig instructions for GitOps deployment (#1950) (#1951)
* DOCSP-32629 -- update kubconfig instructions for GitOps deployment * DOCSP-32629 -- remove save file step (cherry picked from commit cf17969)
1 parent 3aeda32 commit f3c6616

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

source/includes/steps-configure-resources-gitops.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,20 @@ content: |
6868
token: <token>
6969
7070
#. Copy the following ``kubeconfig`` example for the central cluster and replace
71-
the placeholders with the ``<ca_certificate>`` and ``<token>`` you copied from the service account secrets.
71+
the placeholders with the ``<ca_certificate>`` and ``<token>`` you copied from
72+
the service account secrets by running the commands listed below.
7273
7374
.. code-block:: yaml
7475
7576
apiVersion: v1
7677
clusters:
7778
- cluster:
78-
certificate-authority-data: <cluster-1-ca.crt>
79-
server: https://:
79+
certificate-authority:
80+
server: https://
8081
name: kind-e2e-cluster-1
8182
- cluster:
82-
certificate-authority-data: <cluster-2-ca.crt>
83-
server: https://:
83+
certificate-authority:
84+
server: https://
8485
name: kind-e2e-cluster-2
8586
contexts:
8687
- context:
@@ -97,12 +98,21 @@ content: |
9798
users:
9899
- name: kind-e2e-cluster-1
99100
user:
100-
token: <cluster-1-token>
101+
token:
101102
- name: kind-e2e-cluster-2
102103
user:
103-
token: <cluster-2-token>
104+
token:
104105
105-
#. Save the ``kubeconfig`` file.
106+
Populate the following ``kubectl`` commands with the correct values and run
107+
them to update your example ``kubeconfig`` file.
108+
109+
.. code-block:: sh
110+
111+
kubectl config --kubeconfig=kubeconfig set-cluster kind-e2e-cluster-1 --certificate-authority=<cluster-1-ca.crt>
112+
kubectl config --kubeconfig=kubeconfig set-cluster kind-e2e-cluster-2 --certificate-authority=<cluster-2-ca.crt>
113+
114+
kubectl config --kubeconfig=kubeconfig set-credentials kind-e2e-cluster-1 --token=<cluster-1-token>
115+
kubectl config --kubeconfig=kubeconfig set-credentials kind-e2e-cluster-2 --token=<cluster-2-token>
106116
107117
#. Create a secret in the central cluster that you mount in the |k8s-op-short| as illustrated in :github:`the reference Helm chart </mongodb/helm-charts/blob/enterprise-operator-1.20.1/charts/enterprise-operator/templates/operator.yaml#L191-L197/>`. For example:
108118

0 commit comments

Comments
 (0)