@@ -27,12 +27,13 @@ tags:
2727
2828<!--
2929Finalizers are namespaced keys that tell Kubernetes to wait until specific
30- conditions are met before it fully deletes resources marked for deletion.
30+ conditions are met before it fully deletes {{< glossary_tooltip text="resources" term_id="api-resource" >}}
31+ that are marked for deletion.
3132Finalizers alert {{<glossary_tooltip text="controllers" term_id="controller">}}
3233to clean up resources the deleted object owned.
3334-->
3435Finalizer 是带有命名空间的键,告诉 Kubernetes 等到特定的条件被满足后,
35- 再完全删除被标记为删除的资源 。
36+ 再完全删除被标记为删除的{{< glossary_tooltip text="资源" term_id="api-resource" >}} 。
3637Finalizer 提醒{{<glossary_tooltip text="控制器" term_id="controller">}}清理被删除的对象拥有的资源。
3738
3839<!-- more-->
@@ -48,16 +49,18 @@ Kubernetes considers the deletion complete and deletes the object.
4849-->
4950当你告诉 Kubernetes 删除一个指定了 Finalizer 的对象时,
5051Kubernetes API 通过填充 ` .metadata.deletionTimestamp ` 来标记要删除的对象,
51- 并返回 ` 202 ` 状态码( HTTP "已接受") 使其进入只读状态。
52+ 并返回 ` 202 ` 状态码( HTTP "已接受") 使其进入只读状态。
5253此时控制平面或其他组件会采取 Finalizer 所定义的行动,
5354而目标对象仍然处于终止中(Terminating)的状态。
5455这些行动完成后,控制器会删除目标对象相关的 Finalizer。
5556当 ` metadata.finalizers ` 字段为空时,Kubernetes 认为删除已完成并删除对象。
5657
5758<!--
5859You can use finalizers to control {{<glossary_tooltip text="garbage collection" term_id="garbage-collection">}}
59- of resources. For example, you can define a finalizer to clean up related resources or
60- infrastructure before the controller deletes the target resource.
60+ of resources. For example, you can define a finalizer to clean up related
61+ {{< glossary_tooltip text="API resources" term_id="api-resource" >}} or infrastructure before the controller
62+ deletes the target resource.
6163-->
6264你可以使用 Finalizer 控制资源的{{<glossary_tooltip text="垃圾收集" term_id="garbage-collection">}}。
63- 例如,你可以定义一个 Finalizer,在删除目标资源前清理相关资源或基础设施。
65+ 例如,你可以定义一个 Finalizer,在删除目标资源前清理相关
66+ {{< glossary_tooltip text="API 资源" term_id="api-resource" >}}或基础设施。
0 commit comments