Question: <ins> --- title: "使用 MicroProfile、ConfigMaps、Secrets 实现外部化应用配置" content_type: tutorial weight: 10 --- <!-- --- title: "Externalizing config using MicroProfile, ConfigMaps and Secrets" content_type: tutorial weight: 10 --- --> <!-- overview --> <!-- In this tutorial you will learn how and why to externalize your microservice’s configuration.  Specifically, you will learn how to use Kubernetes ConfigMaps and Secrets to set environment variables and then consume them using MicroProfile Config. --> 在本教程中，你会学到如何以及为什么要实现外部化微服务应用配置。 具体来说，你将学习如何使用 Kubernetes ConfigMaps 和 Secrets 设置环境变量， 然后在 MicroProfile config 中使用它们。 ## {{% heading "prerequisites" %}} <!-- ### Creating Kubernetes ConfigMaps & Secrets There are several ways to set environment variables for a Docker container in Kubernetes, including: Dockerfile, kubernetes.yml, Kubernetes ConfigMaps, and Kubernetes Secrets.  In the tutorial, you will learn how to use the latter two for setting your environment variables whose values will be injected into your microservices.  One of the benefits for using ConfigMaps and Secrets is that they can be re-used across multiple containers, including being assigned to different environment variables for the different containers. --> ### 创建 Kubernetes ConfigMaps 和 Secrets  {#creating-kubernetes-configmaps-secrets} 在 Kubernetes 中，为 docker 容器设置环境变量有几种不同的方式，比如： Dockerfile、kubernetes.yml、Kubernetes ConfigMaps、和 Kubernetes Secrets。 在本教程中，你将学到怎么用后两个方式去设置你的环境变量，而环境变量的值将注入到你的微服务里。 使用 ConfigMaps 和 Secrets 的一个好处是他们能在多个容器间复用， 比如赋值给不同的容器中的不同环境变量。 <!-- ConfigMaps are API Objects that store non-confidential key-value pairs.  In the Interactive Tutorial you will learn how to use a ConfigMap to store the application's name.  For more information regarding ConfigMaps, you can find the documentation [here]. Although Secrets are also used to store key-value pairs, they differ from ConfigMaps in that they're intended for confidential/sensitive information and are stored using Base64 encoding.  This makes secrets the appropriate choice for storing such things as credentials, keys, and tokens, the former of which you'll do in the Interactive Tutorial.  For more information on Secrets, you can find the documentation [here](/docs/concepts/configuration/secret/). --> ConfigMaps 是存储非机密键值对的 API 对象。 在互动教程中，你会学到如何用 ConfigMap 来保存应用名字。 ConfigMap 的更多信息，你可以在[这里](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/)找到文档。 Secrets 尽管也用来存储键值对，但区别于 ConfigMaps 的是：它针对机密/敏感数据，且存储格式为 Base64 编码。 secrets 的这种特性使得它适合于存储证书、密钥、令牌，上述内容你将在交互教程中实现。 Secrets 的更多信息，你可以在[这里](/zh/docs/concepts/configuration/secret/)找到文档。 <!-- ### Externalizing Config from Code Externalized application configuration is useful because configuration usually changes depending on your environment.  In order to accomplish this, we'll use Java's Contexts and Dependency Injection (CDI) and MicroProfile Config. MicroProfile Config is a feature of MicroProfile, a set of open Java technologies for developing and deploying cloud-native microservices. --> ### 从代码外部化配置 外部化应用配置之所以有用处，是因为配置常常根据环境的不同而变化。 为了实现此功能，我们用到了 Java 上下文和依赖注入（Contexts and Dependency Injection, CDI）、MicroProfile 配置。 MicroProfile config 是 MicroProfile 的功能特性， 是一组开放 Java 技术，用于开发、部署云原生微服务。 <!-- CDI provides a standard dependency injection capability enabling an application to be assembled from collaborating, loosely-coupled beans.  MicroProfile Config provides apps and microservices a standard way to obtain config properties from various sources, including the application, runtime, and environment.  Based on the source's defined priority, the properties are automatically combined into a single set of properties that the application can access via an API.  Together, CDI & MicroProfile will be used in the Interactive Tutorial to retrieve the externally provided properties from the Kubernetes ConfigMaps and Secrets and get injected into your application code. Many open source frameworks and runtimes implement and support MicroProfile Config.  Throughout the interactive tutorial, you'll be using Open Liberty, a flexible open-source Java runtime for building and running cloud-native apps and microservices.  However, any MicroProfile compatible runtime could be used instead. --> CDI 提供一套标准的依赖注入能力，使得应用程序可以由相互协作的、松耦合的 beans 组装而成。 MicroProfile Config 为 app 和微服务提供从各种来源，比如应用、运行时、环境，获取配置参数的标准方法。 基于来源定义的优先级，属性可以自动的合并到单独一组应用可以通过 API 访问到的属性。 CDI & MicroProfile 都会被用在互动教程中， 用来从 Kubernetes ConfigMaps 和 Secrets 获得外部提供的属性，并注入应用程序代码中。 很多开源框架、运行时支持 MicroProfile Config。 对于整个互动教程，你都可以使用开放的库、灵活的开源 Java 运行时，去构建并运行云原生的 apps 和微服务。 然而，任何 MicroProfile 兼容的运行时都可以用来做替代品。 ## {{% heading "objectives" %}} <!-- * Create a Kubernetes ConfigMap and Secret * Inject microservice configuration using MicroProfile Config --> * 创建 Kubernetes ConfigMap 和 Secret * 使用 MicroProfile Config 注入微服务配置 <!-- lessoncontent --> <!-- ## Example: Externalizing config using MicroProfile, ConfigMaps and Secrets ### [Start Interactive Tutorial](/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive/) --> ## 示例：使用 MicroProfile、ConfigMaps、Secrets 实现外部化应用配置 ### [启动互动教程](/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive/) </ins>

