diff --git a/docs/clusters/adding-clusters.md b/docs/clusters/adding-clusters.md index 87a228567d..d153d8c9bf 100644 --- a/docs/clusters/adding-clusters.md +++ b/docs/clusters/adding-clusters.md @@ -1,6 +1,6 @@ # Adding Clusters -Add clusters by clicking the **Add Cluster** button in the left-side menu. +Add clusters by clicking the **Add Cluster** button in the left-side menu. 1. Click the **Add Cluster** button (indicated with a '+' icon). 2. Enter the path to your kubeconfig file. You'll need to have a kubeconfig file for the cluster you want to add. You can either browse for the path from the file system or or enter it directly. @@ -13,4 +13,10 @@ Selected [cluster contexts](https://kubernetes.io/docs/concepts/configuration/or For more information on kubeconfig see [Kubernetes docs](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/). -To see your currently-enabled config with `kubectl`, enter `kubectl config view --minify --raw` in your terminal. \ No newline at end of file +To see your currently-enabled config with `kubectl`, enter `kubectl config view --minify --raw` in your terminal. + +When connecting to a cluster, make sure you have a valid and working kubeconfig for the cluster. Following lists known "gotchas" in some authentication types used in kubeconfig with Lens app. + +## Exec auth plugins + +When using [exec auth](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#configuration) plugins make sure the paths that are used to call any binaries are full paths as Lens app might not be able to call binaries with relative paths. Make also sure that you pass all needed information either as arguments or env variables in the config, Lens app might not have all login shell env variables set automatically. diff --git a/docs/clusters/images/add-cluster.png b/docs/clusters/images/add-cluster.png index b53c09f704..fa7b632026 100644 Binary files a/docs/clusters/images/add-cluster.png and b/docs/clusters/images/add-cluster.png differ diff --git a/src/renderer/components/+add-cluster/add-cluster.scss b/src/renderer/components/+add-cluster/add-cluster.scss index d80373406d..9583ec17b9 100644 --- a/src/renderer/components/+add-cluster/add-cluster.scss +++ b/src/renderer/components/+add-cluster/add-cluster.scss @@ -1,16 +1,20 @@ -.AddCluster { - .hint { - margin-top: -$padding; - color: $textColorSecondary; - - > * { - vertical-align: middle; - } - } +.AddClusters { + --flex-gap: #{$unit * 2}; + $spacing: $padding * 2; .AceEditor { min-height: 200px; max-height: 400px; + border: 1px solid var(--colorVague); + border-radius: $radius; + + .theme-light & { + border-color: var(--borderFaintColor); + } + + .editor { + border-radius: $radius; + } } .Select { @@ -34,4 +38,13 @@ code { color: $pink-400; } + + .text-primary { + color: var(--textColorAccent); + } + + .hint { + display: block; + padding-top: 6px; + } } diff --git a/src/renderer/components/+add-cluster/add-cluster.tsx b/src/renderer/components/+add-cluster/add-cluster.tsx index 1fae256618..139ebd392c 100644 --- a/src/renderer/components/+add-cluster/add-cluster.tsx +++ b/src/renderer/components/+add-cluster/add-cluster.tsx @@ -25,6 +25,8 @@ import { Notifications } from "../notifications"; import { Tab, Tabs } from "../tabs"; import { ExecValidationNotFoundError } from "../../../common/custom-errors"; import { appEventBus } from "../../../common/event-bus"; +import { PageLayout } from "../layout/page-layout"; +import { docsUrl } from "../../../common/vars"; enum KubeConfigSourceTab { FILE = "file", @@ -193,44 +195,19 @@ export class AddCluster extends React.Component { renderInfo() { return ( - -

Clusters associated with Lens

-

- Add clusters by clicking the Add Cluster button. - You'll need to obtain a working kubeconfig for the cluster you want to add. You can either browse it from the file system or paste it as a text from the clipboard. -

-

- Selected cluster contexts are added as a separate item in the - left-side cluster menu to allow you to operate easily on multiple clusters and/or contexts. -

-

- For more information on kubeconfig see Kubernetes docs. -

-

- NOTE: Any manually added cluster is not merged into your kubeconfig file. -

-

- To see your currently enabled config with kubectl, use kubectl config view --minify --raw command in your terminal. -

-

- When connecting to a cluster, make sure you have a valid and working kubeconfig for the cluster. Following lists known "gotchas" in some authentication types used in kubeconfig with Lens - app. -

-

Exec auth plugins

-

- When using exec auth plugins make sure the paths that are used to call - any binaries - are full paths as Lens app might not be able to call binaries with relative paths. Make also sure that you pass all needed information either as arguments or env variables in the config, - Lens app might not have all login shell env variables set automatically. -

-
+

+ Add clusters by clicking the Add Cluster button. + You'll need to obtain a working kubeconfig for the cluster you want to add. + You can either browse it from the file system or paste it as a text from the clipboard. + Read more about adding clusters here. +

); } renderKubeConfigSource() { return ( <> - + Select kubeconfig file} @@ -242,7 +219,7 @@ export class AddCluster extends React.Component { /> {this.sourceTab === KubeConfigSourceTab.FILE && ( - <> +
Pro-Tip: you can also drag-n-drop kubeconfig file to this area - +
)} {this.sourceTab === KubeConfigSourceTab.TEXT && ( - <> +
Pro-Tip: paste kubeconfig to get available contexts - +
)} ); @@ -296,7 +273,7 @@ export class AddCluster extends React.Component { ? Selected contexts: {this.selectedContexts.length} : Select contexts; return ( - <> +