You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2021/10/26 06:19:45 UTC

[apisix-website] branch docs-202105 updated: docs: update blog on 2021.01 and 2021.05

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

juzhiyuan pushed a commit to branch docs-202105
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/docs-202105 by this push:
     new 4abd191  docs: update blog on 2021.01 and 2021.05
4abd191 is described below

commit 4abd191a66e58b0a409c68d3a0e94fafa36ac7c7
Author: juzhiyuan <ju...@apache.org>
AuthorDate: Tue Oct 26 14:19:33 2021 +0800

    docs: update blog on 2021.01 and 2021.05
---
 .../12/18/first-look-at-kubernetes-service-api.md  | 130 ++++++++++-----------
 1 file changed, 65 insertions(+), 65 deletions(-)

diff --git a/website/blog/2020/12/18/first-look-at-kubernetes-service-api.md b/website/blog/2020/12/18/first-look-at-kubernetes-service-api.md
index c5611af..a60c614 100644
--- a/website/blog/2020/12/18/first-look-at-kubernetes-service-api.md
+++ b/website/blog/2020/12/18/first-look-at-kubernetes-service-api.md
@@ -1,6 +1,6 @@
 ---
-title: "初探 Kubernetes Service APIs"
-author: "金卫"
+title: A First Look at Kubernetes Service APIs
+author: Wei Jin
 authorURL: "https://github.com/gxthrj"
 authorImageURL: "https://avatars2.githubusercontent.com/u/4413028?s=400&u=e140a6d2bf19c426da6498b8888edc96509be649&v=4"
 keywords:
@@ -8,38 +8,38 @@ keywords:
 - APISIX
 - Apache APISIX
 - Kubernetes Service APIs
-description: 本文通过提问的方式,对 Kubernetes Service APIs 做了一些基本介绍,从整体来看,Kubernetes Service APIs 提炼了很多 ingress 的最佳实践,比如表达能力的增强,其实就是扩展了 Route 的能力,再比如 BackendPolicy 对象,可以为 upstream 指定几乎所有的 Kubernetes 后端资源。
+description: This article provides a basic introduction to the Kubernetes Service APIs by asking questions. As a whole, the Kubernetes Service APIs refine many ingress best practices, such as the enhanced expressiveness, which actually extends the capabilities of Route, and the BackendPolicy objects, which can specify almost any Kubernetes backend resource for upstream.
 tags: [Technology]
 ---
 
-> 本文通过提问的方式,对 Kubernetes Service APIs 做了一些基本介绍,从整体来看,Kubernetes Service APIs 提炼了很多 ingress 的最佳实践,比如表达能力的增强,其实就是扩展了 Route 的能力,再比如 BackendPolicy 对象,可以为 upstream 指定几乎所有的 Kubernetes 后端资源。
+> This article provides a basic introduction to the Kubernetes Service APIs by asking questions. As a whole, the Kubernetes Service APIs refine many ingress best practices, such as expression enhancements that actually extend the capabilities of Route, and BackendPolicy objects that can specify almost any Kubernetes backend resource for upstream.
 
-<!--truncate-->
+<! --truncate -->
 
 > Source:
 >
 > - https://github.com/apache/apisix
 > - https://github.com/apache/apisix-ingress-controller
 
-## 前言
+## Preface
 
-笔者是 Apache APISIX PMC,也是 Apache APISIX Ingress Controller Founder,通过调研和社区交流,打算在 Apache APISIX Ingress Controller 的后期版本中逐步支持 Kubernetes Service APIs.
+The author is an Apache APISIX PMC and Apache APISIX Ingress Controller Founder. Through research and community communication, I plan to gradually support Kubernetes Service APIs in later versions of Apache APISIX Ingress Controller.
 
-我们知道 Kubernetes 为了将集群内部服务暴露出去,有多种方案实现,其中一个比较受大众推崇的就是 Ingress。Ingress 作为一种对外暴露服务的标准,有相当多的第三方实现,每种实现都有各自的技术栈 和 所依赖的网关的影子,相互之间并不兼容。
+As we know, Kubernetes has a variety of solutions for exposing services inside the cluster, one of which is Ingress, a standard for exposing services to the public, and there are many third-party implementations of Ingress, each with its own technology stack and dependency on gateways that are not compatible with each other.
 