Translate tutorials/configuration/configure-java-microservice/ into Chinese /language zh /assign
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details


Question: ### Allow Volume Expansion <del> {{< feature-state for_k8s_version="v1.11" state="beta" >}} </del> PersistentVolumes can be configured to be expandable. This feature when set to `true`, allows the users to resize the volume by editing the corresponding PVC object.

There's a section for ReclaimPolicy, which states that this can be or . It is not clear as to what those states mean, there's NO explanation. I was researching how to expand disk, and one guide says that the must be , but I cannot find reference as to what this means. My expectation was that these would be explained what they mean, rather than this is the only do option.
Page related to issue: /retitle Lack of explanation for options - Retain and Delete /language en
These concepts are well explained in 'concepts/storage/persistent-'. Maybe a pointer or two suffices?
Please refer link here you will find the brief introduction about the retain or delete. I think this link will be helpful to understand.
/assign
/triage accepted


Question: `--large-cluster-size-threshold` nodes - default 50), then evictions are stopped. - Otherwise, the eviction rate is reduced to `--secondary-node-eviction-rate` (default 0.01) per second. The reason these policies are implemented per availability zone is because one availability zone might become partitioned from the master while the others remain connected. If your cluster does not span multiple cloud provider availability zones,

This is a Bug Report <!-- Thanks for filing an issue! Before submitting, please fill in the following information. --<!-- See for guidance on writing an actionable issue description. --<!--Required Information--Problem: As-is: is rendered like this: ! Proposed Solution: Add a separating blank line. To-be: Page to Update: /assign
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details


Question:
 # i18n strings for the Vietnamese (main) site.   # Chuỗi i18n cho trang chủ tiếng Việt. [auto_generated_edit_notice] other = "(trang tự động tạo)" [auto_generated_pageinfo] other = """
Trang này được tạo tự động.

