|
1 | 1 | {{ define "windows-tab-content" }} |
2 | | -<h3>Install and Set Up kubectl</h3> |
3 | | - <div> |
| 2 | + <h3>Install and Set Up kubectl</h3> |
| 3 | + <div> |
4 | 4 | See |
5 | 5 | <a title="Install and setup kubectl" href="https://kubernetes.io/docs/tasks/tools/install-kubectl/"> |
6 | 6 | https://kubernetes.io/docs/tasks/tools/install-kubectl |
7 | 7 | </a> |
8 | 8 |
|
9 | 9 | {{ if .KubectlVersion }} |
10 | | - <p> |
11 | | - Download kubectl: |
12 | | - <a title="Download kubectl" href="https://storage.googleapis.com/kubernetes-release/release/{{.KubectlVersion}}/bin/windows/amd64/kubectl.exe"> |
13 | | - https://storage.googleapis.com/kubernetes-release/release/{{.KubectlVersion}}/bin/windows/amd64/kubectl.exe |
14 | | - </a> |
15 | | - </p> |
| 10 | + <p> |
| 11 | + Download kubectl: |
| 12 | + <a title="Download kubectl" |
| 13 | + href="https://storage.googleapis.com/kubernetes-release/release/{{.KubectlVersion}}/bin/windows/amd64/kubectl.exe"> |
| 14 | + https://storage.googleapis.com/kubernetes-release/release/{{.KubectlVersion}}/bin/windows/amd64/kubectl.exe |
| 15 | + </a> |
| 16 | + </p> |
16 | 17 | {{ end }} |
17 | 18 | </div> |
18 | 19 |
|
@@ -85,17 +86,21 @@ <h3>Run configuration commands</h3> |
85 | 86 | <button class="btn" style="float:right" data-clipboard-snippet=""> |
86 | 87 | <img class="clippy" width="13" src="{{ .Web_Path_Prefix }}static/clippy.svg" alt=""> |
87 | 88 | </button> |
88 | | - <pre><code>kubectl config set-cluster {{ .ClusterName }} --certificate-authority=${HOME}/.kube/certs/{{ .ClusterName}}/k8s-ca.crt --server={{ .K8sMasterURI }}</code></pre> |
| 89 | + <pre><code>kubectl config set-cluster {{ .ClusterName }} --certificate-authority=${HOME}/.kube/certs/{{ .ClusterName}}/k8s-ca.crt --server={{ .K8sMasterURI }}</code></pre> |
89 | 90 | </div> |
90 | 91 |
|
91 | 92 | <div class="command"> |
92 | 93 |
|
93 | 94 | <button class="btn" style="float:right" data-clipboard-snippet=""> |
94 | 95 | <img class="clippy" width="13" src="{{ .Web_Path_Prefix }}static/clippy.svg" alt=""/> |
95 | 96 | </button> |
96 | | - <pre><code>kubectl config set-credentials {{ .Username }}-{{ .ClusterName }} --auth-provider=oidc --auth-provider-arg=idp-issuer-url={{ .Issuer }} --auth-provider-arg=client-id={{ .ClientID }} --auth-provider-arg=client-secret={{ .ClientSecret }} --auth-provider-arg=refresh-token={{ .RefreshToken }} --auth-provider-arg=id-token={{ .IDToken }} |
97 | | - {{- if or (.IDPCaURI) (.IDPCaPem) }} --auth-provider-arg=idp-certificate-authority=${HOME}/.kube/certs/{{ .ClusterName }}/idp-ca.crt |
98 | | - {{- end }}</code></pre> |
| 97 | + {{- if .BearerToken }} |
| 98 | + <pre><code>kubectl config set-credentials {{ .Username }}-{{ .ClusterName }} --token={{ .IDToken }}</code></pre> |
| 99 | + {{- else }} |
| 100 | + <pre><code>kubectl config set-credentials {{ .Username }}-{{ .ClusterName }} --auth-provider=oidc --auth-provider-arg=idp-issuer-url={{ .Issuer }} --auth-provider-arg=client-id={{ .ClientID }} --auth-provider-arg=client-secret={{ .ClientSecret }} --auth-provider-arg=refresh-token={{ .RefreshToken }} --auth-provider-arg=id-token={{ .IDToken }} |
| 101 | + {{- if or (.IDPCaURI) (.IDPCaPem) }} --auth-provider-arg=idp-certificate-authority=${HOME}/.kube/certs/{{ .ClusterName }}/idp-ca.crt |
| 102 | + {{- end }}</code></pre> |
| 103 | + {{- end }} |
99 | 104 | </div> |
100 | 105 | <div class="command"> |
101 | 106 |
|
|
0 commit comments