-为了统一各种 Ingress 的实现,便于 Kubernetes 上统一管理,[SIG-NETWORK](https://github.com/kubernetes/community/tree/master/sig-network) 社区推出了[Kubernetes Service APIs](https://gateway-api.sigs.k8s.io/) 一套标准实现,称为第二代 Ingress 。
+To unify the various Ingress implementations and facilitate unified management on Kubernetes, the [SIG-NETWORK](https://github.com/kubernetes/community/tree/master/sig-network) community has launched the [Kubernetes Service APIs](https://gateway-api.sigs.k8s.io/), a set of standard implementations called second-generation Ingress.
 
-## 主题描述
+## Topic Description
 
-本文从几个问题入手,对 Kubernetes Service APIs 的基本概念进行介绍。
+This article provides an introduction to the basic concepts of Kubernetes Service APIs, starting with a few questions.
 
-## 介绍
+## Introduction
 
-### Kubernetes Service APIs 号称第二代 Ingress 技术,到底在哪些方面优于第一代
+### Kubernetes Service APIs is called the second generation of Ingress technology, in what ways is it better than the first generation
 
-Kubernetes Service APIs 设计之初,目标并没有局限在 Ingress, 而是为了增强 service networking,着重通过以下几点来增强:表达性、扩展性、RBAC。
+The Kubernetes Service APIs were designed not to be limited to Ingress, but to enhance service networking by focusing on the following points: expressiveness, scalability, and RBAC.
 
-1. 更强的表达能力,例如 可以根据 header 、weighting 来管理流量
+For example, traffic can be managed based on header, weighting
 
 ```text
 kind: HTTPRoute
@@ -53,107 +53,107 @@ matches:
         version: "2"
   - path:
       value: "/v2/foo"
-```
+```` 2.
 
-2. 增强了扩展能力,Service APIs 提出多层 API 的概念,各层独立暴露接口,方便其他自定义资源与 API 对接,做到更细粒度(API 粒度)的控制。
+The Service APIs propose the concept of multi-layer APIs, each layer exposes its interface independently to facilitate other custom resources to interface with the APIs and achieve finer granularity (API granularity) control.
 
-![api-model](https://gateway-api.sigs.k8s.io/images/api-model.png)
+! [api-model](https://gateway-api.sigs.k8s.io/images/api-model.png)
 
-3. 面向角色 RBAC:多层 API 的实现,其中一个思想就是从使用者的角度去设计资源对象。这些资源最终会与 Kubernetes 上运行应用程序的常见角色进行映射。
+3. Role-oriented RBAC: One of the ideas behind the multi-tier API implementation is to design resource objects from the user's perspective. These resources are ultimately mapped to common roles for running applications on Kubernetes.
 
-## Kubernetes Service APIs 抽象出了哪些资源对象
+## What resource objects are abstracted by the Kubernetes Service APIs
 
-Kubernetes Service APIs 基于使用者角色,将定义了以下几种资源:
+The Kubernetes Service APIs will define the following kinds of resources based on user roles.
 
 GatewayClass, Gateway, Route
 
-1. GatewayClass 定义了一组具有通用配置和行为的网关类型
+1. GatewayClass defines a set of gateway types with common configuration and behavior
 
-- 与 Gateway 的关系,类似 ingress 中的 ingress.class annotation;
+- relationship to the Gateway, similar to the ingress.class annotation in ingress.
 
-- GatewayClass 定义了一组共享相同配置和行为的网关。每个 GatewayClass 将由单个 controller 处理,controller 与 GatewayClass 是一对多的关系;
+- A GatewayClass defines a set of gateways that share the same configuration and behavior. Each GatewayClass will be handled by a single controller, and controllers have a one-to-many relationship with GatewayClass.
 
-- GatewayClass 是 cluster 资源。必须至少定义一个 GatewayClass 才能具有功能网关。
+- A GatewayClass is a cluster resource. At least one GatewayClass must be defined to have a functional gateway. 2.
 
-2. Gateway 请求一个可以将流量转换为群集内服务的点。
+Gateway requests a point at which traffic can be converted to services within the cluster.
 
-- 作用:把集群外的流量引入集群内部。这个才是真正的 ingress 实体;
+- Role: Bringing traffic from outside the cluster inside the cluster. This is the true ingress entity.
 
-- 它定义了对特定 LB 配置的请求,该配置也是 GatewayClass 的配置和行为的实现;
+- It defines a request for a specific LB configuration that is also the implementation of the GatewayClass configuration and behavior.
 
-- Gateway 资源可以由操作员直接创建,也可以由处理 GatewayClass 的 controller 创建;
+- Gateway resources can be created either directly by the operator or by the controller handling the GatewayClass.
 
-- Gateway 与 Route 是多对多的关系;
+- (b) Gateway and Route are in a many-to-many relationship.
 
-3. Route 描述了通过网关的流量如何映射到服务。
+3. the Route describes how traffic passing through the gateway is mapped to a service.
 
-![schema-uml](https://gateway-api.sigs.k8s.io/images/schema-uml.svg)
+! [schema-uml](https://gateway-api.sigs.k8s.io/images/schema-uml.svg)
 
-另外,Kubernetes Service APIs 为了能够灵活的配置后端服务,特地定义了一个 BackendPolicy 资源对象。
+In addition, the Kubernetes Service APIs define a BackendPolicy resource object in order to enable flexible configuration of backend services.
 
-通过 BackendPolicy 对象,可以配置 TLS、健康检查 以及指定后端服务类型,比如 service 还是 pod。
+The BackendPolicy object allows you to configure TLS, health checks, and specify the type of backend service, such as service or pod.
 
-## Kubernetes Service APIs 的推行会带来哪些改变
+## What changes will come with the implementation of Kubernetes Service APIs
 
-Kubernetes Service APIs 作为一种实现标准,带来了以下改变:
+Kubernetes Service APIs, as an implementation standard, brings the following changes.
 
-1. 通用性: 可以有多种实现,就像 ingress 有多种实现一样,可以根据网关的特点去自定义 ingress controller,但是他们都有一致的配置结构。一种数据结构,可以配置多种 ingress controller。
+1. generality: there can be multiple implementations, just like there are multiple implementations of ingress. ingress controllers can be customized based on the characteristics of the gateway, but they all have a consistent configuration structure. A data structure, you can configure a variety of ingress controller. 2.
 
-2. Class 概念:GatewayClasses 可以配置不同负载均衡实现的类型。这些类 class 使用户可以轻松而明确地了解哪些功能可以用作资源模型本身。
+Class concept: GatewayClasses can be configured for different types of load balancing implementations. These class classes allow the user to easily and explicitly understand what functionality can be used as the resource model itself. 3.
 
-3. 共享网关:通过允许独立的路由资源 HTTPRoute 绑定到同一个 GatewayClass,它们可以共享负载平衡器和 VIP。按照使用者分层,这使得团队可以安全地共享基础结构,而无需关心下层 Gateway 的具体实现。
+By allowing independent routing resources HTTPRoute to be bound to the same GatewayClass, they can share load balancers and VIPs. layered by user, this allows teams to safely share infrastructure without having to care about the specific implementation of the lower level Gateway. 4.
 
-4. 带类型的后端引用: 使用带类型的后端引用,路由可以引用 Kubernetes Services,也可以引用任何类型的设计为网关后端的 Kubernetes 资源,比如 pod,又或者是 statefulset 比如 DB, 甚至是可访问的集群外部资源。
+4. backend references with types: With backend references with types, routes can reference Kubernetes Services, or any type of Kubernetes resource designed as a gateway backend, such as a pod, or a statefulset such as a DB, or even an accessible cluster external resource.
 
-5. 跨命名空间引用:跨不同命名空间的路由可以绑定到 Gateway。允许跨命名空间的互相访问。同时也可以限制某个 Gateway 下的 Route 可以访问的命名空间范围。
+Cross-namespace references: Routes across different namespaces can be bound to a Gateway, allowing access to each other across namespaces. It is also possible to restrict the range of namespaces that a Route under a Gateway can access.
 
-## 目前有哪些 ingress 实现了 Kubernetes Service APIs
+## What ingress implementations of Kubernetes Service APIs are currently available
 
-目前已知的从代码层面能看到对 Kubernetes Service APIs 资源对象支持的 Ingress 有 Contour, ingress-gce。
+The Ingress that are known to support Kubernetes Service APIs resource objects at the code level are Contour, ingress-gce.
 
-## Kubernetes Service APIs 如何管理资源读写权限
+## How Kubernetes Service APIs manage resource read and write permissions
 
-Kubernetes Service APIs 按照使用者的维度分为 3 个角色
+The Kubernetes Service APIs are divided into 3 roles based on the user dimension
 
-1. 基础设施提供方 GatewayClass
+1. infrastructure provider GatewayClass
 
-2. 集群操作人员 Gateway
+2. cluster operator Gateway
 
-3. 应用开发者 Route
+3. application developer Route
 
-RBAC(基于角色的访问控制)是用于 Kubernetes 授权的标准。允许用户配置谁可以对特定范围内的资源执行操作。 RBAC 可用于启用上面定义的每个角色。
+RBAC (Role Based Access Control) is the standard used for Kubernetes authorization. It allows users to configure who can perform operations on a specific range of resources. RBAC can be used to enable each of the roles defined above.
 
-在大多数情况下,希望所有角色都可以读取所有资源
+In most cases, all roles are expected to be able to read all resources
 
-三层模型的写权限如下。
+The three-tier model has the following write permissions.
 
-|                         | GatewayClass | Gateway | Route |
+| | GatewayClass | Gateway | Route |
 | ----------------------- | ------------ | ------- | ----- |
-| Infrastructure Provider | Yes          | Yes     | Yes   |
-| Cluster Operators       | No           | Yes     | Yes   |
-| Application Developers  | No           | No      | Yes   |
+| Infrastructure Provider | Yes | Yes | Yes |
+| Cluster Operators | No | Yes | Yes | Yes | Application Developers | No | No | No
+| The Kubernetes Service Provider is a service provider that provides a variety of services to the Kubernetes community.
 
-## Kubernetes Service APIs 有哪些扩展点
+## What are the extension points for Kubernetes Service APIs
 
-网关的需求非常丰富,同一个场景实现的方式多种多样,各有利弊。Kubernetes Service APIs 提炼出 多层 资源对象,同时也预留了一些扩展点。
+The Kubernetes Service APIs refine the multi-tier resource object, but also leave some extension points open.
 
-目前 Kubernetes Service APIs 的扩展点基本集中在 Route 上:
+Currently, the Kubernetes Service APIs are focused on Route.
 
-- RouteMatch 可以扩展 Route 匹配规则。
+- RouteMatch extends Route matching rules.
 
-- specify Backend 可以扩展特定类型的 后端服务, 除了上面提到的 Kubernetes 资源外,还可以扩展比如 文件系统,函数表达式等。
+- Specify Backend extends specific types of backend services, such as file systems, function expressions, etc., in addition to the Kubernetes resources mentioned above.
 
-- Route filter 可以在 Route 的生命周期中增加扩展点,处理 request/response 。
+- Route filter adds extensions to the Route lifecycle to handle requests/response.
 
-- Custom Route 以上扩展点都不能满足时,可以完全自定义一个 Route。
+- Custom Route can be fully customized if none of the above extensions are met.
 
-## 总结
+## Summary
 
-本文通过提问的方式,对 Kubernetes Service APIs 做了一些基本介绍,从整体来看,Kubernetes Service APIs 提炼了很多 ingress 的最佳实践,比如表达能力的增强,其实就是扩展了 Route 的能力,再比如 BackendPolicy 对象,可以为 upstream 指定几乎所有的 Kubernetes 后端资源。当然,项目初期也有不足的地方,目前 Kubernetes Service APIs 虽然已经从大的层面上规定了资源对象,但资源对象内部还有不少细节需要讨论之后再确定,以防止可能出现的冲突场景,结构上存在一定变数。
+This article provides a basic introduction to the Kubernetes Service APIs by asking questions. As a whole, the Kubernetes Service APIs refine a lot of ingress best practices, such as the enhancement of expression capabilities, which actually extends the capabilities of the Route, and the BackendPolicy object The Kubernetes Service APIs as a whole refine a lot of ingress best practices, such as the enhanced expressiveness, which actually extends the capabilities of Route, and the BackendP [...]
 
 ---
 
-参考:
+Reference:
 
 - https://gateway-api.sigs.k8s.io/
 - https://www.apiseven.com/zh/blog/a-first-look-at-kubernetes-service-api