Nếu bạn có ý định báo cáo một vấn đề với trang này, hãy đề cập rằng trang này được tạo tự động trong mô tả vấn đề của bạn. Sửa lỗi có thể cần phải xảy ra ở một nơi khác trong dự án Kubernetes.
"""  [caution] other = "Chú ý:" [cleanup_heading]  other = "Cleaning up"   other = "Dọn dẹp"  [community_events_calendar] other = "Lịch sự kiện"

Đề nghị thay thế "lạc thú" bằng "lỗi thời" !
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Please raise the issue in english putting the language code before the issue in [] example [vi] Issue title here It will be good practice to write the description and title of the issue in English only.
Thank you! BTW i'd commited about this change, waiting for review.
Fixed in


Question: title: "bash auto-completion on Linux" description: "Some optional configuration for bash auto-completion on Linux." headless: true <ins> _build: list: never render: never publishResources: false </ins> --- ### Introduction

This is a Bug Report <!-- Thanks for filing an issue! Before submitting, please fill in the following information. --<!-- See for guidance on writing an actionable issue description. --<!--Required Information--Problem: The source Markdown needs to exist for pages such as but we don't need to make those turn into actual web pages. Proposed Solution: Edit every file within : Page to Update: and its contents /area web-development /help /priority backlog /good-first-issue
This request has been marked as suitable for new contributors. Please ensure that the issue body includes answers to the following questions: Why are we solving this issue? To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points? Does this issue have zero to low barrier of entry? How can the assignee reach out to you for help? For more details on the requirements of such an issue, please see and ensure that they are met. If this request no longer meets these requirements, the label can be removed by commenting with the command. <detailsIn response to : This is a Bug Report <!-- See for guidance on writing an actionable issue description. --Problem: The source Markdown needs to exist for pages such as but we don't need to make those turn into actual web pages. Edit every file within : Page to Update: and its contents /help /priority backlog /good-first-issue </details
/retitle Include files for install are rendered and served /triage accepted
/assign
/unassign
Thanks !


Question: These controllers include: <del> * Node Controller * Responsible for noticing & responding when nodes go down. * Replication Controller * Responsible for maintaining the correct number of pods for every replication controller object in the system. * Endpoints Controller * Populates the Endpoints object (i.e., join Services & Pods). * Service Account & Token Controllers * Create default accounts and API access tokens for new namespaces. </del> <ins> * Node Controller: Responsible for noticing & responding when nodes go down. * Replication Controller: Responsible for maintaining the correct number of pods for every replication controller object in the system. * Endpoints Controller: Populates the Endpoints object (i.e., join Services & Pods). * Service Account & Token Controllers: Create default accounts and API access tokens for new namespaces. </ins> * ... and others. ### kube-scheduler

This is a Bug Report <!-- Thanks for filing an issue! Before submitting, please fill in the following information. --<!-- See for guidance on writing an actionable issue description. --<!--Required Information--Problem: There is an extra . ! Proposed Solution: remove and regenerate document. Page to Update: <!--Optional Information (remove the comment tags around information you would like to include)--<!--Kubernetes Version:--<!--Additional Information:--


Question: [options_heading] other = "Options" <ins> [outdated_blog__message] other = "The Kubernetes project considers this article to be outdated because it is more than one year old. Check that the information in the page has not become incorrect since its publication." [outdated_blog__title] other = "Outdated article" </ins> [post_create_issue] other = "Create an issue"

ref: , but this is also just a general feature! Blog posts by their nature go stale over time. This becomes particularly problematic when we decide to deprecate functionality in the project, as those blog posts are forever a part of the docs and forever searchable via Google. Update the blog post's templates (probably , but you may need to copy over from the Docsy theme) to include a warning for blog posts over 1 year old: Some notes: Use standard docsy warning block styles Make sure strings are in localization files so the localization teams know where to look /triage accepted /priority important-soon /area website
The label(s) cannot be applied, because the repository doesn't have them. <detailsIn response to : ref: , but this is also just a general feature! Some notes: Make sure strings are in localization files so the localization teams know where to look /triage accepted /priority important-soon /area website Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/assign
/area web-development
Sorry y'all, I hadn't seen this issue before I created . It turns out that there's a clean solution that doesn't involve changes to the blog template. Anyhow, this has been /cc
/close Thanks
Closing this issue. <detailsIn response to : /close Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details

From : The comment was made in the context of the Dockershim-removal effort. I'm opening this PR following discussions with The warning, which would appear only on posts that are = 1 year old, might read something like this: Comments are welcome. /cc
I'm glad to work on this, though it might not happen until January.
Good idea /area web-development I suggest borrowing the styling from .
/triage accepted
/assign I don't know if the command above will work. If it doesn't or can you assign this to me? I've started working on this now.
Thanks (and the looks to have worked )
/triage duplicate


Question: 指向该域名服务器，而不是 `/etc/resolv.conf`。 ``` <del> proxy .  172.16.0.1 </del> <ins> forward .  172.16.0.1 </ins> ``` <!--

Please replace the code from to please kindly check the mistake in below link
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/language zh
/good-first-issue
This request has been marked as suitable for new contributors. Please ensure the request meets the requirements listed . If this request no longer meets these requirements, the label can be removed by commenting with the command. <detailsIn response to : /good-first-issue Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details


Question: To mitigate the above situation, a  user can manually add the taint `node.kubernetes.io/out-of-service` with either `NoExecute` or `NoSchedule` effect to a Node marking it out-of-service. If the `NodeOutOfServiceVolumeDetach`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) <del> is enabled on `kube-controller-manager`, and a Node is marked out-of-service with this taint, the </del> <ins> is enabled on {{< glossary_tooltip text="kube-controller-manager" term_id="kube-controller-manager" >}}, and a Node is marked out-of-service with this taint, the </ins> pods on the node will be forcefully deleted if there are no matching tolerations on it and volume detach operations for the pods terminating on the node will happen immediately. This allows the Pods on the out-of-service node to recover quickly on a different node.

This is a Feature Request What would you like to be Below are terms that can use the addition of a glossary tooltip to show the meaning of the said term.Below points can be to section of Nodes page which will help users for quick follow-ups. Why is this needed These references can help user understanding the concept while staying on same page or finding more about the concept with right link. it will enhance user experience and bring more clarity and less confusion. Comments :
/sig docs / language en /assign
If triage is accepted, i would be happy to contribute on it. PTAL.
/language en Fixed here .
/triage accepted


Question: {{ $textArg := .Get "text" }} {{ $page := site.GetPage "page" (printf "%s/%s" $base $pageArg) }} {{ $metadata := $page.Params.api_metadata }}  {{if $textArg}}{{ $textArg }}{{else if $anchorArg}}{{ $anchorArg }}{{else}}{{ $metadata.kind }}{{end}}   No newline at end of file  {{if $textArg}}{{ $textArg }}{{else if $anchorArg}}{{ $anchorArg }}{{else}}{{ $metadata.kind }}{{end}}   No newline at end of file

This is a Bug Report <!-- Thanks for filing an issue! Before submitting, please fill in the following information. --<!-- See for guidance on writing an actionable issue description. --<!--Required Information--Problem: I followed the section "Running the website locally using Hugo" in README of this repo, but I met an error. With Ubuntu 18.04 desktop amd64 the latest commit of this repo () Docsy whose version is the same as of (docsy @ ) npm version: 6.14.15 node version: v14.18.1 go version go1.17.3 linux/amd64 hugo v0.96.0-+extended linux/amd64 BuildDate=2022-03-26T09:15:58Z VendorInfo=mage Docker Client/Server: 20.10.11 [How to reproduce] Proposed Solution:
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
The version of Hugo that we support is as declared in : 0.87.0 Try using Hugo 0.87.0 Pull requests to adopt a newer Hugo version are welcome.
Following comment, I confirmed that this error does not occur with Hugo 0.87.0. After doing some testing, it seems that the field is accessible with Hugo 0.87.0, but not with Hugo 0.96.0 (and maybe with some other versions too). (I tried to find Hugo changelog that says field of is deprecated in what Hugo version, but I could not find.) Suggested solution: Instead of field, if we use , I checked locally that it seems working.

[] How I checked: In page (http://localhost:1313/docs/concepts/workloads/controllers/cron-jobs/#what-s-next), the link goes to http://localhost:1313/docs/reference/kubernetes-api/workload-resources/cron-job-v1/ , for these cases: (As-is) , with Hugo 0.87.0 (To-be) , with Hugo 0.87.0 (To-be) , with Hugo 0.96.0 /area web-development
/assign


Question: * spec: Invalid value: map[string]interface {}{"maxReplicas":10, "minReplicas":0, "replicas":20}: failed rule: self.replicas <= self.maxReplicas ``` <ins> {{< note >}} You can quickly test CEL expressions in [CEL Playground](https://playcel.undistro.io). {{< /note >}} </ins> Validation rules are compiled when CRDs are created/updated. The request of CRDs create/update will fail if compilation of validation rules fail. Compilation process includes type checking as well.

Hello there, I would like to suggest adding a link to the CEL Playground in the Kubernetes documentation. CEL (Common Expression Language) is used in Kubernetes APIs, such as the , and the CEL Playground can help users easily test expressions. The playground also includes a set of examples and the . I believe the link would be useful on the following pages: The CEL Playground is available at and the source code can be found at I also invite you to test and contribute to the project. Thank you.
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig docs
/transfer website The repo is not quite the right place to track this.
/language en /kind feature
If we add a link, I would add it to: (and I wouldn't add it to the reference page ; instead, we can have link to the three pages I listed above)
/wg api-expression
@ Hey which particular points on these links would you want the CEL playground. I will be glad for more clarification on this?
IMHO, a mention similar to the mention of on the would help: but saying that users can quickly test CEL expressions in the playground.
Hi I've opened a PR () with some suggestions for adding the CEL Playground link. Please take a look and let me know your thoughts. Inviting to share their thoughts as well.
I'm supportive of this. It's a wonderful tool and the community will benefit from being more aware of it.
/triage accepted