abcee2dccd
* Update localization guidelines for language labels
Continuing work
Continuing work
Continuing work
More work in progress
Add local OWNERS folders
Add an OWNERS file to Chinese
Remove shortcode for repos
Add Japanese
Alphabetize languages, change weights accordingly
More updates
Add Korean in Korean
Add English to languageName
Feedback from gochist
Move Chinese content from cn/ to zh/
Move OWNERS from cn/ to zh/
Resolve merge conflicts by updating from master
Add files back in to prep for resolution
After rebase on upstream/master, remove files
Review and update localization guidelines
Feedback from gochist, tnir, cstoku
Add a trailing newline to content/ja/OWNERS
Add a trailing newline to content/zh/OWNERS
Drop requirement for GH repo project
Clarify language about forks/branches
Edits and typos
Remove a shortcode specific to a multi-repo language setup
Update aliases and owners
Add explicit OWNERS for content/en
Migrate content from Chinese repo, update regex in config.toml
Remove untranslated strings
Add trailing newline to content/en/OWNERS
Add trailing newlines to OWNERS files
add Jaguar project description (#10433)
* add Jaguar project description
[Jaguar](https://gitlab.com/sdnlab/jaguar) is an open source solution for Kubernetes's network based on OpenDaylight.
Jaguar provides overlay network using vxlan and Jaguar CNIPlugin provides one IP address per pod.
* Minor newline tweak
blog post for azure vmss (#10538)
Add microk8s to pick-right-solution.md (#10542)
* Add microk8s to pick-right-solution.md
Microk8s is a single-command installation of upstream Kubernetes on any Linux and should be included in the list of local-machine solutions.
* capitalized Istio
Add microk8s to foundational.md (#10543)
* Add microk8s to foundational.md
Adding microk8s as credible and stable alternative to get started with Kubernetes on a local machine. This is especially attractive for those not wanting to incur the overhead of running a VM for a local cluster.
* Update foundational.md
Thank you for your suggestions! LMK if this works now?
* Rewrote first paragraph
And included a bullet list of features of microk8s
* Copyedit
fix typo (#10545)
Fix the kubectl subcommands links. (#10550)
Signed-off-by: William Zhang <warmchang@outlook.com>
Fix command issue (#10515)
Signed-off-by: mooncake <xcoder@tenxcloud.com>
remove imported community files per issue 10184 (#10501)
networking.md: Markdown fix (#10498)
Fix front matter, federation command-line tools (#10500)
Clean up glossary entry (#10399)
update slack link (#10536)
typo in StatefulSet docs (#10558)
fix discription about horizontal pod autoscale (#10557)
Remove redundant symbols (#10556)
Fix issue #10520 (#10554)
Signed-off-by: William Zhang <warmchang@outlook.com>
Update api-concepts.md (#10534)
Revert "Fix command issue (#10515)"
This reverts commit c02a7fb9f9.
Update memory-constraint-namespace.md (#10530)
update memory request to 100MiB corresponding the yaml content
Blog: Introducing Volume Snapshot Alpha for Kubernetes (#10562)
* blog post for azure vmss
* snapshot blog post
Resolve merge conflicts in OWNERS*
Minor typo fix (#10567)
Not sure what's supposed to be here, proposing removing it.
* Feedback from gochist
Tweaks to feedback
* Feedback from ClaudiaJKang
8.5 KiB
8.5 KiB
title: 设置一个扩展的 API server reviewers:
- lavalamp
- cheftako
- chenopis content_template: templates/task weight: 15
{{% capture overview %}}
设置一个扩展的 API server 来使用聚合层以让 Kubernetes apiserver 使用其它 API 进行扩展,这些 API 不是核心 Kubernetes API 的一部分。
{{% /capture %}}
{{% capture prerequisites %}}
- 您需要拥有一个运行的 Kubernetes 集群。
- 您必须 配置聚合层 并且启用 apiserver 的相关参数。
{{% /capture %}}
{{% capture prerequisites %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture steps %}}
设置一个扩展的 api-server 来使用聚合层
以下步骤描述如何 在一个高层次 设置一个扩展的 apiserver。无论您使用的是 YAML 配置还是使用 API,这些步骤都适用。目前我们正在尝试区分出两者的区别。有关使用 YAML 配置的具体示例,您可以在 Kubernetes 库中查看 sample-apiserver。
或者,您可以使用现有的第三方解决方案,例如 apiserver-builder,它将生成框架并自动执行以下所有步骤。
- 确保启用了 APIService API(检查
--runtime-config)。默认应该是启用的,除非被特意关闭了。 - 您可能需要制定一个 RBAC 规则,以允许您添加 APIService 对象,或让您的集群管理员创建一个。(由于 API 扩展会影响整个集群,因此不建议在实时集群中对 API 扩展进行测试/开发/调试)
- 创建 Kubernetes 命名空间,扩展的 api-service 将运行在该命名空间中。
- 创建(或获取)用来签署服务器证书的 CA 证书,扩展 api-server 中将使用该证书做 HTTPS 连接。
- 为 api-server 创建一个服务端的证书(或秘钥)以使用 HTTPS。这个证书应该由上述的 CA 签署。同时应该还要有一个 Kube DNS 名称的 CN,这是从 Kubernetes 服务派生而来的,格式为
<service name>.<service name namespace>.svc。 - 使用命名空间中的证书(或秘钥)创建一个 Kubernetes secret。
- 为扩展 api-server 创建一个 Kubernetes deployment,并确保以卷的方式挂载了 secret。它应该包含对扩展 api-server 镜像的引用。Deployment 也应该在同一个命名空间中。
- 确保您的扩展 apiserver 从该卷中加载了那些证书,并在 HTTPS 握手过程中使用它们。
- 在您的命令空间中创建一个 Kubernetes service account。
- 为资源允许的操作创建 Kubernetes 集群角色。
- 以您命令空间中的 service account 创建一个 Kubernetes 集群角色绑定,绑定到您刚创建的角色上。
- 以您命令空间中的 service account 创建一个 Kubernetes 集群角色绑定,绑定到
system:auth-delegator集群角色,以将 auth 决策委派给 Kubernetes 核心 API 服务器。 - 以您命令空间中的 service account 创建一个 Kubernetes 集群角色绑定,绑定到
extension-apiserver-authentication-reader角色。这将让您的扩展 api-server 能够访问extension-apiserver-authenticationconfigmap。 - 创建一个 Kubernetes apiservice。上述的 CA 证书应该使用 base64 编码,剥离新行并用作 apiservice 中的 spec.caBundle。这不应该是命名空间化的。如果使用了 kube-aggregator API,那么只需要传入 PEM 编码的 CA 绑定,因为 base 64 编码已经完成了。
- 使用 kubectl 来获得您的资源。它应该返回 "找不到资源"。这意味着一切正常,但您目前还没有创建该资源类型的对象。
{{% /capture %}}
{{% capture whatsnext %}}
- 如果你还未配置,请 配置聚合层 并启用 apiserver 的相关参数。
- 高级概述,请参阅 使用聚合层扩展 Kubernetes API。
- 了解如何 使用 Custom Resource Definition 扩展 Kubernetes API。
{{% /capture %}}