You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2023/02/10 03:09:45 UTC

[shenyu-website] branch main updated: [doc: k8s deploy] update the doc of the k8s deploy (#862)

This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shenyu-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 5ad19514571 [doc: k8s deploy] update the doc of the k8s deploy (#862)
5ad19514571 is described below

commit 5ad19514571e876e1610af159629ddc2f8761e93
Author: lahmxu <la...@gmail.com>
AuthorDate: Fri Feb 10 11:09:39 2023 +0800

    [doc: k8s deploy] update the doc of the k8s deploy (#862)
---
 docs/deployment/deployment-k8s.md                  | 46 +++-------------------
 .../current/deployment/deployment-k8s.md           | 46 +++-------------------
 .../version-2.5.1/deployment/deployment-k8s.md     | 46 +++-------------------
 .../version-2.5.1/deployment/deployment-k8s.md     | 46 +++-------------------
 4 files changed, 24 insertions(+), 160 deletions(-)

diff --git a/docs/deployment/deployment-k8s.md b/docs/deployment/deployment-k8s.md
index 791325af8b2..c8e0733a073 100644
--- a/docs/deployment/deployment-k8s.md
+++ b/docs/deployment/deployment-k8s.md
@@ -22,14 +22,13 @@ This article introduces the use of `K8s` to deploy the `Apache ShenYu` gateway.
 > Similar to the h2 process, there are two points to note
 >
 > 1. you need to load [mysql-connector.jar](https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.18/mysql-connector-java-8.0.18.jar), the download command is executed when the container is started
-> 2. you need to specify an external MySQL database configuration to proxy the external MySQL database via Endpoints
+> 2. you need to specify an external MySQL database configuration
 >
 > The process is as follows.
 >
 > 1. create Namespace and ConfigMap
-> 2. create Endpoints to proxy external MySQL
-> 3. deploy shenyu-admin
-> 4. deploy shenyu-bootstrap
+> 2. deploy shenyu-admin
+> 3. deploy shenyu-bootstrap
 
 
 ## Example 1: Using h2 as a database
@@ -532,7 +531,7 @@ data:
         init_enable: true
     spring:
       datasource:
-        url: jdbc:mysql://mysql.shenyu.svc.cluster.local:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false
+        url: jdbc:mysql://{your_mysql_ip}:{your_mysql_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false
         username: {your_mysql_user}
         password: {your_mysql_password}
         driver-class-name: com.mysql.jdbc.Driver
@@ -686,40 +685,7 @@ data:
 
 - execute `kubectl apply -f shenyu-ns.yaml`
 
-### 2. Create Endpoints to represent MySQL
-
-- Init database [Deployment Prerequisites document](./deployment-before.md).
-
-- create shenyu-ep.yaml
-
-```yaml
-kind: Service
-apiVersion: v1
-metadata:
-  name: mysql
-  namespace: shenyu
-spec:
-  ports:
-  - port: 3306
-    name: mysql
-    targetPort: {your_mysql_port}
----
-kind: Endpoints
-apiVersion: v1
-metadata:
-  name: mysql
-  namespace: shenyu
-subsets:
-- addresses:
-  - ip: {your_mysql_ip}
-  ports:
-  - port: {your_mysql_port}
-    name: mysql
-```
-
-- execute `kubectl apply -f shenyu-ep.yaml`
-
-### 3. Create shenyu-admin
+### 2. Create shenyu-admin
 
 - create shenyu-admin.yaml
 
@@ -810,7 +776,7 @@ spec:
 
 - execute`kubectl apply -f shenyu-admin.yaml`
 
-### 4. Create shenyu-bootstrap
+### 3. Create shenyu-bootstrap
 
 - create shenyu-bootstrap.yaml
 
diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/deployment/deployment-k8s.md b/i18n/zh/docusaurus-plugin-content-docs/current/deployment/deployment-k8s.md
index 5d035da88ab..fc8ea349302 100644
--- a/i18n/zh/docusaurus-plugin-content-docs/current/deployment/deployment-k8s.md
+++ b/i18n/zh/docusaurus-plugin-content-docs/current/deployment/deployment-k8s.md
@@ -20,14 +20,13 @@ description: K8s部署
 > 和 h2 过程类似,需要额外注意的两个地方:
 >
 > 	1. 需要下载 mysql-connector.jar,容器启动时会执行下载命令
-> 	2. 需要指定外部 MySQL 数据库配置,通过 Endpoints 来代理外部 MySQL 数据库
+> 	2. 需要指定外部 MySQL 数据库配置
 >
 > 具体流程如下:
 >
 > 	1. 创建 Namespace和 ConfigMap
-> 	2. 创建 Endpoints 代理外部 MySQL
-> 	3. 部署 shenyu-admin
-> 	4. 部署 shenyu-bootstrap
+> 	2. 部署 shenyu-admin
+> 	3. 部署 shenyu-bootstrap
 
 ## 示例一:使用 h2 作为数据库
 
@@ -534,7 +533,7 @@ data:
         init_enable: true
     spring:
       datasource:
-        url: jdbc:mysql://mysql.shenyu.svc.cluster.local:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false
+        url: jdbc:mysql://{your_mysql_ip}:{your_mysql_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false
         username: {your_mysql_user}
         password: {your_mysql_password}
         driver-class-name: com.mysql.jdbc.Driver
@@ -688,40 +687,7 @@ data:
 
 - 执行 `kubectl apply -f shenyu-ns.yaml`
 
-### 2. 创建 Endpoints 代理外部 MySQL
-
-- 初始化数据库[部署先决条件](./deployment-before.md)
-
-- 创建文件 shenyu-ep.yaml
-
-```yaml
-kind: Service
-apiVersion: v1
-metadata:
-  name: mysql
-  namespace: shenyu
-spec:
-  ports:
-  - port: 3306
-    name: mysql
-    targetPort: {your_mysql_port}
----
-kind: Endpoints
-apiVersion: v1
-metadata:
-  name: mysql
-  namespace: shenyu
-subsets:
-- addresses:
-  - ip: {your_mysql_ip}
-  ports:
-  - port: {your_mysql_port}
-    name: mysql
-```
-
-- 执行 `kubectl apply -f shenyu-ep.yaml`
-
-### 3. 部署 shenyu-admin
+### 2. 部署 shenyu-admin
 
 - 创建文件 shenyu-admin.yaml
 
@@ -812,7 +778,7 @@ spec:
 
 - 执行`kubectl apply -f shenyu-admin.yaml`
 
-### 4. 部署 shenyu-bootstrap
+### 3. 部署 shenyu-bootstrap
 
 - 创建文件 shenyu-bootstrap.yaml
 
diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-2.5.1/deployment/deployment-k8s.md b/i18n/zh/docusaurus-plugin-content-docs/version-2.5.1/deployment/deployment-k8s.md
index 5d035da88ab..fc8ea349302 100644
--- a/i18n/zh/docusaurus-plugin-content-docs/version-2.5.1/deployment/deployment-k8s.md
+++ b/i18n/zh/docusaurus-plugin-content-docs/version-2.5.1/deployment/deployment-k8s.md
@@ -20,14 +20,13 @@ description: K8s部署
 > 和 h2 过程类似,需要额外注意的两个地方:
 >
 > 	1. 需要下载 mysql-connector.jar,容器启动时会执行下载命令
-> 	2. 需要指定外部 MySQL 数据库配置,通过 Endpoints 来代理外部 MySQL 数据库
+> 	2. 需要指定外部 MySQL 数据库配置
 >
 > 具体流程如下:
 >
 > 	1. 创建 Namespace和 ConfigMap
-> 	2. 创建 Endpoints 代理外部 MySQL
-> 	3. 部署 shenyu-admin
-> 	4. 部署 shenyu-bootstrap
+> 	2. 部署 shenyu-admin
+> 	3. 部署 shenyu-bootstrap
 
 ## 示例一:使用 h2 作为数据库
 
@@ -534,7 +533,7 @@ data:
         init_enable: true
     spring:
       datasource:
-        url: jdbc:mysql://mysql.shenyu.svc.cluster.local:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false
+        url: jdbc:mysql://{your_mysql_ip}:{your_mysql_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false
         username: {your_mysql_user}
         password: {your_mysql_password}
         driver-class-name: com.mysql.jdbc.Driver
@@ -688,40 +687,7 @@ data:
 
 - 执行 `kubectl apply -f shenyu-ns.yaml`
 
-### 2. 创建 Endpoints 代理外部 MySQL
-
-- 初始化数据库[部署先决条件](./deployment-before.md)
-
-- 创建文件 shenyu-ep.yaml
-
-```yaml
-kind: Service
-apiVersion: v1
-metadata:
-  name: mysql
-  namespace: shenyu
-spec:
-  ports:
-  - port: 3306
-    name: mysql
-    targetPort: {your_mysql_port}
----
-kind: Endpoints
-apiVersion: v1
-metadata:
-  name: mysql
-  namespace: shenyu
-subsets:
-- addresses:
-  - ip: {your_mysql_ip}
-  ports:
-  - port: {your_mysql_port}
-    name: mysql
-```
-
-- 执行 `kubectl apply -f shenyu-ep.yaml`
-
-### 3. 部署 shenyu-admin
+### 2. 部署 shenyu-admin
 
 - 创建文件 shenyu-admin.yaml
 
@@ -812,7 +778,7 @@ spec:
 
 - 执行`kubectl apply -f shenyu-admin.yaml`
 
-### 4. 部署 shenyu-bootstrap
+### 3. 部署 shenyu-bootstrap
 
 - 创建文件 shenyu-bootstrap.yaml
 
diff --git a/versioned_docs/version-2.5.1/deployment/deployment-k8s.md b/versioned_docs/version-2.5.1/deployment/deployment-k8s.md
index 791325af8b2..c8e0733a073 100644
--- a/versioned_docs/version-2.5.1/deployment/deployment-k8s.md
+++ b/versioned_docs/version-2.5.1/deployment/deployment-k8s.md
@@ -22,14 +22,13 @@ This article introduces the use of `K8s` to deploy the `Apache ShenYu` gateway.
 > Similar to the h2 process, there are two points to note
 >
 > 1. you need to load [mysql-connector.jar](https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.18/mysql-connector-java-8.0.18.jar), the download command is executed when the container is started
-> 2. you need to specify an external MySQL database configuration to proxy the external MySQL database via Endpoints
+> 2. you need to specify an external MySQL database configuration
 >
 > The process is as follows.
 >
 > 1. create Namespace and ConfigMap
-> 2. create Endpoints to proxy external MySQL
-> 3. deploy shenyu-admin
-> 4. deploy shenyu-bootstrap
+> 2. deploy shenyu-admin
+> 3. deploy shenyu-bootstrap
 
 
 ## Example 1: Using h2 as a database
@@ -532,7 +531,7 @@ data:
         init_enable: true
     spring:
       datasource:
-        url: jdbc:mysql://mysql.shenyu.svc.cluster.local:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false
+        url: jdbc:mysql://{your_mysql_ip}:{your_mysql_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false
         username: {your_mysql_user}
         password: {your_mysql_password}
         driver-class-name: com.mysql.jdbc.Driver
@@ -686,40 +685,7 @@ data:
 
 - execute `kubectl apply -f shenyu-ns.yaml`
 
-### 2. Create Endpoints to represent MySQL
-
-- Init database [Deployment Prerequisites document](./deployment-before.md).
-
-- create shenyu-ep.yaml
-
-```yaml
-kind: Service
-apiVersion: v1
-metadata:
-  name: mysql
-  namespace: shenyu
-spec:
-  ports:
-  - port: 3306
-    name: mysql
-    targetPort: {your_mysql_port}
----
-kind: Endpoints
-apiVersion: v1
-metadata:
-  name: mysql
-  namespace: shenyu
-subsets:
-- addresses:
-  - ip: {your_mysql_ip}
-  ports:
-  - port: {your_mysql_port}
-    name: mysql
-```
-
-- execute `kubectl apply -f shenyu-ep.yaml`
-
-### 3. Create shenyu-admin
+### 2. Create shenyu-admin
 
 - create shenyu-admin.yaml
 
@@ -810,7 +776,7 @@ spec:
 
 - execute`kubectl apply -f shenyu-admin.yaml`
 
-### 4. Create shenyu-bootstrap
+### 3. Create shenyu-bootstrap
 
 - create shenyu-bootstrap.yaml