From 51495ec773b3dd76d304737336ac03ae1db3d221 Mon Sep 17 00:00:00 2001 From: Ray Zhou Date: Thu, 26 Nov 2020 20:26:53 +0800 Subject: [PATCH] Update deploy ks on eks - install on k8s Signed-off-by: Ray Zhou --- .../install-kubesphere-on-eks.md | 22 +- .../install-kubesphere-on-eks.md | 281 +++++++++--------- 2 files changed, 149 insertions(+), 154 deletions(-) diff --git a/content/en/docs/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks.md b/content/en/docs/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks.md index 0dc6c92e3..46579aa0a 100644 --- a/content/en/docs/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks.md +++ b/content/en/docs/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks.md @@ -49,19 +49,17 @@ Check the installation with `aws --version`. - Security groups: The SecurityGroups value from the AWS CloudFormation output that you generated with [Create your Amazon EKS cluster VPC](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#vpc-create). This security group has ControlPlaneSecurityGroup in the drop-down name. - For **Cluster endpoint access**, choose one of the following options: - ![endpoints](/images/docs/eks/endpoints.png) + ![endpoints](/images/docs/eks/endpoints.png) - - Public: Enables only public access to your cluster's Kubernetes API server endpoint. Kubernetes API requests that originate from outside of your cluster's VPC use the public endpoint. By default, access is allowed from any source IP address. You can optionally restrict access to one or more CIDR ranges such as 192.168.0.0/16, for example, by selecting **Advanced settings** and then selecting **Add source**. + - Public: Enables only public access to your cluster's Kubernetes API server endpoint. Kubernetes API requests that originate from outside of your cluster's VPC use the public endpoint. By default, access is allowed from any source IP address. You can optionally restrict access to one or more CIDR ranges such as 192.168.0.0/16, for example, by selecting **Advanced settings** and then selecting **Add source**. - - Private: Enables only private access to your cluster's Kubernetes API server endpoint. Kubernetes API requests that originate from within your cluster's VPC use the private VPC endpoint. - - {{< notice note >}} + - Private: Enables only private access to your cluster's Kubernetes API server endpoint. Kubernetes API requests that originate from within your cluster's VPC use the private VPC endpoint. + {{< notice note >}} If you created a VPC without outbound internet access, then you must enable private access. + {{}} - {{}} - - - Public and private: Enables public and private access. + - Public and private: Enables public and private access. 4. Select **Next**. On the **Configure logging** page, you can optionally choose which log types that you want to enable. By default, each log type is **Disabled**. For more information, see [Amazon EKS control plane logging](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html). ![logging](/images/docs/eks/logging.png) @@ -70,10 +68,10 @@ Check the installation with `aws --version`. ![revies](/images/docs/eks/review.png) - For more information about the previous options, see [Modifying cluster endpoint access](https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html#modify-endpoint-access). - When your cluster provisioning is complete (usually between 10 and 15 minutes), note the API server endpoint and Certificate authority values. These are used in your kubectl configuration. + When your cluster provisioning is complete (usually between 10 and 15 minutes), save the API server endpoint and Certificate authority values. These are used in your kubectl configuration. ![creating](/images/docs/eks/creating.png) -6. Create **Node Group** and define 2 nodes in this cluster. +6. Create **Node Group** and define 3 nodes in this cluster. ![node-group](/images/docs/eks/node-group.png) 7. Configure the node group. @@ -114,7 +112,7 @@ We will use the kubectl command-line utility for communicating with the cluster - You can specify an IAM role ARN with the `--role-arn` option to use for authentication when you issue kubectl commands. Otherwise, the IAM entity in your default AWS CLI or SDK credential chain is used. You can view your default AWS CLI or SDK identity by running the `aws sts get-caller-identity` command. - For more information, see the help page with the `aws eks update-kubeconfig help` command or see [update-kubeconfig](https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html) in the *AWS CLI Command Reference*. + For more information, see the help page with the `aws eks update-kubeconfig help` command or see [update-kubeconfig](https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html) in the *AWS CLI Command Reference*. 3. Test your configuration. @@ -177,7 +175,7 @@ Now that KubeSphere is installed, you can access the web console of KubeSphere b - Log in the console with the default account and password (`admin/P@88w0rd`). In the cluster overview page, you can see the dashboard as shown in the following image. - ![gke-cluster](https://ap3.qingstor.com/kubesphere-website/docs/gke-cluster.png) + ![eks-cluster](https://ap3.qingstor.com/kubesphere-website/docs/gke-cluster.png) ## Enable Pluggable Components (Optional) diff --git a/content/zh/docs/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks.md b/content/zh/docs/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks.md index 5eacaa43e..8fb40e87a 100644 --- a/content/zh/docs/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks.md +++ b/content/zh/docs/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks.md @@ -6,213 +6,210 @@ description: '介绍如何在 AWS EKS 上部署 KubeSphere' weight: 2210 --- -本指南将介绍如何在 [AWS EKS](https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html) 上部署 KubeSphere。 +本指南将介绍如何在 [AWS EKS](https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html) 上部署 KubeSphere。您也可以通过 [KubeSphere on AWS Quick Start](https://aws.amazon.com/quickstart/architecture/qingcloud-kubesphere/) 在 AWS 上自动部署 EKS 和 KubeSphere。 ## 安装 AWS CLI -AWS EKS 没有像 GKE CloudShell 这样的 Web 终端,因此我们必须先安装 aws cli。下面以 linux 为例,macOS 和其他操作系统可参考 [EKS入门](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html) 。 + +AWS EKS 没有像 GKE CloudShell 这样的 Web 终端,因此我们必须先安装 aws cli。下面以 linux 为例,macOS 和其他操作系统可参考 [EKS 入门](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html)。 + ```shell curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install ``` -使用`aws --version`检查安装版本 +使用`aws --version`检查安装版本。 ```shell -# aws --version +$ aws --version aws-cli/2.1.2 Python/3.7.3 Linux/4.18.0-193.6.3.el8_2.x86_64 exe/x86_64.centos.8 ``` ## 准备 EKS 集群 -- 在 AWS 上创建一个标准的 Kubernetes 集群是安装 KubeSphere 的前提条件, 转到导航菜单,然后参考下图创建集群。 +1. 在 AWS 上创建一个标准的 Kubernetes 集群是安装 KubeSphere 的前提条件,转到导航菜单,然后参考下图创建集群。 - ![create-cluster-eks](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/eks-launch-icon.png) + ![create-cluster-eks](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/eks-launch-icon.png) -- 在"配置集群"页面,配置以下集群信息: +2. 在**配置集群**页面,配置以下集群信息: - ![config-cluster-page](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/config-cluster-page.png) - 配置选项说明: - - 名称–集群的唯一名称。 + ![config-cluster-page](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/config-cluster-page.png) - - Kubernetes 版本– 指定创建集群的 Kubernetes 版本。 + 配置选项说明: - - 集群服务角色–选择通过[创建 Amazon EKS 集群 IAM 角色](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#role-create)创建的 IAM 角色。 + - 名称:集群的唯一名称。 + - Kubernetes 版本:指定创建集群的 Kubernetes 版本。 + - 集群服务角色:选择通过[创建 Amazon EKS 集群 IAM 角色](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#role-create)创建的 IAM 角色。 + - Secrets 加密(可选):选择使用 AWS 密钥管理服务(AWS KMS)启用 Kubernetes secrets 的信封加密。如果启用信封加密,Kubernetes secrets 将使用您选择的客户主密钥(CMK)进行加密。CMK 必须是对称的,在与集群相同的区域中创建,如果 CMK 是在不同的帐户中创建的,则用户必须有权访问 CMK。有关详细信息,请在 AWS 密钥管理服务开发人员指南中参阅 [允许其他帐户中的用户使用CMK](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying-external-accounts.html)。 + - 使用 AWS KMS CM 进行 Kubernetes 秘钥加密需要 Kubernetes 1.13 或更高版本。如果密钥不存在,则必须先创建一个。有关更多信息,请参见[创建密钥](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html)。 + - 标签(可选):将所有标签添加到您的集群。有关更多信息,请参阅[标记 Amazon EKS 资源](https://docs.aws.amazon.com/eks/latest/userguide/eks-using-tags.html)。 - - Secrets 加密–(可选)选择使用 AWS 密钥管理服务( AWS KMS )启用 Kubernetes secrets 的信封加密。如果启用信封加密,Kubernetes secrets 将使用您选择的客户主密钥(CMK)进行加密。CMK 必须是对称的,在与集群相同的区域中创建,如果 CMK 是在不同的帐户中创建的,则用户必须有权访问 CMK。有关详细信息,请在 AWS 密钥管理服务开发人员指南中参阅 [允许其他帐户中的用户使用CMK](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying-external-accounts.html)。 +3. 选择下一步,在**指定联网**页面上,为以下字段选择值: + + ![network](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/networking.png) + + - VPC:您之前在[创建 Amazon EKS 集群 VPC](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#vpc-create) 中创建的 VPC,您可以在下拉列表中找到 VPC 的名称。 + - 子网:默认情况下,上一字段中指定的 VPC 中的可用子网是预选的。选择您不想承载集群资源的任何子网,例如工作节点或负载均衡器。 + - 安全组:通过[创建 Amazon EKS 集群 VPC](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#vpc-create) 中生成的 AWS CloudFormation 输出的 SecurityGroups 值。该安全组在下拉名称中具有`ControlPlaneSecurityGroup`。 - - 使用 AWS KMS CM 进行 Kubernetes 秘钥加密需要 Kubernetes 1.13 或更高版本。如果密钥不存在,则必须先创建一个。有关更多信息,请参见[创建密钥](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html)。 + - 对于集群`endpoints`访问–选择以下选项之一: - - 标签–(可选)将所有标签添加到您的集群。有关更多信息,请参阅[标记 Amazon EKS 资源](https://docs.aws.amazon.com/eks/latest/userguide/eks-using-tags.html)。 + ![endpoints](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/endpoints.png) + - 公有:仅启用对集群的 Kubernetes API server 端点的公共访问,来自集群 VPC 外部的 Kubernetes API 请求使用这个公共端点。默认情况下,允许从任何源 IP 地址进行访问,您也可以只允许一个或多个 CIDR 地址段访问,例如选择**高级设置**,然后选择**添加源**指定地址段 192.168.0.0/16 才能访问。 + - 私有:仅启用对集群的 Kubernetes API server 端点的专用访问。来自集群 VPC 内部的 Kubernetes API 请求使用这个私有 VPC 端点。 -- 选择下一步。 + {{< notice note >}} + 如果创建的 VPC 没有出站 Internet 访问,则必须启用私有访问。 + {{}} - - 在“指定联网”页面上,为以下字段选择值: - ![network](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/networking.png) + - 公有和私有:启用公有和私有访问。 - - VPC –您之前在[创建 Amazon EKS 集群 VPC](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#vpc-create) 中创建的 VPC 。您可以在下拉列表中找到 VPC 的名称。 +4. 选择下一步,在**配置日志记录**页面上,可以选择要启用的日志类型。默认情况下,每种日志类型均为**禁用**。有关更多信息,请参阅[Amazon EKS 控制平面日志记录](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html)。 + ![logging](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/logging.png) - - 子网–默认情况下,上一字段中指定的 VPC 中的可用子网是预选的。选择您不想承载集群资源的任何子网,例如工作程序节点或负载平衡器。 +5. 选择下一步,在**查看和创建**页面上,查看在之前页面上输入或选择的信息。如果需要更改任何选择,请选择**编辑**。对设置满意后,选择**创建**,状态字段将显示**正在创建**,直到集群创建完毕。 + ![revies](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/review.png) - - 安全组–通过[创建 Amazon EKS 集群 VPC](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-console.html#vpc-create) 中生成的 AWS CloudFormation 输出的 SecurityGroups 值。该安全组在下拉名称中具有 `ControlPlaneSecurityGroup`。 + - 有关先前选项的更多信息,请参阅[修改集群端点访问](https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html#modify-endpoint-access)。集群配置完成后(通常在10到15分钟之间),请记下 API server 端点和证书颁发机构值,这些将在您的 kubectl 配置中使用。 + ![creating](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/creating.png) -- 对于集群 `endpoints` 访问–选择以下选项之一: +6. 点击**添加节点组**,在此集群中定义 3 个节点。 - ![endpoints](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/endpoints.png) + ![node-group](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/node-group.png) - - 公有-仅启用对集群的 Kubernetes API server 端点的公共访问。来自集群 VPC 外部的 Kubernetes API 请求使用公共端点。默认情况下,允许从任何源 IP 地址进行访问。您可以选择限制访问一个或多个 CIDR 范围,例如 192.168.0.0/16,例如,选择“高级设置”,然后选择“添加源”。 +7. 配置节点组,注意创建[节点角色](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)。 - - 私有-仅启用对集群的 Kubernetes API server端点的专用访问。来自集群 VPC 内部的 Kubernetes API 请求使用私有 VPC 端点。 + ![config-node-group](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/config-node-grop.png) - > 重要说明: - 如果创建的 VPC 没有出站 Internet 访问,则必须启用私有访问。 + {{< notice note >}} - - 公有和私有-启用公有和私有访问。 -- 选择下一步。 - - - 在“配置日志记录”页面上,可以选择要启用的日志类型。默认情况下,每种日志类型均为“禁用”。有关更多信息,请参阅[Amazon EKS 控制平面日志记录](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html)。 - ![logging](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/logging.png) - -- 选择下一步。 - ![revies](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/review.png) - -- 在“查看和创建”页面上,查看在之前页面上输入或选择的信息。如果需要更改任何选择,请选择“编辑”。对设置满意后,选择创建。状态字段显示“正在创建”,直到群集设置过程完成。有关先前选项的更多信息,请参阅修改集群端点访问。集群配置完成后(通常在10到15分钟之间),请记下 API server 端点和证书颁发机构值。这些将在您的 kubectl 配置中使用。 - ![creating](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/creating.png) - -- 添加节点组,在此集群中定义 3 个节点。 - - ![node-group](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/node-group.png) - -- 配置节点组,注意创建[节点角色](https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html)。 - - ![config-node-group](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/config-node-grop.png) - -{{< notice note >}} - -KubeSphere 3.0.0 支持的 Kubernetes 版本:1.15.x,1.16.x,1.17.x,1.18.x。 -- 这里以 Ubuntu 为操作系统。有关支持的系统的更多信息,请参见概述。 +- KubeSphere 3.0.0 支持的 Kubernetes 版本:1.15.x,1.16.x,1.17.x,1.18.x。 - 此示例中包括 3 个节点。您可以根据自己的需求添加更多节点,尤其是在生产环境中。 -- t3.medium(2个vCPU,4GB内存)机器类型仅用于最小化安装。如果要启用可插拔组件或将群集用于生产,请选择具有更多资源的机器类型。 +- t3.medium(2 个 vCPU,4GB 内存)机器类型仅用于最小化安装,如果要启用可插拔组件或集群用于生产,请选择具有更大规格的机器类型。 - 对于其他设置,您也可以根据自己的需要进行更改,也可以使用默认值。 -{{}} + {{}} + +8. 当 EKS 集群准备就绪时,您可以使用 kubectl 连接到集群。 -- 当 EKS 集群准备就绪时,您可以使用 kubectl 连接到集群。 ## 配置 kubectl -我们将使用 kubectl 命令行实用程序与集群 API Server 进行通信。首先,我们应该获取刚刚创建的eks集群的kubeconfig。 +我们将使用 kubectl 命令行工具与集群 API Server 进行通信。首先需要获取刚刚创建的 EKS 集群的 kubeconfig。 -- 配置您的 AWS CLI 凭证 -```shell -$ aws configure -AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE -AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY -Default region name [None]: region-code -Default output format [None]: json -``` -- 使用 AWS CLI 创建 kubeconfig 文件 +1. 配置您的 AWS CLI 凭证 -```shell -aws eks --region us-west-2 update-kubeconfig --name cluster_name -``` - - 默认情况下,生成的配置文件在主目录中的默认 kubeconfig 路径(.kube/config)中创建,或与该位置处的现有 kubeconfig 合并。您可以使用 –kubeconfig 选项指定其他路径。 + ```shell + $ aws configure + AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE + AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + Default region name [None]: region-code + Default output format [None]: json + ``` - - 您可以使用 –role-arn 选项指定 IAM 角色 ARN ,以在执行 kubectl 命令时用于身份验证。否则,将使用默认 AWS CLI 或 SDK 证书链中的 IAM 实体。您可以通过运行 aws sts get-caller-identity 命令查看默认的 AWS CLI 或 SDK 身份。 +2. 使用 AWS CLI 创建 kubeconfig 文件 -有关更多信息,请参阅带有 aws eks update-kubeconfig help 命令的帮助页面,或参阅[AWS CLI命令参考](https://docs.aws.amazon.com/eks/latest/userguide/security_iam_id-based-policy-examples.html)中的update-kubeconfig 。 + ```shell + aws eks --region us-west-2 update-kubeconfig --name cluster_name + ``` -- 测试您的配置。 - ```shell - kubectl get svc + - 默认情况下,生成的配置文件在主目录中的默认 kubeconfig 路径(`.kube/config`)中创建,或与该位置处的现有 kubeconfig 合并。您可以使用`--kubeconfig`选项指定其他路径。 + + - 您可以使用`--role-arn`选项指定 IAM 角色 ARN,以在执行 kubectl 命令时用于身份验证。否则,将使用默认 AWS CLI 或 SDK 证书链中的 IAM 实体。您可以通过运行`aws sts get-caller-identity`命令查看默认的 AWS CLI 或 SDK 身份。 + + 有关更多信息,请参阅带有 aws eks update-kubeconfig help 命令的帮助页面,或参阅[AWS CLI命令参考](https://docs.aws.amazon.com/eks/latest/userguide/security_iam_id-based-policy-examples.html)中的update-kubeconfig。 + +3. 测试您的配置。 + + ```shell + kubectl get svc + ``` + +## 在 EKS 上安装 KubeSphere + +- 使用 kubectl 安装 KubeSphere,以下命令仅用于默认的最小安装。 + + ```bash + kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml + + kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml ``` -## 在EKS上安装KubeSphere - -- 使用 kubectl 安装 KubeSphere 。以下命令仅用于默认的最小安装。 - -```bash -kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml -``` - -- 创建一个本地 cluster-configuration.yaml。 -```shell -kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml -``` - - 检查安装日志: -```bash -kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f -``` + ```bash + kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f + ``` - 安装完成后,您会看到以下消息: -```bash -##################################################### -### Welcome to KubeSphere! ### -##################################################### -Account: admin -Password: P@88w0rd -NOTES: - 1. After logging into the console, please check the - monitoring status of service components in - the "Cluster Management". If any service is not - ready, please wait patiently until all components - are ready. - 2. Please modify the default password after login. -##################################################### -https://kubesphere.io 2020-xx-xx xx:xx:xx -``` + ```yaml + ##################################################### + ### Welcome to KubeSphere! ### + ##################################################### + Account: admin + Password: P@88w0rd + NOTES: + 1. After logging into the console, please check the + monitoring status of service components in + the "Cluster Management". If any service is not + ready, please wait patiently until all components + are ready. + 2. Please modify the default password after login. + ##################################################### + https://kubesphere.io 2020-xx-xx xx:xx:xx + ``` ## 访问 KubeSphere 控制台 -现在已经安装了 KubeSphere ,您可以按照以下步骤访问 KubeSphere 的 Web 控制台。 +现在已经安装了 KubeSphere,您可以按照以下步骤访问 KubeSphere 的 Web 控制台。 - 查看 ks-console 服务。 -```shell -kubectl get svc -n kubesphere-system -``` -- 执行 `kubectl edit ks-console` 将 service 类型从 `NodePort` 更改为 `LoadBalancer` ,完成后保存文件。 + ```shell + kubectl get svc -n kubesphere-system + ``` -```shell -# kubectl edit svc ks-console -n kubesphere-system -...... -spec: - clusterIP: 10.100.160.240 - externalTrafficPolicy: Cluster - ports: - - name: nginx - nodePort: 30880 - port: 80 - protocol: TCP - targetPort: 8000 - selector: - app: ks-console - tier: frontend - version: v3.0.0 - sessionAffinity: None - type: LoadBalancer -``` +- 执行`kubectl edit ks-console`将 service 类型`NodePort` 更改为`LoadBalancer`,完成后保存文件。 -- 执行 `kubectl get svc -n kubesphere-system` 获取您的 EXTERNAL-IP -```shell -# kubectl get svc -n kubesphere-system -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -ks-apiserver ClusterIP 10.100.108.212 80/TCP 6m28s -ks-console LoadBalancer 10.100.160.240 ad107c54ee456744c91c8da0b9321f2c-1235661477.ap-east-1.elb.amazonaws.com 80:30880/TCP 6m25s -ks-controller-manager ClusterIP 10.100.126.96 443/TCP 6m28s -openldap ClusterIP None 389/TCP 6m54s -redis ClusterIP 10.100.218.34 6379/TCP 6m59s -``` + ```shell + # kubectl edit svc ks-console -n kubesphere-system + ...... + spec: + clusterIP: 10.100.160.240 + externalTrafficPolicy: Cluster + ports: + - name: nginx + nodePort: 30880 + port: 80 + protocol: TCP + targetPort: 8000 + selector: + app: ks-console + tier: frontend + version: v3.0.0 + sessionAffinity: None + type: LoadBalancer + ``` + +- 执行`kubectl get svc -n kubesphere-system`获取您的 EXTERNAL-IP。 + + ```shell + # kubectl get svc -n kubesphere-system + NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE + ks-apiserver ClusterIP 10.100.108.212 80/TCP 6m28s + ks-console LoadBalancer 10.100.160.240 ad107c54ee456744c91c8da0b9321f2c-1235661477.ap-east-1.elb.amazonaws.com 80:30880/TCP 6m25s + ks-controller-manager ClusterIP 10.100.126.96 443/TCP 6m28s + openldap ClusterIP None 389/TCP 6m54s + redis ClusterIP 10.100.218.34 6379/TCP 6m59s + ``` - 使用 EKS 生成的 external-ip 访问 KubeSphere 的 Web 控制台。 -- 使用默认帐户和密码(admin/P@88w0rd)登录控制台。在集群概述页面中,您可以看到如下图所示的仪表板。 +- 使用默认帐户和密码(`admin/P@88w0rd`)登录控制台,在集群概述页面中,可以看到如下图所示的仪表板。 -![gke-cluster](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/gke-cluster.png) + ![eks-cluster](/images/docs/zh-cn/installing-on-kubernetes/hosted-kubernetes/install-kubesphere-on-eks/gke-cluster.png) ## 启用可插拔组件(可选) -上面的示例演示了默认的最小安装过程。要在 KubeSphere 中启用其他组件,请参阅[启用可插拔组件](../../../pluggable-components/)以获取更多详细信息。 +上面的示例演示了默认的最小安装过程,要在 KubeSphere 中启用其他组件,请参阅[启用可插拔组件](../../../pluggable-components/)。