From 1fa93c6e202132319d873f4699e051853caa421c Mon Sep 17 00:00:00 2001 From: Jason Colyer Date: Mon, 17 Sep 2018 13:38:53 -0500 Subject: [PATCH 1/4] Added info on getting k8s integration for existing cluster --- doc/user/project/clusters/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/user/project/clusters/index.md b/doc/user/project/clusters/index.md index 41768998a59..20accdb38b5 100644 --- a/doc/user/project/clusters/index.md +++ b/doc/user/project/clusters/index.md @@ -113,6 +113,19 @@ To add an existing Kubernetes cluster to your project: After a couple of minutes, your cluster will be ready to go. You can now proceed to install some [pre-defined applications](#installing-applications). +If you need to determine some of the above values, the following should prove helpful: + +- The API URL: + - You can get this via the command: `kubectl config view|grep server` +- The CA Certificate: + - You can determine the certificate via this command: `kubectl config view --raw|awk '/certificate-authority-data/ {print $NF}'|base64 -d` +- The Token: + - You will first need to determine which secret you need the token for. + - To list the secrets, run the command: `kubectl get secrets` + - Determine which secret you want the token for + - Run this command to get the token: `kubectl describe secrets/|grep ^token` + - Replace `` with the secret you want the token for + ## Security implications CAUTION: **Important:** From 54330656ac3abbe566a24ddcaa5d85ea5f7e8f6b Mon Sep 17 00:00:00 2001 From: Jason Colyer Date: Thu, 11 Oct 2018 15:41:17 -0500 Subject: [PATCH 2/4] Updated commands and order from MR recomendations --- doc/user/project/clusters/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/user/project/clusters/index.md b/doc/user/project/clusters/index.md index 20accdb38b5..5076dfc8107 100644 --- a/doc/user/project/clusters/index.md +++ b/doc/user/project/clusters/index.md @@ -116,15 +116,15 @@ to install some [pre-defined applications](#installing-applications). If you need to determine some of the above values, the following should prove helpful: - The API URL: - - You can get this via the command: `kubectl config view|grep server` -- The CA Certificate: - - You can determine the certificate via this command: `kubectl config view --raw|awk '/certificate-authority-data/ {print $NF}'|base64 -d` + - You can get this via the command: `kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}'` - The Token: - You will first need to determine which secret you need the token for. - To list the secrets, run the command: `kubectl get secrets` - Determine which secret you want the token for - - Run this command to get the token: `kubectl describe secrets/|grep ^token` + - Run this command to get the token: `kubectl get secret -o jsonpath="{['data']['token']}" | base64 -D` - Replace `` with the secret you want the token for +- The CA Certificate: + - You can determine the certificate via this command: `kubectl get secret -o jsonpath="{['data']['ca\.crt']}" | base64 -D` ## Security implications From 742a9c834425fef126d066b66e5780b48ff035ef Mon Sep 17 00:00:00 2001 From: Jason Colyer Date: Wed, 24 Oct 2018 07:32:07 -0500 Subject: [PATCH 3/4] Added Evan's suggestions --- doc/user/project/clusters/index.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/doc/user/project/clusters/index.md b/doc/user/project/clusters/index.md index 5076dfc8107..8a522a3e255 100644 --- a/doc/user/project/clusters/index.md +++ b/doc/user/project/clusters/index.md @@ -113,18 +113,13 @@ To add an existing Kubernetes cluster to your project: After a couple of minutes, your cluster will be ready to go. You can now proceed to install some [pre-defined applications](#installing-applications). -If you need to determine some of the above values, the following should prove helpful: +To determine the: -- The API URL: - - You can get this via the command: `kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}'` -- The Token: - - You will first need to determine which secret you need the token for. - - To list the secrets, run the command: `kubectl get secrets` - - Determine which secret you want the token for - - Run this command to get the token: `kubectl get secret -o jsonpath="{['data']['token']}" | base64 -D` - - Replace `` with the secret you want the token for -- The CA Certificate: - - You can determine the certificate via this command: `kubectl get secret -o jsonpath="{['data']['ca\.crt']}" | base64 -D` +- API URL, run `kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}'` +- Token: + 1. List the secrets by running `kubectl get secrets`. Note the name of the secret you need the token for. + 2. Get the token for the noted secret by running `kubectl get secret -o jsonpath="{['data']['token']}" | base64 -D` +- CA Certificate, run `kubectl get secret -o jsonpath="{['data']['ca\.crt']}" | base64 -D` ## Security implications From bad48b1c241faff39991faec0787875a72c15d6e Mon Sep 17 00:00:00 2001 From: Jason Colyer Date: Tue, 30 Oct 2018 10:28:03 -0500 Subject: [PATCH 4/4] Added periods and modified numbering --- doc/user/project/clusters/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/user/project/clusters/index.md b/doc/user/project/clusters/index.md index 8a522a3e255..4211657ad03 100644 --- a/doc/user/project/clusters/index.md +++ b/doc/user/project/clusters/index.md @@ -115,11 +115,11 @@ to install some [pre-defined applications](#installing-applications). To determine the: -- API URL, run `kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}'` +- API URL, run `kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}'`. - Token: - 1. List the secrets by running `kubectl get secrets`. Note the name of the secret you need the token for. - 2. Get the token for the noted secret by running `kubectl get secret -o jsonpath="{['data']['token']}" | base64 -D` -- CA Certificate, run `kubectl get secret -o jsonpath="{['data']['ca\.crt']}" | base64 -D` + 1. List the secrets by running: `kubectl get secrets`. Note the name of the secret you need the token for. + 1. Get the token for the appropriate secret by running: `kubectl get secret -o jsonpath="{['data']['token']}" | base64 -D`. +- CA certificate, run `kubectl get secret -o jsonpath="{['data']['ca\.crt']}" | base64 -D`. ## Security implications