Skip to content

Commit 786b221

Browse files
authored
Merge pull request honojs#488 from XiShanYongYe-Chang/add-cluster-resource-faq
Add cluster API resource faq
2 parents 620ac80 + a852c5a commit 786b221

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

  • docs/faq
  • i18n/zh/docusaurus-plugin-content-docs/current/faq

docs/faq/faq.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,15 @@ There are some things you should consider before doing so:
4040
conflicts.
4141

4242
TODO: Link to adoption use case once it gets on board.
43+
44+
## Why Cluster API doesn't have the CRD YAML file?
45+
46+
Kubernetes provides two methods to extend APIs: Custom Resource and Kubernetes API Aggregation Layer. For more detail, you can refer to [Extending the Kubernetes API](https://kubernetes.io/docs/concepts/extend-kubernetes/).
47+
48+
Karmada uses the both extension methods. For example, `PropagationPolicy` and `ResourceBinding` use Custom Resource, and `Cluster` resource uses Kubernetes API Aggregation Layer.
49+
50+
Therefore, `Cluster` resources do not have a CRD YAML file, and they are not visible when you execute the `kubectl get crd` command.
51+
52+
So, why would we choose to use the Kubernetes API Aggregation Layer to extend `Cluster` resources instead of using Custom Resource?
53+
54+
This is because the `Cluster` resource requires the setup of the `proxy` sub-resource. By using `proxy`, you can access resources in member clusters. For details, please refer to [Aggregation Layer APIServer](https://karmada.io/docs/next/userguide/globalview/aggregated-api-endpoint/). At present, Custom Resource do not support configuring `proxy` sub-resources, which is why it was not chosen for this purpose.

i18n/zh/docusaurus-plugin-content-docs/current/faq/faq.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,15 @@ title: 常见问题
3737
`Deployment` 为例采用 `resource template` 后,`kube-controller` 会为 Deployment 创建 `Pods` 并持续更新状态,Karmada 系统也会协调这些变化,所以可能会发生冲突。
3838

3939
待办事项:一旦有相关使用案例,我们将添加相应链接。
40+
41+
## 为什么 Cluster API 没有 CRD YAML 文件?
42+
43+
Kubernetes 提供了两种方式来扩展 API:**定制资源****Kubernetes API 聚合层**。更多详细信息,您可以参考[扩展 Kubernetes API](https://kubernetes.io/docs/concepts/extend-kubernetes/)
44+
45+
Karmada 使用了这两种扩展方式,例如,`PropagationPolicy``ResourceBinding` 使用**定制资源**`Cluster`资源使用**Kubernetes API 聚合层**
46+
47+
因此,`Cluster`资源没有 CRD YAML 文件,当执行`kubectl get crd`命令时也无法获取`Cluster`资源。
48+
49+
那么,为什么我们要使用**Kubernetes API 聚合层**来扩展`Cluster`资源,而不是使用**定制资源**呢?
50+
51+
这是因为我们需要为`Cluster`资源设置`proxy`子资源,通过使用`proxy`,您可以访问成员集群中的资源,具体内容可以参考[聚合层 APIServer](https://karmada.io/zh/docs/next/userguide/globalview/aggregated-api-endpoint)。目前,**定制资源**还不支持设置`proxy`子资源,这也是我们没有选择它的原因。

0 commit comments

Comments
 (0)