Sfoglia il codice sorgente

docs,README: fix kubeconfig env var

Lucas Servén Marín 6 anni fa
parent
commit
9fda84ec05
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 2 2
      README.md
  2. 2 2
      docs/multi-cluster-services.md

+ 2 - 2
README.md

@@ -139,11 +139,11 @@ For example, if `cluster1` is running a Kubernetes Service that we need to acces
 ```shell
 # Register the nodes in cluster1 as peers of cluster2.
 for n in $(kubectl --kubeconfig $KUBECONFIG1 get no -o name | cut -d'/' -f2); do
-    kgctl --kubeconfig $KUBECONFIG1 showconf node $n --as-peer -o yaml --allowed-ips $SERVICECIDR1 | kubectl --kubeconfig KUBECONFIG2 apply -f -
+    kgctl --kubeconfig $KUBECONFIG1 showconf node $n --as-peer -o yaml --allowed-ips $SERVICECIDR1 | kubectl --kubeconfig $KUBECONFIG2 apply -f -
 done
 # Register the nodes in cluster2 as peers of cluster1.
 for n in $(kubectl --kubeconfig $KUBECONFIG2 get no -o name | cut -d'/' -f2); do
-    kgctl --kubeconfig $KUBECONFIG2 showconf node $n --as-peer -o yaml --allowed-ips $SERVICECIDR2 | kubectl --kubeconfig KUBECONFIG1 apply -f -
+    kgctl --kubeconfig $KUBECONFIG2 showconf node $n --as-peer -o yaml --allowed-ips $SERVICECIDR2 | kubectl --kubeconfig $KUBECONFIG1 apply -f -
 done
 # Create a Service in cluster2 to mirror the Service in cluster1.
 cat <<'EOF' | kubectl --kubeconfig $KUBECONFIG2 apply -f -

+ 2 - 2
docs/multi-cluster-services.md

@@ -23,12 +23,12 @@ In order to give `cluster2` access to a service running on `cluster1`, start by
 # Register the nodes in cluster1 as peers of cluster2.
 for n in $(kubectl --kubeconfig $KUBECONFIG1 get no -o name | cut -d'/' -f2); do
     # Specify the service CIDR as an extra IP range that should be routable.
-    kgctl --kubeconfig $KUBECONFIG1 showconf node $n --as-peer -o yaml --allowed-ips $SERVICECIDR1 | kubectl --kubeconfig KUBECONFIG2 apply -f -
+    kgctl --kubeconfig $KUBECONFIG1 showconf node $n --as-peer -o yaml --allowed-ips $SERVICECIDR1 | kubectl --kubeconfig $KUBECONFIG2 apply -f -
 done
 # Register the nodes in cluster2 as peers of cluster1.
 for n in $(kubectl --kubeconfig $KUBECONFIG2 get no -o name | cut -d'/' -f2); do
     # Specify the service CIDR as an extra IP range that should be routable.
-    kgctl --kubeconfig $KUBECONFIG2 showconf node $n --as-peer -o yaml --allowed-ips $SERVICECIDR2 | kubectl --kubeconfig KUBECONFIG1 apply -f -
+    kgctl --kubeconfig $KUBECONFIG2 showconf node $n --as-peer -o yaml --allowed-ips $SERVICECIDR2 | kubectl --kubeconfig $KUBECONFIG1 apply -f -
 done
 ```