2017-01-22 19:48:07 +00:00
|
|
|
---
|
|
|
|
title: Declarative Management of Kubernetes Objects Using Configuration Files
|
2019-05-20 12:15:14 +00:00
|
|
|
content_template: templates/task
|
|
|
|
weight: 10
|
2017-01-22 19:48:07 +00:00
|
|
|
---
|
|
|
|
|
2018-05-05 16:00:51 +00:00
|
|
|
{{% capture overview %}}
|
2017-01-22 19:48:07 +00:00
|
|
|
Kubernetes objects can be created, updated, and deleted by storing multiple
|
|
|
|
object configuration files in a directory and using `kubectl apply` to
|
|
|
|
recursively create and update those objects as needed. This method
|
|
|
|
retains writes made to live objects without merging the changes
|
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
|
|
|
back into the object configuration files. `kubectl diff` also gives you a
|
|
|
|
preview of what changes `apply` will make.
|
2018-05-05 16:00:51 +00:00
|
|
|
{{% /capture %}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2019-05-20 12:15:14 +00:00
|
|
|
{{% capture prerequisites %}}
|
|
|
|
|
2019-05-21 07:48:41 +00:00
|
|
|
Install [`kubectl`](/docs/tasks/tools/install-kubectl/).
|
2019-05-20 12:15:14 +00:00
|
|
|
|
|
|
|
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
|
|
|
|
|
|
|
{{% /capture %}}
|
|
|
|
|
|
|
|
{{% capture steps %}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
## Trade-offs
|
|
|
|
|
|
|
|
The `kubectl` tool supports three kinds of object management:
|
|
|
|
|
|
|
|
* Imperative commands
|
|
|
|
* Imperative object configuration
|
|
|
|
* Declarative object configuration
|
|
|
|
|
2019-05-24 12:00:19 +00:00
|
|
|
See [Kubernetes Object Management](/docs/concepts/overview/working-with-objects/object-management/)
|
2017-01-22 19:48:07 +00:00
|
|
|
for a discussion of the advantages and disadvantage of each kind of object management.
|
|
|
|
|
2019-05-20 12:15:14 +00:00
|
|
|
## Overview
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Declarative object configuration requires a firm understanding of
|
|
|
|
the Kubernetes object definitions and configuration. Read and complete
|
|
|
|
the following documents if you have not already:
|
|
|
|
|
2019-05-20 12:15:14 +00:00
|
|
|
* [Managing Kubernetes Objects Using Imperative Commands](/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
|
|
|
* [Imperative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Following are definitions for terms used in this document:
|
|
|
|
|
|
|
|
- *object configuration file / configuration file*: A file that defines the
|
|
|
|
configuration for a Kubernetes object. This topic shows how to pass configuration
|
|
|
|
files to `kubectl apply`. Configuration files are typically stored in source control, such as Git.
|
|
|
|
- *live object configuration / live configuration*: The live configuration
|
|
|
|
values of an object, as observed by the Kubernetes cluster. These are kept in the Kubernetes
|
|
|
|
cluster storage, typically etcd.
|
|
|
|
- *declarative configuration writer / declarative writer*: A person or software component
|
2017-08-17 18:45:12 +00:00
|
|
|
that makes updates to a live object. The live writers referred to in this topic make changes
|
2017-01-22 19:48:07 +00:00
|
|
|
to object configuration files and run `kubectl apply` to write the changes.
|
|
|
|
|
|
|
|
## How to create objects
|
|
|
|
|
|
|
|
Use `kubectl apply` to create all objects, except those that already exist,
|
|
|
|
defined by configuration files in a specified directory:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
kubectl apply -f <directory>/
|
|
|
|
```
|
|
|
|
|
|
|
|
This sets the `kubectl.kubernetes.io/last-applied-configuration: '{...}'`
|
|
|
|
annotation on each object. The annotation contains the contents of the object
|
|
|
|
configuration file that was used to create the object.
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< note >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
Add the `-R` flag to recursively process directories.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /note >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Here's an example of an object configuration file:
|
|
|
|
|
2018-07-10 15:56:25 +00:00
|
|
|
{{< codenew file="application/simple_deployment.yaml" >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
|
|
|
Run `kubectl diff` to print the object that will be created:
|
2019-05-20 12:15:14 +00:00
|
|
|
|
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
|
|
|
```shell
|
|
|
|
kubectl diff -f https://k8s.io/examples/application/simple_deployment.yaml
|
|
|
|
```
|
2019-05-20 12:15:14 +00:00
|
|
|
|
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
|
|
|
{{< note >}}
|
2018-12-20 02:17:40 +00:00
|
|
|
`diff` uses [server-side dry-run](/docs/reference/using-api/api-concepts/#dry-run), which needs to be enabled on `kube-apiserver`.
|
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
|
|
|
{{< /note >}}
|
|
|
|
|
2017-01-22 19:48:07 +00:00
|
|
|
Create the object using `kubectl apply`:
|
|
|
|
|
|
|
|
```shell
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl apply -f https://k8s.io/examples/application/simple_deployment.yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Print the live configuration using `kubectl get`:
|
|
|
|
|
|
|
|
```shell
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl get -f https://k8s.io/examples/application/simple_deployment.yaml -o yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The output shows that the `kubectl.kubernetes.io/last-applied-configuration` annotation
|
|
|
|
was written to the live configuration, and it matches the configuration file:
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
# ...
|
|
|
|
# This is the json representation of simple_deployment.yaml
|
|
|
|
# It was written by kubectl apply when the object was created
|
|
|
|
kubectl.kubernetes.io/last-applied-configuration: |
|
2018-02-27 17:51:46 +00:00
|
|
|
{"apiVersion":"apps/v1","kind":"Deployment",
|
2017-01-22 19:48:07 +00:00
|
|
|
"metadata":{"annotations":{},"name":"nginx-deployment","namespace":"default"},
|
2018-02-27 17:51:46 +00:00
|
|
|
"spec":{"minReadySeconds":5,"selector":{"matchLabels":{"app":nginx}},"template":{"metadata":{"labels":{"app":"nginx"}},
|
2017-01-22 19:48:07 +00:00
|
|
|
"spec":{"containers":[{"image":"nginx:1.7.9","name":"nginx",
|
|
|
|
"ports":[{"containerPort":80}]}]}}}}
|
|
|
|
# ...
|
|
|
|
spec:
|
|
|
|
# ...
|
|
|
|
minReadySeconds: 5
|
2018-02-27 17:51:46 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
# ...
|
|
|
|
app: nginx
|
2017-01-22 19:48:07 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
# ...
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: nginx:1.7.9
|
|
|
|
# ...
|
|
|
|
name: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
```
|
|
|
|
|
|
|
|
## How to update objects
|
|
|
|
|
|
|
|
You can also use `kubectl apply` to update all objects defined in a directory, even
|
|
|
|
if those objects already exist. This approach accomplishes the following:
|
|
|
|
|
|
|
|
1. Sets fields that appear in the configuration file in the live configuration.
|
|
|
|
2. Clears fields removed from the configuration file in the live configuration.
|
|
|
|
|
|
|
|
```shell
|
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
|
|
|
kubectl diff -f <directory>/
|
2017-01-22 19:48:07 +00:00
|
|
|
kubectl apply -f <directory>/
|
|
|
|
```
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< note >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
Add the `-R` flag to recursively process directories.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /note >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Here's an example configuration file:
|
|
|
|
|
2018-07-10 15:56:25 +00:00
|
|
|
{{< codenew file="application/simple_deployment.yaml" >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Create the object using `kubectl apply`:
|
|
|
|
|
|
|
|
```shell
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl apply -f https://k8s.io/examples/application/simple_deployment.yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< note >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
For purposes of illustration, the preceding command refers to a single
|
2017-01-22 19:48:07 +00:00
|
|
|
configuration file instead of a directory.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /note >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Print the live configuration using `kubectl get`:
|
|
|
|
|
|
|
|
```shell
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl get -f https://k8s.io/examples/application/simple_deployment.yaml -o yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The output shows that the `kubectl.kubernetes.io/last-applied-configuration` annotation
|
|
|
|
was written to the live configuration, and it matches the configuration file:
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
# ...
|
|
|
|
# This is the json representation of simple_deployment.yaml
|
|
|
|
# It was written by kubectl apply when the object was created
|
|
|
|
kubectl.kubernetes.io/last-applied-configuration: |
|
2018-02-27 17:51:46 +00:00
|
|
|
{"apiVersion":"apps/v1","kind":"Deployment",
|
2017-01-22 19:48:07 +00:00
|
|
|
"metadata":{"annotations":{},"name":"nginx-deployment","namespace":"default"},
|
2018-02-27 17:51:46 +00:00
|
|
|
"spec":{"minReadySeconds":5,"selector":{"matchLabels":{"app":nginx}},"template":{"metadata":{"labels":{"app":"nginx"}},
|
2017-01-22 19:48:07 +00:00
|
|
|
"spec":{"containers":[{"image":"nginx:1.7.9","name":"nginx",
|
|
|
|
"ports":[{"containerPort":80}]}]}}}}
|
|
|
|
# ...
|
|
|
|
spec:
|
|
|
|
# ...
|
|
|
|
minReadySeconds: 5
|
2018-02-27 17:51:46 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
# ...
|
|
|
|
app: nginx
|
2017-01-22 19:48:07 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
# ...
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: nginx:1.7.9
|
|
|
|
# ...
|
|
|
|
name: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
```
|
|
|
|
|
|
|
|
Directly update the `replicas` field in the live configuration by using `kubectl scale`.
|
|
|
|
This does not use `kubectl apply`:
|
|
|
|
|
|
|
|
```shell
|
2017-10-23 17:22:07 +00:00
|
|
|
kubectl scale deployment/nginx-deployment --replicas=2
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Print the live configuration using `kubectl get`:
|
|
|
|
|
|
|
|
```shell
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl get -f https://k8s.io/examples/application/simple_deployment.yaml -o yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The output shows that the `replicas` field has been set to 2, and the `last-applied-configuration`
|
|
|
|
annotation does not contain a `replicas` field:
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```yaml
|
2018-02-27 17:51:46 +00:00
|
|
|
apiVersion: apps/v1
|
2017-01-22 19:48:07 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
# ...
|
|
|
|
# note that the annotation does not contain replicas
|
|
|
|
# because it was not updated through apply
|
|
|
|
kubectl.kubernetes.io/last-applied-configuration: |
|
2018-02-27 17:51:46 +00:00
|
|
|
{"apiVersion":"apps/v1","kind":"Deployment",
|
2017-01-22 19:48:07 +00:00
|
|
|
"metadata":{"annotations":{},"name":"nginx-deployment","namespace":"default"},
|
2018-02-27 17:51:46 +00:00
|
|
|
"spec":{"minReadySeconds":5,"selector":{"matchLabels":{"app":nginx}},"template":{"metadata":{"labels":{"app":"nginx"}},
|
2017-01-22 19:48:07 +00:00
|
|
|
"spec":{"containers":[{"image":"nginx:1.7.9","name":"nginx",
|
|
|
|
"ports":[{"containerPort":80}]}]}}}}
|
|
|
|
# ...
|
|
|
|
spec:
|
|
|
|
replicas: 2 # written by scale
|
|
|
|
# ...
|
|
|
|
minReadySeconds: 5
|
2018-02-27 17:51:46 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
# ...
|
|
|
|
app: nginx
|
2017-01-22 19:48:07 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
# ...
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: nginx:1.7.9
|
|
|
|
# ...
|
|
|
|
name: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
# ...
|
|
|
|
```
|
|
|
|
|
|
|
|
Update the `simple_deployment.yaml` configuration file to change the image from
|
|
|
|
`nginx:1.7.9` to `nginx:1.11.9`, and delete the `minReadySeconds` field:
|
|
|
|
|
2018-07-10 15:56:25 +00:00
|
|
|
{{< codenew file="application/update_deployment.yaml" >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Apply the changes made to the configuration file:
|
|
|
|
|
|
|
|
```shell
|
Official 1.13 Release Docs (#11401)
* Update metadata.generation behaviour for custom resources (#10705)
* update docs promoting plugins to beta (#10796)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md (#11031)
* ADD content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
* ADD content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_init.md
* Update content/zh/docs/reference/setup-tools/kubeadm/kubeadm.md
Accepted
Co-Authored-By: YouthLab <tsui@highyouth.com>
* do not change 'master' or 'worker' nodes to '主从'
* Doc updates for volume scheduling GA (#10743)
* Doc updates for volume scheduling GA
* Make trivial change to kick build
* Document nodelease feature (#10699)
* advanced audit doc for ModeBlockingStrict (#10203)
* Rename EncryptionConfig to EncryptionConfiguration (#11080)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
* content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
* trsanlate create-cluster-kubeadm.md to chinese (#11041)
* trsanlate create-cluster-kubeadm.md to chinese
* Update create-cluster-kubeadm.md
* update the feature stage in v1.13 (#11307)
* update new feature gates to document (#11295)
* refresh controller role list on rbac description page (#11290)
* node labeling restriction docs (#10944)
* Update 1.13 docs for CSI GA (#10893)
* dynamic audit documentation (#9947)
* adds dynamic audit documentation
* Copyedit for clarity
See also inline question/s
* Fix feature state shortcode
* Update feature state
* changes wording for dynamic audit flag behavior
* Minor copyedit
* fix dynamic audit yaml
* adds api enablement command to dynamic audit docs
* change ordering dynamic audit appears in
* add references to dynamic audit in webhook backend
* reword dynamic audit reference
* updates stages field for audit sink object
* changes audit sink api definition; rewords policy
* kubeadm: remove kube-proxy workaround (#11162)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md (#11338)
* zh-trans content/en/docs/setup/independent/install-kubeadm.md
* Update install-kubeadm.md
* Update dry run feature to beta (#11140)
* vSphere volume raw block support doc update (#10932)
* Add docs for Windows DNS configurations (#10036)
* Update docs for fields allowed at root of CRD schema (#9973)
* Add docs for Windows DNS configurations
* add device monitoring documentation (#9945)
* kubeadm: adds upgrade instructions for 1.13 (#11138)
* kubeadm: adds upgrade instructions for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* add minor copyedits
Addressed a couple of copyedit comments a bit more cleanly.
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm external etcd HA upgrade 1.13 (#11364)
* kubeadm external etcd HA upgrade 1.13
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
* Update stacked controlplane steps
* kubeadm cert documentation (#11093)
* kubeadm certificate API and CSR documentation
* copyedits
* fix typo
* PR for diff docs (#10789)
* Empty commit against dev-1.13 for diff documentation
* Complete Declarative maangement with diff commands
* Second Korean l10n work for dev-1.13. (#11030)
* Update outdated l10n(ko) contents (#10915)
* Translate main menu for l10n(ko) docs (#10916)
* Translate tasks/run-application/horizontal-pod-autoscale-walkthrough (#10980)
* Translate content/ko/docs/concepts/overview/working-with-objects/kubernetes-object in Korean #11104 (#11332)
* Pick-right-solution page translates into Korean. (#11340)
* ko-trans: add jd/..., sap/..., ebay/..., homeoffice/... (#11336)
* Translate concept/workloads/pods/pod-overview.md (#11092)
Co-authored-by: June Yi <june.yi@samsung.com>
Co-authored-by: Jesang Myung <jesang.myung@gmail.com>
Co-authored-by: zerobig <38598117+zer0big@users.noreply.github.com>
Co-authored-by: Claudia J.Kang <claudiajkang@gmail.com>
Co-authored-by: lIuDuI <1693291525@qq.com>
Co-authored-by: Woojin Na(Eddie) <cheapluv@gmail.com>
* Rename encryption-at-rest related objects (#11059)
EncryptionConfig was renamed to EncryptedConfiguration and added to
the `apiserver.config.k8s.io` API group in Kubernetes 1.13.
The feature was previously in alpha and was not handling versions
properly, which lead to an originally unnoticed `v1` in the docs.
Also, the `--experimental-encryption-provider-config` flag is now called
just `--encryption-provider-config`.
* Documenting FlexVolume Resize alpha feature. (#10097)
* CR webhook conversion documentation (#10986)
* CR Conversion
* Addressing comments
* Addressing more comments
* Addressing even more comments
* Addressing even^2 more comments
* Remove references to etcd2 in v1.13 since support has been removed (#11414)
* Remove etcd2 references as etcd2 is deprecated
Link back to the v1.12 version of the etcd3 doc for
the etcd2->etcd3 migration instructions.
I updated the kube-apiserver reference manually,
unsure if that is auto-generated somehow.
The federation-apiserver can still potentially
support etcd2 so I didn't touch that.
* Remove outdated {master,node}.yaml files
There are master/node yaml files that reference
etcd2.service that are likely highly out of date.
I couldn't find any docs that actually reference
these templates so I removed them
* Address review comments
* Final Korean l10n work for dev-1.13 (#11440)
* Update outdated l10n(ko) contents (#11425)
fixes #11424
* Remove references to etcd2 in content/ko (#11416)
* Resolve conflicts against master for /ko contents (#11438)
* Fix unopened caution shortcode
* kubeadm: update the reference docs for 1.13 (#10960)
* docs update to promote TaintBasedEvictions to beta (#10765)
* First Korean l10n work for dev-1.13 (#10719)
* Update outdated l10n(ko) contents (#10689)
fixes #10686
* Translate concepts/overview/what-is-kubernetes in Korean (#10690)
* Translate concepts/overview/what-is-kubernetes in Korean
* Feedback from ClaudiaJKang
* Translate concepts/overview/components in Korean (#10882)
* Translate concepts/overview/components in Korean #10717
* Translate concepts/overview/components in Korean
* Translate concepts/overview/components in Korean
* Apply Korean glossary: 서비스 어카운트
* Translate concepts/overview/kubernetes-api in Korean (#10773)
* Translate concepts/overview/kubernetes-api in Korean
* Applied feedback from ianychoi
* kubeadm: update the configuration docs to v1beta1 (#10959)
* kubeadm: add small v1beta1 related updates (#10988)
* update new feature gates to document (#11295)
* Update dry run feature to beta (#11140)
* kubeadm: add improvements to HA docs (#11094)
* kubeadm: add information and diagrams for HA topologies
* kubeadm: update HA doc with simplified steps
* kubeadm: update HA doc with simplified steps
* edit ha, add new topology topic, reorder by weight
* troubleshoot markdown
* fix more markdown, fix links
* more markdown
* more markdown
* more markdown
* changes after reviewer comments
* add steps about Weave
* update note about stacked topology
* kubeadm: update reference docs
- add section about working with phases under kubeadm-init.md
- update GA / beta status of features
- kubeadm alpha phase was moved to kubeadm init phase
- new commands were added under kubeadm alpha
- included new CoreDNS usage examples
* Generate components and tools reference
* Add generated federation API Reference (#11491)
* Add generated federation API Reference
* Add front matter to federation reference
* Remove whitespace from federation front matter
* Remove more whitespace from federation front matter
* Remove superfluous kubefed reference
* Add frontmatter to generated kubefed reference
* Fix kubefed reference page frontmatter
* Generate kubectl reference docs 1.13 (#11487)
* Generate kubectl reference docs 1.13
* Fix links in kubectl reference
* Add 1.13 API reference (#11489)
* Update config.toml (#11486)
* Update config.toml
Preparing for 1.13 release, updating the config.toml and dropping the 1.8 docs reference.
* update dot releases and docsbranch typo
* adding .Site. to Params.currentUrl (#11503)
see https://github.com/kubernetes/website/pull/11502 for context
* Add 1.13 Release notes (#11499)
2018-12-04 01:21:11 +00:00
|
|
|
kubectl diff -f https://k8s.io/examples/application/update_deployment.yaml
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl apply -f https://k8s.io/examples/application/update_deployment.yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Print the live configuration using `kubectl get`:
|
|
|
|
|
2019-05-20 12:15:14 +00:00
|
|
|
```shell
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl get -f https://k8s.io/examples/application/simple_deployment.yaml -o yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The output shows the following changes to the live configuration:
|
|
|
|
|
2019-05-20 12:15:14 +00:00
|
|
|
* The `replicas` field retains the value of 2 set by `kubectl scale`.
|
2017-01-22 19:48:07 +00:00
|
|
|
This is possible because it is omitted from the configuration file.
|
2019-05-20 12:15:14 +00:00
|
|
|
* The `image` field has been updated to `nginx:1.11.9` from `nginx:1.7.9`.
|
|
|
|
* The `last-applied-configuration` annotation has been updated with the new image.
|
|
|
|
* The `minReadySeconds` field has been cleared.
|
|
|
|
* The `last-applied-configuration` annotation no longer contains the `minReadySeconds` field.
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```yaml
|
2018-02-27 17:51:46 +00:00
|
|
|
apiVersion: apps/v1
|
2017-01-22 19:48:07 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
# ...
|
|
|
|
# The annotation contains the updated image to nginx 1.11.9,
|
|
|
|
# but does not contain the updated replicas to 2
|
|
|
|
kubectl.kubernetes.io/last-applied-configuration: |
|
2018-02-27 17:51:46 +00:00
|
|
|
{"apiVersion":"apps/v1","kind":"Deployment",
|
2017-01-22 19:48:07 +00:00
|
|
|
"metadata":{"annotations":{},"name":"nginx-deployment","namespace":"default"},
|
2018-02-27 17:51:46 +00:00
|
|
|
"spec":{"selector":{"matchLabels":{"app":nginx}},"template":{"metadata":{"labels":{"app":"nginx"}},
|
2017-01-22 19:48:07 +00:00
|
|
|
"spec":{"containers":[{"image":"nginx:1.11.9","name":"nginx",
|
|
|
|
"ports":[{"containerPort":80}]}]}}}}
|
|
|
|
# ...
|
|
|
|
spec:
|
|
|
|
replicas: 2 # Set by `kubectl scale`. Ignored by `kubectl apply`.
|
|
|
|
# minReadySeconds cleared by `kubectl apply`
|
|
|
|
# ...
|
2018-02-27 17:51:46 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
# ...
|
|
|
|
app: nginx
|
2017-01-22 19:48:07 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
# ...
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: nginx:1.11.9 # Set by `kubectl apply`
|
|
|
|
# ...
|
|
|
|
name: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
```
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< warning >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
Mixing `kubectl apply` with the imperative object configuration commands
|
2017-01-22 19:48:07 +00:00
|
|
|
`create` and `replace` is not supported. This is because `create`
|
|
|
|
and `replace` do not retain the `kubectl.kubernetes.io/last-applied-configuration`
|
|
|
|
that `kubectl apply` uses to compute updates.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /warning >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
## How to delete objects
|
|
|
|
|
|
|
|
There are two approaches to delete objects managed by `kubectl apply`.
|
|
|
|
|
2017-04-10 11:38:27 +00:00
|
|
|
### Recommended: `kubectl delete -f <filename>`
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Manually deleting objects using the imperative command is the recommended
|
|
|
|
approach, as it is more explicit about what is being deleted, and less likely
|
|
|
|
to result in the user deleting something unintentionally:
|
|
|
|
|
|
|
|
```shell
|
2017-04-10 11:38:27 +00:00
|
|
|
kubectl delete -f <filename>
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Alternative: `kubectl apply -f <directory/> --prune -l your=label`
|
|
|
|
|
|
|
|
Only use this if you know what you are doing.
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< warning >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
`kubectl apply --prune` is in alpha, and backwards incompatible
|
2017-01-22 19:48:07 +00:00
|
|
|
changes might be introduced in subsequent releases.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /warning >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< warning >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
You must be careful when using this command, so that you
|
2017-01-22 19:48:07 +00:00
|
|
|
do not delete objects unintentionally.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /warning >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
As an alternative to `kubectl delete`, you can use `kubectl apply` to identify objects to be deleted after their
|
|
|
|
configuration files have been removed from the directory. Apply with `--prune`
|
|
|
|
queries the API server for all objects matching a set of labels, and attempts
|
|
|
|
to match the returned live object configurations against the object
|
|
|
|
configuration files. If an object matches the query, and it does not have a
|
2018-04-12 22:13:59 +00:00
|
|
|
configuration file in the directory, and it has a `last-applied-configuration` annotation,
|
2017-01-22 19:48:07 +00:00
|
|
|
it is deleted.
|
|
|
|
|
2018-05-05 16:00:51 +00:00
|
|
|
{{< comment >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
TODO(pwittrock): We need to change the behavior to prevent the user from running apply on subdirectories unintentionally.
|
2018-05-05 16:00:51 +00:00
|
|
|
{{< /comment >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
```shell
|
|
|
|
kubectl apply -f <directory/> --prune -l <labels>
|
|
|
|
```
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< warning >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
Apply with prune should only be run against the root directory
|
2017-01-22 19:48:07 +00:00
|
|
|
containing the object configuration files. Running against sub-directories
|
|
|
|
can cause objects to be unintentionally deleted if they are returned
|
|
|
|
by the label selector query specified with `-l <labels>` and
|
|
|
|
do not appear in the subdirectory.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /warning >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
## How to view an object
|
|
|
|
|
|
|
|
You can use `kubectl get` with `-o yaml` to view the configuration of a live object:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
kubectl get -f <filename|url> -o yaml
|
|
|
|
```
|
|
|
|
|
|
|
|
## How apply calculates differences and merges changes
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< caution >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
A *patch* is an update operation that is scoped to specific fields of an object
|
|
|
|
instead of the entire object. This enables updating only a specific set of fields
|
|
|
|
on an object without reading the object first.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /caution >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
When `kubectl apply` updates the live configuration for an object,
|
|
|
|
it does so by sending a patch request to the API server. The
|
|
|
|
patch defines updates scoped to specific fields of the live object
|
|
|
|
configuration. The `kubectl apply` command calculates this patch request
|
|
|
|
using the configuration file, the live configuration, and the
|
|
|
|
`last-applied-configuration` annotation stored in the live configuration.
|
|
|
|
|
|
|
|
### Merge patch calculation
|
|
|
|
|
|
|
|
The `kubectl apply` command writes the contents of the configuration file to the
|
|
|
|
`kubectl.kubernetes.io/last-applied-configuration` annotation. This
|
|
|
|
is used to identify fields that have been removed from the configuration
|
|
|
|
file and need to be cleared from the live configuration. Here are the steps used
|
Move init containers to stable in v1.6 (#1939)
* Delete the parameter "--google-json-key string"
Delete the parameter "--google-json-key string"
* Fix apimachinery vendored dependencies in examples_test.
* package apt-transport-https should be installed
Ubuntu default install not include apt-transport-https. so if you want to download package from https repo, you need install apt-transport-https package first
* doc-walkthrough-content
modify
* limitrange-update
I think it's redundant that the second to ,in order to do sth and do
sth!thanks!
* fix command kubectl get svc,pod output
fix command kubectl get svc,pod output
* Fix typo: federation-controller-mananger => federation-controller-manager
* Fix typo: federation-controller-mananger => federation-controller-manager
* Clarify minimum version of kubernetes supporting PSP authz
* Provide correct location for KUBE_ETCD_SERVERS
Provide correct location for KUBE_ETCD_SERVERS configuration key. It was
previously listed as being in /etc/kubernetes/config but is actually in
/etc/kubernetes/apiserver.
Related: https://github.com/kubernetes/kubernetes.github.io/issues/1600
* Move Compute Resources topic to Concepts. (#2410)
* Delete the parameter "--google-json-key string"
“# kube-scheduler -help”can not find --google-json-key option
# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
* Add diagnose tips when you face problem.
* Update grammar for kubeadm.md, thanks @chenopis
* Merge two pieces to one words
* add http proxy infomation in kubeadm
* Update landing pages for Tasks and Tutorials. (#2634)
* Update static-pods.md
It works. Please review it again.
* Move Guide Topic: Multi-container pods. (#2642)
* fix link to go to pod-lifecycle page
* fix the command output
fix the command output
* mirantis_logo.png
,/images/community_logos/mirantis_logo.png updated per Mirantis request
* kubeadm reference -- /
set up/manage mean set up or manage ? it's better use or?
* Prototype for deprecating User Guide topic.
* missing word
The return of the OCD.
* Move Guide topic: Using Environment Variables. (#2645)
* fix typo (#2656)
fix typo
* Move Guide topic: Using Port Forwarding. (#2661)
* Move Guide topic: Bootstrapping Pet Sets. (#2662)
* Move Guide topic: Bootstrapping Pet Sets.
* Add TOC entry.
* Move Guide topic: Connect with Proxies. (#2663)
* Move Guide topic: Connect with Proxies.
* Fix link.
* add DefaultTolerationSeconds admission controller
* getting-started-guides: add CoreOS Tectonic
* Correct the certificate name
* Update index.md
* Update installation.md
* Update validation.md
* Update backups.md
* Update backups.md
* Spell fixes
* Using it vs Juju Kubernetes
* Q1 update to k8s tech and service partner list
New partners registered to K8s Partner Ecosystem sign-up form. Logo updates companion to this edit still WIP
* Logo file updates for new registrants
Logos for new registrants
* The attribute [allowfullscree] must have a value
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
* Remove newline before passing to base64
* Use single quote to avoid string interpolation, update output
* Update command as files contain no newline
* Remove all dead links, use just filename
As user can guess that it is file copied from the shown content
* Fix link to dev guide.
* Add --leader-elect=false
Second scheduler could not start without disabling leader-elect.
* cluster-components-could be running
could be doing sth
* update cluster-components.md
In theory,Master components can be run....
* update cluster-components--add a space
add a space after the comma: "In theory, Master components..."
* Highlighted command --kubectl describe
In web page ,there is no space ,need some empty space,thanks!
* Revert "Highlighted command --kubectl describe"
This reverts commit a70d0a3e3537c3f91b197b23f949e1e506c951d1.
* Add example show how to configure proxy for kube
* Revision as the suggestion describe
* move ha-master-gce.png to images/docs
Signed-off-by: Xiuyu Li <nickleefly@gmail.com>
* use relative path for ha-master-gce image
Signed-off-by: Xiuyu Li <nickleefly@gmail.com>
* The attribute [calendarWrapper] must be unique
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
* add required images in kubeadm init step
* Add links to Docker/rtk in cluster-intro.html
* s/acomplish/accomplish/
* Modify the link URL of [kubelet eviction design doc]
[kubelet eviction design doc] should be linked to kubernetes.github.io
instead of community/design-proposal.
* fix CronJob object name
fix CronJob object name
* remove redundant a
Signed-off-by: Xiuyu Li <nickleefly@gmail.com>
* kubeadm reference--change any to some (#2683)
* modify one word
examples to example
* doc-walkthrough-content
modify
* limitrange-update
I think it's redundant that the second to ,in order to do sth and do
sth!thanks!
* cluster-components-could be running
could be doing sth
* update cluster-components.md
In theory,Master components can be run....
* update cluster-components--add a space
add a space after the comma: "In theory, Master components..."
* Highlighted command --kubectl describe
In web page ,there is no space ,need some empty space,thanks!
* Revert "Highlighted command --kubectl describe"
This reverts commit a70d0a3e3537c3f91b197b23f949e1e506c951d1.
* kubeadm reference--change any to some
kubeadm can install any add-on ?
* Move Guide topics: Logging (#2687)
* Disallow indexing for liveness/index (#2689)
* Deprecate Guide topics. (#2691)
* Wrong label and kubectl get completed pods
The label `app=jobexample` should be `jobgroup=jobexample`.
Also, for get completed pods the flag `--show-all` is necessary.
* Update garbage-collection.md
change “any” to "every"
* Deprecate Guide topic: Persistent Volume Walkthrough. (#2692)
* Reimplement PR #2525
Fixes typo by removing the word "controller"
* remove extra space
* Update multiple-schedulers doc (#2063)
* Update tutorial
* Fix md formatting.
* Remove extraneous space
* Deprecate Guide topic: Secrets Walkthrough. (#2695)
* Deprecate Guide topics: quick-start ... (#2696)
* Update Tasks landing page. (#2697)
* Remove redundant section in deployments
The status of the deployment is already covered in a later section in
this doc.
* Repair Spotinst logo
Corrected size
* fixed ASM blurb
* Correct ASM logo filename
* Highlighted command for `kubectl proxy`.
* Update ubuntu install instructions.
* Update local instructions to new method.
* update init-containers.md
add one word.
* Minor spelling correction -- "rtk" to "rkt"
* fixing typo
* Doc formatting update
Corrected indentation for the `nonResourcePath` and got a bit zealous with restructuring that section...
* Repair Spotinst logo
Corrected size
* fixed ASM blurb
* Correct ASM logo filename
* Update garbage-collection.md
change "any" to "every"
* Update Weave Net's title.
* fix unsupported parameter of wget command
* update to be retained
change "retain" to "to be retained".
* Update pod.md
* update init-containers.md
change "a different filesystem view" to "different filesystem views".
different init container should have different filesystem.
* Highlighted command --kubectl describe
In web page ,there is no space ,need some empty space,thanks!
* cluster-management--3
change 3 to three is better or not ?thanks!
* fix typo
1、Parameters “--allow-verification-with-non-compliant-keys” is missed.
2、Delete the parameter "--google-json-key string";
see the "# kube-controller-manager -help"
# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
* fix typo
1、Delete the parameter "--google-json-key string";
2、Parameters "--ir-data-source string"、"--ir-dbname string"、"--ir-hawkular string"、"--ir-influxdb-host string"、"--ir-namespace-only"、"--ir-password string"、"--ir-percentile int"、"--ir-user string" is missed.
see the "# kube-prxoy -help"
# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
* Update garbage-collection.md
modify the url and link
* update garbage-collection.md
change the url to relative path.
* update out-of-resource.md
change "in cases when" to "in case that"
* update out-of-resource.md
use a shorter and simpler expression.
* update out-of-resource.md
change "support" to "supports"
* Create a top-level CN directory to hold future md files for the Chinese kubernetes site
* Removed `=` at the end of the flags.
* Remove autogenerate todo
- This should be captured via a GitHub issue
and not a TODO in the README documentation
which leads to confusion.
* Move Guide topics: Federation Tasks. (#2799)
* Move Guide topics: Federation tutorial and concept. (#2802)
* Move Guide topics: Federation tutorial and concept.
* Add title.
* Fix link.
* Move kubectl Concept topics to Tutorials. (#2804)
* Move kubectl Concept topics to Tutorials.
* Add redirects and update links.
* The calendarWrapper attribute should be unique
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
* Fix links. (#2808)
* Fix link. (#2806)
* Move topic from clusters to cluster-administration. (#2812)
* Move a batch of cluster admin topics. (#2813)
* Move Guide topic: Limit storage consumption. (#2814)
* Move Guide topic: Limit storage consumption.
* Add title.
* Move Guide topic: Networking. (#2816)
* Move Guide topic: Network Plugins. (#2819)
* Move Guide topic: Network Plugins.
* Fix link.
* Move Guide topic: Static Pods. (#2820)
* User Guide content migration: post notice (#2818)
* Add User Guide content migration notice.
* Fix formatting
* Tweek formatting to block highlight text in light gray.
* Try table instead of code block
* remove extra lines
* try table format
* fix links
* incorporate @ddonnelly feedback
* Move Guide topic: Out of Resource. (#2821)
* Move Guide topic: Monitoring Node Health. (#2822)
* Move Guide topic: Monitoring Node Health.
* Move to Tasks.
* Move Guide topic: AppArmor. (#2823)
* Apparmor (#2825)
* Move Guide topic: AppArmor.
* Add included files.
* Move Guide topic: Audit. (#2824)
* Added 1.6 Upgrade notes to outline changes for etcd 3.
* Move Guide topic: Disruption Budget. (#2834)
* Move Guide topic: Limit range. (#2835)
* Quota (#2836)
* Move Guide topic: Limit range.
* Move Guide topic: Resource Quota and Limits.
* Quota2 (#2838)
* Move Guide topic: Limit range.
* Move Guide topic: Resource Quota concept.
* Dns (#2839)
* Move Guide topic: Limit range.
* Move Guide topic: DNS.
* Delete CNAME
* Create CNAME
* Delete CNAME
* Create CNAME
* Move docs/user-guide/managing-deployments.md to /docs/concepts/cluster-administration/manage-deployment.md
* add nginx-app.yaml file
* add back missing /
* fix link
* Move Guide topic: Replication Controller Operations
* Move Guide topic: Resizing a replication controller
* Concepts toc (#2840)
* Move Guide topic: Limit range.
* Adjust Concepts Overview TOC.
* Move Guide topic: Rolling Updates
* Move Kubernetes API page. (#2849)
* Move What is Kubernetes topic. (#2851)
* Move Guide topic: Rolling Update Demo (#2850)
* Move Guide topic: Rolling Update Demo
* rename file
* Move Guide topic: Configuration Best Practices
* Move Guide topic: Jobs (#2853)
* Move Guide topic: Jobs
* add job.yaml file
* change title
* Move Pod overview. (#2865)
* Move Pod overview.
* Fix redirection.
* Move Guide topic: Parallel Processing using Expansions (#2867)
* Move Guide topic: Parallel Processing using Expansions
* fix links to /docs/user-guide/jobs/
* Move Init Containers topic. (#2866)
* Move Guide topic: Coarse Parallel Processing Using a Work Queue
* Move Guide topic: Fine Parallel Processing using a Work Queue (#2870)
* Move Guide topic: Fine Parallel Processing using a Work Queue
* add migration notice
* fixed capitalization
* Rename /docs/tasks/job/work-queue-1/
* Move StatefulSets topic. (#2869)
* Move StatefulSets topic.
* Fix TOC.
* Move Guide topic: Pod Templates (#2872)
* Move Guide topic: Pod Templates
* tweak header level and capitalization
* Move PetSets topic. (#2873)
* Move Garbage Collection topic. (#2874)
* Move Garbage Collection topic.
* Fix included file.
* Move Guide topic: Prereqs
* Move Guide topic: Sharing Clusters
* Move Accessing Clusters topic to Concepts. (#2875)
* Move Accessing Clusters topic to Concepts.
* Update concepts.yml
* Move Guide topic: Kubeconfig File
* Move Guide topic: Config Provider Firewalls. (#2883)
* Move Guide topic: Federation Service Discovery. (#2884)
* Move Guide topic: Connecting Apps with Services. (#2885)
* Added example and docu for hostPort ranges
* Move Guide topic: Service. (#2891)
* Move Guide topic: Service.
* Move Guide topic: External Load Balancer.
* Fix TOC.
* Move Guide topic: Resource Monitoring. (#2895)
* docs/admin: document OpenID Connect plugin's claim prefixing
* Move Guide topic: Admin Guide
* fix the command output
fix the command output
* Update manage-compute-resources-container.md
Change "he" to "The"
* update out-of-resource.md
change "thresholds" to "threshold"
* update init-containers.md
change "apply" to "application"
* amend monitor-node-health.md
Amend the url link.
* Fix monitor-node-health.md
The url link does not exist.
* fix a typo in /docs/user-guide/configmap/index.md
change "value" to "values"
* View $PAGE on Github without forking the repo
Adding a "View docs/bla-bla.md on GitHub" button next to the
"Edit docs/bla-bla.md" button so that people can view the file
first without clicking the Edit button (which does not work without
forking the repository).
I did not need this because I was trying to do something without
forking. I just found it to be bit difficult to view source of a page
on GitHub.
I'm open to ideas, perhaps we can instead add an article footer button
named "View on GitHub" next to the "Edit this Page".
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
* Move Guide topics: Container Lifestyle Hooks, Images, Volumes
* fix to taint the master node
* Add files via upload
* fix the link of ogging-elasticsearch-kibana.md
fix the link of url
* Remove from TOC/Search: pods/init-containers ... (#2694)
* Fix typo
* Add files via upload
* Create hyperlink
Create hyperlink for kubernetes repo link.
* updated PSP documentation with RBAC (#2552)
Added info about controller manager setup and current implementation when using PSP with RBAC support.
* Use kubectl config current-context to simplify the instructions
* fix typeo (#2856)
* fix typeo
* Update kargo.md
* Fix typo in kubectl_completion.md
evaluation --> evaluated
* Apply typo fixes from #2791 (#2949)
* Apply typo fixes from #2791
* remove style typos
* Fix the typos
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
* Fix typo
* Fix typo (#2842)
2017-03-22 01:13:33 +00:00
|
|
|
to calculate which fields should be deleted or set:
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2017-02-04 05:40:26 +00:00
|
|
|
1. Calculate the fields to delete. These are the fields present in `last-applied-configuration` and missing from the configuration file.
|
2017-01-22 19:48:07 +00:00
|
|
|
2. Calculate the fields to add or set. These are the fields present in the configuration file whose values don't match the live configuration.
|
|
|
|
|
|
|
|
Here's an example. Suppose this is the configuration file for a Deployment object:
|
|
|
|
|
2018-07-10 15:56:25 +00:00
|
|
|
{{< codenew file="application/update_deployment.yaml" >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Also, suppose this is the live configuration for the same Deployment object:
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```yaml
|
2018-02-27 17:51:46 +00:00
|
|
|
apiVersion: apps/v1
|
2017-01-22 19:48:07 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
# ...
|
|
|
|
# note that the annotation does not contain replicas
|
|
|
|
# because it was not updated through apply
|
|
|
|
kubectl.kubernetes.io/last-applied-configuration: |
|
2018-02-27 17:51:46 +00:00
|
|
|
{"apiVersion":"apps/v1","kind":"Deployment",
|
2017-01-22 19:48:07 +00:00
|
|
|
"metadata":{"annotations":{},"name":"nginx-deployment","namespace":"default"},
|
2018-02-27 17:51:46 +00:00
|
|
|
"spec":{"minReadySeconds":5,"selector":{"matchLabels":{"app":nginx}},"template":{"metadata":{"labels":{"app":"nginx"}},
|
2017-01-22 19:48:07 +00:00
|
|
|
"spec":{"containers":[{"image":"nginx:1.7.9","name":"nginx",
|
|
|
|
"ports":[{"containerPort":80}]}]}}}}
|
|
|
|
# ...
|
|
|
|
spec:
|
|
|
|
replicas: 2 # written by scale
|
|
|
|
# ...
|
|
|
|
minReadySeconds: 5
|
2018-02-27 17:51:46 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
# ...
|
|
|
|
app: nginx
|
2017-01-22 19:48:07 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
# ...
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: nginx:1.7.9
|
|
|
|
# ...
|
|
|
|
name: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
# ...
|
|
|
|
```
|
|
|
|
|
|
|
|
Here are the merge calculations that would be performed by `kubectl apply`:
|
|
|
|
|
|
|
|
1. Calculate the fields to delete by reading values from
|
|
|
|
`last-applied-configuration` and comparing them to values in the
|
2018-07-10 15:56:25 +00:00
|
|
|
configuration file.
|
|
|
|
Clear fields explicitly set to null in the local object configuration file
|
|
|
|
regardless of whether they appear in the `last-applied-configuration`.
|
|
|
|
In this example, `minReadySeconds` appears in the
|
2017-01-22 19:48:07 +00:00
|
|
|
`last-applied-configuration` annotation, but does not appear in the configuration file.
|
|
|
|
**Action:** Clear `minReadySeconds` from the live configuration.
|
|
|
|
2. Calculate the fields to set by reading values from the configuration
|
|
|
|
file and comparing them to values in the live configuration. In this example,
|
|
|
|
the value of `image` in the configuration file does not match
|
|
|
|
the value in the live configuration. **Action:** Set the value of `image` in the live configuration.
|
|
|
|
3. Set the `last-applied-configuration` annotation to match the value
|
|
|
|
of the configuration file.
|
|
|
|
4. Merge the results from 1, 2, 3 into a single patch request to the API server.
|
|
|
|
|
|
|
|
Here is the live configuration that is the result of the merge:
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```yaml
|
2018-02-27 17:51:46 +00:00
|
|
|
apiVersion: apps/v1
|
2017-01-22 19:48:07 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
# ...
|
|
|
|
# The annotation contains the updated image to nginx 1.11.9,
|
|
|
|
# but does not contain the updated replicas to 2
|
|
|
|
kubectl.kubernetes.io/last-applied-configuration: |
|
2018-02-27 17:51:46 +00:00
|
|
|
{"apiVersion":"apps/v1","kind":"Deployment",
|
2017-01-22 19:48:07 +00:00
|
|
|
"metadata":{"annotations":{},"name":"nginx-deployment","namespace":"default"},
|
2018-02-27 17:51:46 +00:00
|
|
|
"spec":{"selector":{"matchLabels":{"app":nginx}},"template":{"metadata":{"labels":{"app":"nginx"}},
|
2017-01-22 19:48:07 +00:00
|
|
|
"spec":{"containers":[{"image":"nginx:1.11.9","name":"nginx",
|
|
|
|
"ports":[{"containerPort":80}]}]}}}}
|
|
|
|
# ...
|
|
|
|
spec:
|
2018-02-27 17:51:46 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
# ...
|
|
|
|
app: nginx
|
2017-01-22 19:48:07 +00:00
|
|
|
replicas: 2 # Set by `kubectl scale`. Ignored by `kubectl apply`.
|
|
|
|
# minReadySeconds cleared by `kubectl apply`
|
|
|
|
# ...
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
# ...
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: nginx:1.11.9 # Set by `kubectl apply`
|
|
|
|
# ...
|
|
|
|
name: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
# ...
|
|
|
|
```
|
|
|
|
|
|
|
|
### How different types of fields are merged
|
|
|
|
|
|
|
|
How a particular field in a configuration file is merged with
|
2017-08-08 15:20:20 +00:00
|
|
|
the live configuration depends on the
|
2017-01-22 19:48:07 +00:00
|
|
|
type of the field. There are several types of fields:
|
|
|
|
|
|
|
|
- *primitive*: A field of type string, integer, or boolean.
|
|
|
|
For example, `image` and `replicas` are primitive fields. **Action:** Replace.
|
|
|
|
|
2017-02-02 02:09:08 +00:00
|
|
|
- *map*, also called *object*: A field of type map or a complex type that contains subfields. For example, `labels`,
|
|
|
|
`annotations`,`spec` and `metadata` are all maps. **Action:** Merge elements or subfields.
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2017-02-02 02:09:08 +00:00
|
|
|
- *list*: A field containing a list of items that can be either primitive types or maps.
|
2017-01-22 19:48:07 +00:00
|
|
|
For example, `containers`, `ports`, and `args` are lists. **Action:** Varies.
|
|
|
|
|
|
|
|
When `kubectl apply` updates a map or list field, it typically does
|
|
|
|
not replace the entire field, but instead updates the individual subelements.
|
|
|
|
For instance, when merging the `spec` on a Deployment, the entire `spec` is
|
|
|
|
not replaced. Instead the subfields of `spec`, such as `replicas`, are compared
|
|
|
|
and merged.
|
|
|
|
|
|
|
|
### Merging changes to primitive fields
|
|
|
|
|
2017-02-02 02:09:08 +00:00
|
|
|
Primitive fields are replaced or cleared.
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< note >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
`-` is used for "not applicable" because the value is not used.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /note >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
| Field in object configuration file | Field in live object configuration | Field in last-applied-configuration | Action |
|
|
|
|
|-------------------------------------|------------------------------------|-------------------------------------|-------------------------------------------|
|
|
|
|
| Yes | Yes | - | Set live to configuration file value. |
|
|
|
|
| Yes | No | - | Set live to local configuration. |
|
|
|
|
| No | - | Yes | Clear from live configuration. |
|
|
|
|
| No | - | No | Do nothing. Keep live value. |
|
|
|
|
|
2017-02-02 02:09:08 +00:00
|
|
|
### Merging changes to map fields
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2018-02-05 17:15:26 +00:00
|
|
|
Fields that represent maps are merged by comparing each of the subfields or elements of the map:
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< note >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
`-` is used for "not applicable" because the value is not used.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /note >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
| Key in object configuration file | Key in live object configuration | Field in last-applied-configuration | Action |
|
|
|
|
|-------------------------------------|------------------------------------|-------------------------------------|----------------------------------|
|
|
|
|
| Yes | Yes | - | Compare sub fields values. |
|
|
|
|
| Yes | No | - | Set live to local configuration. |
|
|
|
|
| No | - | Yes | Delete from live configuration. |
|
|
|
|
| No | - | No | Do nothing. Keep live value. |
|
|
|
|
|
|
|
|
### Merging changes for fields of type list
|
|
|
|
|
|
|
|
Merging changes to a list uses one of three strategies:
|
|
|
|
|
2019-05-04 00:03:40 +00:00
|
|
|
* Replace the list if all its elements are primitives.
|
2017-01-22 19:48:07 +00:00
|
|
|
* Merge individual elements in a list of complex elements.
|
|
|
|
* Merge a list of primitive elements.
|
|
|
|
|
|
|
|
The choice of strategy is made on a per-field basis.
|
|
|
|
|
2019-05-04 00:03:40 +00:00
|
|
|
#### Replace the list if all its elements are primitives
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Treat the list the same as a primitive field. Replace or delete the
|
|
|
|
entire list. This preserves ordering.
|
|
|
|
|
|
|
|
**Example:** Use `kubectl apply` to update the `args` field of a Container in a Pod. This sets
|
|
|
|
the value of `args` in the live configuration to the value in the configuration file.
|
|
|
|
Any `args` elements that had previously been added to the live configuration are lost.
|
|
|
|
The order of the `args` elements defined in the configuration file is
|
|
|
|
retained in the live configuration.
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# last-applied-configuration value
|
2018-08-24 02:49:00 +00:00
|
|
|
args: ["a", "b"]
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
# configuration file value
|
|
|
|
args: ["a", "c"]
|
|
|
|
|
|
|
|
# live configuration
|
|
|
|
args: ["a", "b", "d"]
|
|
|
|
|
|
|
|
# result after merge
|
|
|
|
args: ["a", "c"]
|
|
|
|
```
|
|
|
|
|
|
|
|
**Explanation:** The merge used the configuration file value as the new list value.
|
|
|
|
|
|
|
|
#### Merge individual elements of a list of complex elements:
|
|
|
|
|
|
|
|
Treat the list as a map, and treat a specific field of each element as a key.
|
|
|
|
Add, delete, or update individual elements. This does not preserve ordering.
|
|
|
|
|
2017-02-01 20:23:23 +00:00
|
|
|
This merge strategy uses a special tag on each field called a `patchMergeKey`. The
|
|
|
|
`patchMergeKey` is defined for each field in the Kubernetes source code:
|
2018-12-05 16:19:26 +00:00
|
|
|
[types.go](https://github.com/kubernetes/api/blob/d04500c8c3dda9c980b668c57abc2ca61efcf5c4/core/v1/types.go#L2747)
|
2017-02-02 02:09:08 +00:00
|
|
|
When merging a list of maps, the field specified as the `patchMergeKey` for a given element
|
2017-01-22 19:48:07 +00:00
|
|
|
is used like a map key for that element.
|
|
|
|
|
|
|
|
**Example:** Use `kubectl apply` to update the `containers` field of a PodSpec.
|
2017-02-02 02:09:08 +00:00
|
|
|
This merges the list as though it was a map where each element is keyed
|
2017-01-22 19:48:07 +00:00
|
|
|
by `name`.
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# last-applied-configuration value
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:1.10
|
|
|
|
- name: nginx-helper-a # key: nginx-helper-a; will be deleted in result
|
|
|
|
image: helper:1.3
|
|
|
|
- name: nginx-helper-b # key: nginx-helper-b; will be retained
|
|
|
|
image: helper:1.3
|
|
|
|
|
|
|
|
# configuration file value
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
2018-03-18 04:55:59 +00:00
|
|
|
image: nginx:1.10
|
2017-01-22 19:48:07 +00:00
|
|
|
- name: nginx-helper-b
|
|
|
|
image: helper:1.3
|
|
|
|
- name: nginx-helper-c # key: nginx-helper-c; will be added in result
|
|
|
|
image: helper:1.3
|
|
|
|
|
|
|
|
# live configuration
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:1.10
|
|
|
|
- name: nginx-helper-a
|
|
|
|
image: helper:1.3
|
|
|
|
- name: nginx-helper-b
|
|
|
|
image: helper:1.3
|
|
|
|
args: ["run"] # Field will be retained
|
|
|
|
- name: nginx-helper-d # key: nginx-helper-d; will be retained
|
|
|
|
image: helper:1.3
|
|
|
|
|
|
|
|
# result after merge
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:1.10
|
|
|
|
# Element nginx-helper-a was deleted
|
|
|
|
- name: nginx-helper-b
|
|
|
|
image: helper:1.3
|
|
|
|
args: ["run"] # Field was retained
|
|
|
|
- name: nginx-helper-c # Element was added
|
|
|
|
image: helper:1.3
|
|
|
|
- name: nginx-helper-d # Element was ignored
|
|
|
|
image: helper:1.3
|
|
|
|
```
|
|
|
|
|
|
|
|
**Explanation:**
|
|
|
|
|
|
|
|
- The container named "nginx-helper-a" was deleted because no container
|
|
|
|
named "nginx-helper-a" appeared in the configuration file.
|
|
|
|
- The container named "nginx-helper-b" retained the changes to `args`
|
|
|
|
in the live configuration. `kubectl apply` was able to identify
|
|
|
|
that "nginx-helper-b" in the live configuration was the same
|
|
|
|
"nginx-helper-b" as in the configuration file, even though their fields
|
|
|
|
had different values (no `args` in the configuration file). This is
|
2017-02-01 20:23:23 +00:00
|
|
|
because the `patchMergeKey` field value (name) was identical in both.
|
2017-01-22 19:48:07 +00:00
|
|
|
- The container named "nginx-helper-c" was added because no container
|
|
|
|
with that name appeared in the live configuration, but one with
|
|
|
|
that name appeared in the configuration file.
|
|
|
|
- The container named "nginx-helper-d" was retained because
|
|
|
|
no element with that name appeared in the last-applied-configuration.
|
|
|
|
|
|
|
|
#### Merge a list of primitive elements
|
|
|
|
|
|
|
|
As of Kubernetes 1.5, merging lists of primitive elements is not supported.
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< note >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
Which of the above strategies is chosen for a given field is controlled by
|
2018-12-05 16:19:26 +00:00
|
|
|
the `patchStrategy` tag in [types.go](https://github.com/kubernetes/api/blob/d04500c8c3dda9c980b668c57abc2ca61efcf5c4/core/v1/types.go#L2748)
|
2017-01-22 19:48:07 +00:00
|
|
|
If no `patchStrategy` is specified for a field of type list, then
|
|
|
|
the list is replaced.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /note >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2018-05-05 16:00:51 +00:00
|
|
|
{{< comment >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
TODO(pwittrock): Uncomment this for 1.6
|
|
|
|
|
|
|
|
- Treat the list as a set of primitives. Replace or delete individual
|
|
|
|
elements. Does not preserve ordering. Does not preserve duplicates.
|
|
|
|
|
|
|
|
**Example:** Using apply to update the `finalizers` field of ObjectMeta
|
|
|
|
keeps elements added to the live configuration. Ordering of finalizers
|
|
|
|
is lost.
|
2018-05-05 16:00:51 +00:00
|
|
|
{{< /comment >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
## Default field values
|
|
|
|
|
|
|
|
The API server sets certain fields to default values in the live configuration if they are
|
|
|
|
not specified when the object is created.
|
|
|
|
|
2018-05-30 04:52:53 +00:00
|
|
|
Here's a configuration file for a Deployment. The file does not specify `strategy`:
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2018-07-10 15:56:25 +00:00
|
|
|
{{< codenew file="application/simple_deployment.yaml" >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
Create the object using `kubectl apply`:
|
|
|
|
|
|
|
|
```shell
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl apply -f https://k8s.io/examples/application/simple_deployment.yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Print the live configuration using `kubectl get`:
|
|
|
|
|
|
|
|
```shell
|
2018-07-10 15:56:25 +00:00
|
|
|
kubectl get -f https://k8s.io/examples/application/simple_deployment.yaml -o yaml
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The output shows that the API server set several fields to default values in the live
|
|
|
|
configuration. These fields were not specified in the configuration file.
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```yaml
|
2018-02-27 17:51:46 +00:00
|
|
|
apiVersion: apps/v1
|
2017-01-22 19:48:07 +00:00
|
|
|
kind: Deployment
|
|
|
|
# ...
|
|
|
|
spec:
|
2018-02-27 17:51:46 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: nginx
|
2017-01-22 19:48:07 +00:00
|
|
|
minReadySeconds: 5
|
|
|
|
replicas: 1 # defaulted by apiserver
|
|
|
|
strategy:
|
|
|
|
rollingUpdate: # defaulted by apiserver - derived from strategy.type
|
|
|
|
maxSurge: 1
|
|
|
|
maxUnavailable: 1
|
2019-10-24 03:11:07 +00:00
|
|
|
type: RollingUpdate # defaulted by apiserver
|
2017-01-22 19:48:07 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
creationTimestamp: null
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: nginx:1.7.9
|
|
|
|
imagePullPolicy: IfNotPresent # defaulted by apiserver
|
|
|
|
name: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
protocol: TCP # defaulted by apiserver
|
|
|
|
resources: {} # defaulted by apiserver
|
|
|
|
terminationMessagePath: /dev/termination-log # defaulted by apiserver
|
|
|
|
dnsPolicy: ClusterFirst # defaulted by apiserver
|
|
|
|
restartPolicy: Always # defaulted by apiserver
|
|
|
|
securityContext: {} # defaulted by apiserver
|
|
|
|
terminationGracePeriodSeconds: 30 # defaulted by apiserver
|
|
|
|
# ...
|
|
|
|
```
|
|
|
|
|
|
|
|
In a patch request, defaulted fields are not re-defaulted unless they are explicitly cleared
|
|
|
|
as part of a patch request. This can cause unexpected behavior for
|
|
|
|
fields that are defaulted based
|
|
|
|
on the values of other fields. When the other fields are later changed,
|
|
|
|
the values defaulted from them will not be updated unless they are
|
|
|
|
explicitly cleared.
|
|
|
|
|
|
|
|
For this reason, it is recommended that certain fields defaulted
|
|
|
|
by the server are explicitly defined in the configuration file, even
|
|
|
|
if the desired values match the server defaults. This makes it
|
|
|
|
easier to recognize conflicting values that will not be re-defaulted
|
|
|
|
by the server.
|
|
|
|
|
|
|
|
**Example:**
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# last-applied-configuration
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:1.7.9
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
|
|
|
|
# configuration file
|
|
|
|
spec:
|
|
|
|
strategy:
|
|
|
|
type: Recreate # updated value
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:1.7.9
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
|
|
|
|
# live configuration
|
|
|
|
spec:
|
|
|
|
strategy:
|
|
|
|
type: RollingUpdate # defaulted value
|
|
|
|
rollingUpdate: # defaulted value derived from type
|
|
|
|
maxSurge : 1
|
|
|
|
maxUnavailable: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:1.7.9
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
|
|
|
|
# result after merge - ERROR!
|
|
|
|
spec:
|
|
|
|
strategy:
|
|
|
|
type: Recreate # updated value: incompatible with rollingUpdate
|
|
|
|
rollingUpdate: # defaulted value: incompatible with "type: Recreate"
|
|
|
|
maxSurge : 1
|
|
|
|
maxUnavailable: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
|
|
|
image: nginx:1.7.9
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
```
|
|
|
|
|
|
|
|
**Explanation:**
|
|
|
|
|
|
|
|
1. The user creates a Deployment without defining `strategy.type`.
|
|
|
|
2. The server defaults `strategy.type` to `RollingUpdate` and defaults the
|
|
|
|
`strategy.rollingUpdate` values.
|
|
|
|
3. The user changes `strategy.type` to `Recreate`. The `strategy.rollingUpdate`
|
|
|
|
values remain at their defaulted values, though the server expects them to be cleared.
|
|
|
|
If the `strategy.rollingUpdate` values had been defined initially in the configuration file,
|
|
|
|
it would have been more clear that they needed to be deleted.
|
|
|
|
4. Apply fails because `strategy.rollingUpdate` is not cleared. The `strategy.rollingupdate`
|
|
|
|
field cannot be defined with a `strategy.type` of `Recreate`.
|
|
|
|
|
|
|
|
Recommendation: These fields should be explicitly defined in the object configuration file:
|
|
|
|
|
|
|
|
- Selectors and PodTemplate labels on workloads, such as Deployment, StatefulSet, Job, DaemonSet,
|
|
|
|
ReplicaSet, and ReplicationController
|
|
|
|
- Deployment rollout strategy
|
|
|
|
|
|
|
|
### How to clear server-defaulted fields or fields set by other writers
|
|
|
|
|
|
|
|
Fields that do not appear in the configuration file can be cleared by
|
|
|
|
setting their values to `null` and then applying the configuration file.
|
|
|
|
For fields defaulted by the server, this triggers re-defaulting
|
|
|
|
the values.
|
|
|
|
|
|
|
|
## How to change ownership of a field between the configuration file and direct imperative writers
|
|
|
|
|
|
|
|
These are the only methods you should use to change an individual object field:
|
|
|
|
|
|
|
|
- Use `kubectl apply`.
|
|
|
|
- Write directly to the live configuration without modifying the configuration file:
|
|
|
|
for example, use `kubectl scale`.
|
|
|
|
|
|
|
|
### Changing the owner from a direct imperative writer to a configuration file
|
|
|
|
|
|
|
|
Add the field to the configuration file. For the field, discontinue direct updates to
|
|
|
|
the live configuration that do not go through `kubectl apply`.
|
|
|
|
|
|
|
|
### Changing the owner from a configuration file to a direct imperative writer
|
|
|
|
|
|
|
|
As of Kubernetes 1.5, changing ownership of a field from a configuration file to
|
|
|
|
an imperative writer requires manual steps:
|
|
|
|
|
|
|
|
- Remove the field from the configuration file.
|
|
|
|
- Remove the field from the `kubectl.kubernetes.io/last-applied-configuration` annotation on the live object.
|
|
|
|
|
|
|
|
## Changing management methods
|
|
|
|
|
|
|
|
Kubernetes objects should be managed using only one method at a time.
|
|
|
|
Switching from one method to another is possible, but is a manual process.
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< note >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
It is OK to use imperative deletion with declarative management.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /note >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
2018-05-05 16:00:51 +00:00
|
|
|
{{< comment >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
TODO(pwittrock): We need to make using imperative commands with
|
|
|
|
declarative object configuration work so that it doesn't write the
|
|
|
|
fields to the annotation, and instead. Then add this bullet point.
|
|
|
|
|
|
|
|
- using imperative commands with declarative configuration to manage where each manages different fields.
|
2018-05-05 16:00:51 +00:00
|
|
|
{{< /comment >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
### Migrating from imperative command management to declarative object configuration
|
|
|
|
|
|
|
|
Migrating from imperative command management to declarative object
|
|
|
|
configuration involves several manual steps:
|
|
|
|
|
|
|
|
1. Export the live object to a local configuration file:
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```shell
|
2019-07-31 19:46:14 +00:00
|
|
|
kubectl get <kind>/<name> -o yaml > <kind>_<name>.yaml
|
2018-06-18 14:17:33 +00:00
|
|
|
```
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
1. Manually remove the `status` field from the configuration file.
|
|
|
|
|
2018-11-06 19:33:04 +00:00
|
|
|
{{< note >}}
|
|
|
|
This step is optional, as `kubectl apply` does not update the status field
|
|
|
|
even if it is present in the configuration file.
|
|
|
|
{{< /note >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
1. Set the `kubectl.kubernetes.io/last-applied-configuration` annotation on the object:
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```shell
|
|
|
|
kubectl replace --save-config -f <kind>_<name>.yaml
|
|
|
|
```
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
1. Change processes to use `kubectl apply` for managing the object exclusively.
|
|
|
|
|
2018-05-05 16:00:51 +00:00
|
|
|
{{< comment >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
TODO(pwittrock): Why doesn't export remove the status field? Seems like it should.
|
2018-05-05 16:00:51 +00:00
|
|
|
{{< /comment >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
### Migrating from imperative object configuration to declarative object configuration
|
|
|
|
|
|
|
|
1. Set the `kubectl.kubernetes.io/last-applied-configuration` annotation on the object:
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
```shell
|
|
|
|
kubectl replace --save-config -f <kind>_<name>.yaml
|
|
|
|
```
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
1. Change processes to use `kubectl apply` for managing the object exclusively.
|
|
|
|
|
|
|
|
## Defining controller selectors and PodTemplate labels
|
|
|
|
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< warning >}}
|
2018-11-06 19:33:04 +00:00
|
|
|
Updating selectors on controllers is strongly discouraged.
|
2018-06-18 14:17:33 +00:00
|
|
|
{{< /warning >}}
|
2017-01-22 19:48:07 +00:00
|
|
|
|
|
|
|
The recommended approach is to define a single, immutable PodTemplate label
|
|
|
|
used only by the controller selector with no other semantic meaning.
|
|
|
|
|
|
|
|
**Example:**
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2017-02-02 00:57:58 +00:00
|
|
|
controller-selector: "extensions/v1beta1/deployment/nginx"
|
2017-01-22 19:48:07 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2017-02-02 00:57:58 +00:00
|
|
|
controller-selector: "extensions/v1beta1/deployment/nginx"
|
2017-01-22 19:48:07 +00:00
|
|
|
```
|
|
|
|
|
2018-05-05 16:00:51 +00:00
|
|
|
{{% capture whatsnext %}}
|
2019-05-20 12:15:14 +00:00
|
|
|
|
|
|
|
* [Managing Kubernetes Objects Using Imperative Commands](/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
|
|
|
* [Imperative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
|
|
|
* [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl/)
|
|
|
|
* [Kubernetes API Reference](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
|
|
|
|
2018-05-05 16:00:51 +00:00
|
|
|
{{% /capture %}}
|