diff --git a/Makefile b/Makefile index 56359bd32b..75d37f767d 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,10 @@ serve: ## Boot the development server. hugo server --buildFuture docker-image: - $(DOCKER) build . --tag $(DOCKER_IMAGE) --build-arg HUGO_VERSION=$(HUGO_VERSION) + $(DOCKER) build . \ + --network=host \ + --tag $(DOCKER_IMAGE) \ + --build-arg HUGO_VERSION=$(HUGO_VERSION) docker-build: $(DOCKER_RUN) $(DOCKER_IMAGE) hugo diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 36fc29754e..a3ea95ab8a 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -41,7 +41,6 @@ aliases: sig-docs-en-owners: # Admins for English content - bradtopol - daminisatya - - jaredbhatti - jimangel - kbarnard10 - kbhawkey @@ -59,7 +58,6 @@ aliases: sig-docs-en-reviews: # PR reviews for English content - bradtopol - daminisatya - - jaredbhatti - jimangel - kbarnard10 - kbhawkey diff --git a/assets/sass/_base.sass b/assets/sass/_base.sass index 759067e8a2..c8dedc0a72 100644 --- a/assets/sass/_base.sass +++ b/assets/sass/_base.sass @@ -439,6 +439,7 @@ footer width: 100% background-image: url(/images/texture.png) background-color: $dark-grey + overflow-x: hidden .main-section padding: 20px 0 @@ -1214,7 +1215,7 @@ $feature-box-div-margin-bottom: 40px margin-bottom: 20px #desktopKCButton - position: relative + position: absolute font-size: 18px background-color: $dark-grey border-radius: 8px diff --git a/content/en/blog/_index.md b/content/en/blog/_index.md index 2d534508aa..a16a4ffe49 100644 --- a/content/en/blog/_index.md +++ b/content/en/blog/_index.md @@ -8,3 +8,9 @@ menu: post: >

Read the latest news for Kubernetes and the containers space in general, and get technical how-tos hot off the presses.

--- +{{< comment >}} + +For information about contributing to the blog, see +https://kubernetes.io/docs/contribute/new-content/blogs-case-studies/#write-a-blog-post + +{{< /comment >}} diff --git a/content/en/blog/_posts/2018-04-13-local-persistent-volumes-beta.md b/content/en/blog/_posts/2018-04-13-local-persistent-volumes-beta.md index 42f9b60e66..71a0fa26d9 100644 --- a/content/en/blog/_posts/2018-04-13-local-persistent-volumes-beta.md +++ b/content/en/blog/_posts/2018-04-13-local-persistent-volumes-beta.md @@ -144,7 +144,7 @@ The local persistent volume beta feature is not complete by far. Some notable en [Pod disruption budget](/docs/concepts/workloads/pods/disruptions/) is also very important for those workloads that must maintain quorum. Setting a disruption budget for your workload ensures that it does not drop below quorum due to voluntary disruption events, such as node drains during upgrade. -[Pod affinity and anti-affinity](/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) ensures that your workloads stay either co-located or spread out across failure domains. If you have multiple local persistent volumes available on a single node, it may be preferable to specify an pod anti-affinity policy to spread your workload across nodes. Note that if you want multiple pods to share the same local persistent volume, you do not need to specify a pod affinity policy. The scheduler understands the locality constraints of the local persistent volume and schedules your pod to the correct node. +[Pod affinity and anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) ensures that your workloads stay either co-located or spread out across failure domains. If you have multiple local persistent volumes available on a single node, it may be preferable to specify an pod anti-affinity policy to spread your workload across nodes. Note that if you want multiple pods to share the same local persistent volume, you do not need to specify a pod affinity policy. The scheduler understands the locality constraints of the local persistent volume and schedules your pod to the correct node. ## Getting involved diff --git a/content/en/blog/_posts/2018-10-10-runtimeclass.md b/content/en/blog/_posts/2018-10-10-runtimeclass.md index 6a889ada70..5c2ba7208b 100644 --- a/content/en/blog/_posts/2018-10-10-runtimeclass.md +++ b/content/en/blog/_posts/2018-10-10-runtimeclass.md @@ -27,7 +27,7 @@ Why is RuntimeClass a pod level concept? The Kubernetes resource model expects c ## What's next? -The RuntimeClass resource is an important foundation for surfacing runtime properties to the control plane. For example, to implement scheduler support for clusters with heterogeneous nodes supporting different runtimes, we might add [NodeAffinity](/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) terms to the RuntimeClass definition. Another area to address is managing the variable resource requirements to run pods of different runtimes. The [Pod Overhead proposal](https://docs.google.com/document/d/1EJKT4gyl58-kzt2bnwkv08MIUZ6lkDpXcxkHqCvvAp4/preview) was an early take on this that aligns nicely with the RuntimeClass design, and may be pursued further. +The RuntimeClass resource is an important foundation for surfacing runtime properties to the control plane. For example, to implement scheduler support for clusters with heterogeneous nodes supporting different runtimes, we might add [NodeAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) terms to the RuntimeClass definition. Another area to address is managing the variable resource requirements to run pods of different runtimes. The [Pod Overhead proposal](https://docs.google.com/document/d/1EJKT4gyl58-kzt2bnwkv08MIUZ6lkDpXcxkHqCvvAp4/preview) was an early take on this that aligns nicely with the RuntimeClass design, and may be pursued further. Many other RuntimeClass extensions have also been proposed, and will be revisited as the feature continues to develop and mature. A few more extensions that are being considered include: diff --git a/content/en/case-studies/babylon/babylon-featured.svg b/content/en/case-studies/babylon/babylon-featured.svg deleted file mode 100644 index fc2431a270..0000000000 --- a/content/en/case-studies/babylon/babylon-featured.svg +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/content/en/case-studies/babylon/babylon_featured.svg b/content/en/case-studies/babylon/babylon_featured_logo.svg similarity index 100% rename from content/en/case-studies/babylon/babylon_featured.svg rename to content/en/case-studies/babylon/babylon_featured_logo.svg diff --git a/content/en/case-studies/babylon/index.html b/content/en/case-studies/babylon/index.html index ab7874a2fb..afdc005411 100644 --- a/content/en/case-studies/babylon/index.html +++ b/content/en/case-studies/babylon/index.html @@ -4,7 +4,7 @@ linkTitle: Babylon case_study_styles: true cid: caseStudies css: /css/case-studies-gradient.css -logo: babylon_featured_logo.png +logo: babylon_featured_logo.svg featured: true weight: 1 quote: > diff --git a/content/en/case-studies/booking-com/booking.com_featured_logo.png b/content/en/case-studies/booking-com/booking.com_featured_logo.png new file mode 100644 index 0000000000..623ca67345 Binary files /dev/null and b/content/en/case-studies/booking-com/booking.com_featured_logo.png differ diff --git a/content/en/case-studies/booking-com/booking.com_featured_logo.svg b/content/en/case-studies/booking-com/booking.com_featured_logo.svg new file mode 100644 index 0000000000..298c77c773 --- /dev/null +++ b/content/en/case-studies/booking-com/booking.com_featured_logo.svg @@ -0,0 +1 @@ +booking.com_featured_logo \ No newline at end of file diff --git a/content/en/case-studies/booking-com/index.html b/content/en/case-studies/booking-com/index.html new file mode 100644 index 0000000000..ffeb3f2707 --- /dev/null +++ b/content/en/case-studies/booking-com/index.html @@ -0,0 +1,117 @@ +--- +title: Booking.com Case Study +linkTitle: Booking.com +case_study_styles: true +cid: caseStudies +css: /css/case-studies-gradient.css +logo: booking.com_featured_logo.png +featured: true +weight: 3 +quote: > + We realized that we needed to learn Kubernetes better in order to fully use the potential of it. At that point, we made the shift to build our own Kubernetes platform. +--- + +​ + + +
+

CASE STUDY: Booking.com

+
After Learning the Ropes with a Kubernetes Distribution, Booking.com Built a Platform of Its Own
+
+​ +​ +
+ Company  Booking.com     Location  Netherlands     Industry  Travel +
+​ +
+
+
+
+

Challenge

+ In 2016, Booking.com migrated to an OpenShift platform, which gave product developers faster access to infrastructure. But because Kubernetes was abstracted away from the developers, the infrastructure team became a “knowledge bottleneck” when challenges arose. Trying to scale that support wasn’t sustainable. + + +

Solution

+ After a year operating OpenShift, the platform team decided to build its own vanilla Kubernetes platform—and ask developers to learn some Kubernetes in order to use it. “This is not a magical platform,” says Ben Tyler, Principal Developer, B Platform Track. “We’re not claiming that you can just use it with your eyes closed. Developers need to do some learning, and we’re going to do everything we can to make sure they have access to that knowledge.” +​ +

Impact

+ Despite the learning curve, there’s been a great uptick in adoption of the new Kubernetes platform. Before containers, creating a new service could take a couple of days if the developers understood Puppet, or weeks if they didn’t. On the new platform, it can take as few as 10 minutes. About 500 new services were built on the platform in the first 8 months. +
+
+
+
+
+ “As our users learn Kubernetes and become more sophisticated Kubernetes users, they put pressure on us to provide a better, more native Kubernetes experience, which is great. It’s a super healthy dynamic.” +

- BEN TYLER, PRINCIPAL DEVELOPER, B PLATFORM TRACK AT BOOKING.COM

+
+
+​ +​ +
+
+

Booking.com has a long history with Kubernetes: In 2015, a team at the travel platform prototyped a container platform based on Mesos and Marathon. +

+ +

Impressed by what the technology offered, but in need of enterprise features at its scale—the site handles more than 1.5 million room-night reservations a day on average—the team decided to adopt an OpenShift platform.

+ +

This platform, which was wrapped in a Heroku-style, high-level CLI interface, “was definitely popular with our product developers,” says Ben Tyler, Principal Developer, B Platform Track. “We gave them faster access to infrastructure.”

+ +

But, he adds, “anytime something went slightly off the rails, developers didn’t have any of the knowledge required to support themselves.”

+ +

And after a year of operating this platform, the infrastructure team found that it had become “a knowledge bottleneck,” he says. “Most of the developers who used it did not know it was Kubernetes underneath. An application failure and a platform failure both looked like failures of that Heroku-style tool.”

+

+ Scaling the necessary support did not seem feasible or sustainable, so the platform team needed a new solution. The understanding of Kubernetes that they had gained operating the OpenShift platform gave them confidence to build a vanilla Kubernetes platform of their own and customize it to suit the company’s needs.

+ + +
+
+​ +
+
+ “For entering the landscape, OpenShift was definitely very helpful. It shows you what the technology can do, and it makes it easy for you to use it. After we spent some time on it, we realized that we needed to learn Kubernetes better in order to fully use the potential of it. At that point, we made the shift to build our own Kubernetes platform. We definitely benefit in the long term for taking that step and investing the time in gaining that knowledge.”

- EDUARD IACOBOAIA, SENIOR SYSTEM ADMINISTRATOR, B PLATFORM TRACK AT BOOKING.COM

+
+
+​ +
+
+

+ “For entering the landscape, OpenShift was definitely very helpful,” says Eduard Iacoboaia, Senior System Administrator, B Platform Track. “It shows you what the technology can do, and it makes it easy for you to use it. After we spent some time on it, we realized that we needed to learn Kubernetes better in order to fully use the potential of it. At that point, we made the shift to build our own Kubernetes platform. We definitely benefit in the long term for taking that step and investing the time in gaining that knowledge.”

+

+ Iacoboaia’s team had customized a lot of OpenShift tools to make them work at Booking.com, and “those integrations points were kind of fragile,” he says. “We spent much more time understanding all the components of Kubernetes, how they work, how they interact with each other.” That research led the team to switch from OpenShift’s built-in Ansible playbooks to Puppet deployments, which are used for the rest of Booking’s infrastructure. The control plane was also moved from inside the cluster onto bare metal, as the company runs tens of thousands of bare-metal servers and a large infrastructure for running applications on bare metal. (Booking runs Kubernetes in multiple clusters in multiple data centers across the various regions where it has compute.) “We decided to keep it as simple as possible and to also use the tools that we know best,” says Iacoboaia.

+

+ The other big change was that product engineers would have to learn Kubernetes in order to onboard. “This is not a magical platform,” says Tyler. “We’re not claiming that you can just use it with your eyes closed. Developers need to do some learning, and we’re going to do everything we can to make sure they have access to that knowledge.” That includes trainings, blog posts, videos, and Udemy courses.

+

+ Despite the learning curve, there’s been a great uptick in adoption of the new Kubernetes platform. “I think the reason we’ve been able to strike this bargain successfully is that we’re not asking them to learn a proprietary app system,” says Tyler. “We’re asking them to learn something that’s open source, where the knowledge is transferable. They’re investing in their own careers by learning Kubernetes.”

+

+ One clear sign that this strategy has been a success is that in the support channel, when users have questions, other product engineers are jumping in to respond. “I haven’t seen that kind of community engagement around a particular platform product internally before,” says Tyler. “It helps a lot that it’s visibly an ecosystem standard outside of the company, so people feel value in investing in that knowledge and sharing it with others, which is really, really powerful.”

+ + +
+
+​ +​ +
+
+ “We have a tutorial. You follow the tutorial. Your code is running. Then, it’s business-logic time. The time to gain access to resources is decreased enormously.”

- BEN TYLER, PRINCIPAL DEVELOPER, B PLATFORM TRACK AT BOOKING.COM

+
+
+​ +
+
+

+ There’s other quantifiable evidence too: Before containers, creating a new service could take a couple of days if the developers understood Puppet, or weeks if they didn’t. On the new platform, it takes 10 minutes. “We have a tutorial. You follow the tutorial. Your code is running. Then, it’s business-logic time,” says Tyler. “The time to gain access to resources is decreased enormously.” About 500 new services were built in the first 8 months on the platform, with hundreds of releases per day.

+

+ The platform offers different “layers of contracts, so to speak,” says Tyler. “At the very base, it’s just Kubernetes. If you’re a pro Kubernetes user, here’s a Kubernetes API, just like you get from GKE or AKS. We’re trying to be a provider on that same level. But our whole job inside the company is to be a bigger value add than just vanilla infrastructure, so we provide a set of base images for our main stacks, Perl and Java.” +

+

+ And “as our users learn Kubernetes and become more sophisticated Kubernetes users, they put pressure on us to provide a better more native Kubernetes experience, which is great,” says Tyler. “It’s a super healthy dynamic.”

+

+ The platform also includes other CNCF technologies, such as Envoy, Helm, and Prometheus. Most of the critical service traffic for Booking.com is routed through Envoy, and Prometheus is used primarily to monitor infrastructure components. Helm is consumed as a packaging standard. The team also developed and open sourced Shipper, an extension for Kubernetes to add more complex rollout strategies and multi-cluster orchestration. +

+

+ To be sure, there have been internal discussions about the wisdom of building a Kubernetes platform from the ground up. “This is not really our core competency—Kubernetes and travel, they’re kind of far apart, right?” says Tyler. “But we’ve made a couple of bets on CNCF components that have worked out really well for us. Envoy and Kubernetes, in particular, have been really beneficial to our organization. We were able to customize them, either because we could look at the source code or because they had extension points, and we were able to get value out of them very quickly without having to change any paradigms internally.” +

+
+
+ diff --git a/content/en/case-studies/booz-allen/booz-allen_featured_logo.png b/content/en/case-studies/booz-allen/booz-allen_featured_logo.png new file mode 100644 index 0000000000..f9bc64ba3b Binary files /dev/null and b/content/en/case-studies/booz-allen/booz-allen_featured_logo.png differ diff --git a/content/en/case-studies/booz-allen/index.html b/content/en/case-studies/booz-allen/index.html index 8195a62ffe..8b82ef3787 100644 --- a/content/en/case-studies/booz-allen/index.html +++ b/content/en/case-studies/booz-allen/index.html @@ -4,7 +4,11 @@ linkTitle: booz-allen case_study_styles: true cid: caseStudies css: /css/case-studies-gradient.css -featured: false +logo: booz-allen_featured_logo.png +featured: true +weight: 2 +quote: > + Kubernetes is a great solution for us. It allows us to rapidly iterate on our clients’ demands. --- ​ diff --git a/content/en/case-studies/ccp-games/ccp_featured.svg b/content/en/case-studies/ccp-games/ccp_featured.svg deleted file mode 100644 index e6313711d7..0000000000 --- a/content/en/case-studies/ccp-games/ccp_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos \ No newline at end of file diff --git a/content/en/case-studies/ccp-games/ccp_logo.png b/content/en/case-studies/ccp-games/ccp_logo.png deleted file mode 100644 index cbf3d267ba..0000000000 Binary files a/content/en/case-studies/ccp-games/ccp_logo.png and /dev/null differ diff --git a/content/en/case-studies/ccp-games/index.html b/content/en/case-studies/ccp-games/index.html deleted file mode 100644 index 8867cbb323..0000000000 --- a/content/en/case-studies/ccp-games/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: CCP Games -content_url: https://cloud.google.com/customers/ccp-games/ ---- \ No newline at end of file diff --git a/content/en/case-studies/comcast/comcast_featured.svg b/content/en/case-studies/comcast/comcast_featured.svg deleted file mode 100644 index 04d4ea70e2..0000000000 --- a/content/en/case-studies/comcast/comcast_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos \ No newline at end of file diff --git a/content/en/case-studies/comcast/comcast_logo.png b/content/en/case-studies/comcast/comcast_logo.png deleted file mode 100644 index 3f0ef76645..0000000000 Binary files a/content/en/case-studies/comcast/comcast_logo.png and /dev/null differ diff --git a/content/en/case-studies/comcast/index.html b/content/en/case-studies/comcast/index.html deleted file mode 100644 index 7ace6a246d..0000000000 --- a/content/en/case-studies/comcast/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Comcast -content_url: https://youtu.be/lmeFkH-rHII ---- \ No newline at end of file diff --git a/content/en/case-studies/concur/concur_featured_logo.png b/content/en/case-studies/concur/concur_featured_logo.png deleted file mode 100644 index 473427a3ba..0000000000 Binary files a/content/en/case-studies/concur/concur_featured_logo.png and /dev/null differ diff --git a/content/en/case-studies/concur/concur_featured_logo.svg b/content/en/case-studies/concur/concur_featured_logo.svg deleted file mode 100644 index 3b05edd28e..0000000000 --- a/content/en/case-studies/concur/concur_featured_logo.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos \ No newline at end of file diff --git a/content/en/case-studies/concur/index.html b/content/en/case-studies/concur/index.html deleted file mode 100644 index 0bb619f527..0000000000 --- a/content/en/case-studies/concur/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Concur -content_url: http://searchitoperations.techtarget.com/news/450297178/Tech-firms-roll-out-Kubernetes-in-production ---- \ No newline at end of file diff --git a/content/en/case-studies/ebay/ebay_featured.png b/content/en/case-studies/ebay/ebay_featured.png deleted file mode 100644 index 4ad17a4af5..0000000000 Binary files a/content/en/case-studies/ebay/ebay_featured.png and /dev/null differ diff --git a/content/en/case-studies/ebay/ebay_featured.svg b/content/en/case-studies/ebay/ebay_featured.svg deleted file mode 100644 index 18ffbdd040..0000000000 --- a/content/en/case-studies/ebay/ebay_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos \ No newline at end of file diff --git a/content/en/case-studies/ebay/ebay_logo.png b/content/en/case-studies/ebay/ebay_logo.png deleted file mode 100644 index 830913c52b..0000000000 Binary files a/content/en/case-studies/ebay/ebay_logo.png and /dev/null differ diff --git a/content/en/case-studies/ebay/index.html b/content/en/case-studies/ebay/index.html deleted file mode 100644 index e0bf4f6e97..0000000000 --- a/content/en/case-studies/ebay/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Ebay -content_url: http://www.nextplatform.com/2015/11/12/inside-ebays-shift-to-kubernetes-and-containers-atop-openstack/ ---- \ No newline at end of file diff --git a/content/en/case-studies/goldman-sachs/gs_featured.svg b/content/en/case-studies/goldman-sachs/gs_featured.svg deleted file mode 100644 index be3ed65a78..0000000000 --- a/content/en/case-studies/goldman-sachs/gs_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos \ No newline at end of file diff --git a/content/en/case-studies/goldman-sachs/gs_logo.png b/content/en/case-studies/goldman-sachs/gs_logo.png deleted file mode 100644 index 5cc8c14566..0000000000 Binary files a/content/en/case-studies/goldman-sachs/gs_logo.png and /dev/null differ diff --git a/content/en/case-studies/goldman-sachs/index.html b/content/en/case-studies/goldman-sachs/index.html deleted file mode 100644 index 93d3022d12..0000000000 --- a/content/en/case-studies/goldman-sachs/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Goldman Sachs -content_url: http://blogs.wsj.com/cio/2016/02/24/big-changes-in-goldmans-software-emerge-from-small-containers/ ---- \ No newline at end of file diff --git a/content/en/case-studies/homeoffice/homeoffice_featured.svg b/content/en/case-studies/homeoffice/homeoffice_featured.svg deleted file mode 100644 index 88293794e8..0000000000 --- a/content/en/case-studies/homeoffice/homeoffice_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos \ No newline at end of file diff --git a/content/en/case-studies/homeoffice/homeoffice_logo.png b/content/en/case-studies/homeoffice/homeoffice_logo.png deleted file mode 100644 index 35d9722611..0000000000 Binary files a/content/en/case-studies/homeoffice/homeoffice_logo.png and /dev/null differ diff --git a/content/en/case-studies/homeoffice/index.html b/content/en/case-studies/homeoffice/index.html deleted file mode 100644 index 589c7507d4..0000000000 --- a/content/en/case-studies/homeoffice/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Home Office UK -content_url: https://www.youtube.com/watch?v=F3iMkz_NSvU ---- diff --git a/content/en/case-studies/jd/index.html b/content/en/case-studies/jd/index.html deleted file mode 100644 index ee61da9d14..0000000000 --- a/content/en/case-studies/jd/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: JD.COM -content_url: https://kubernetes.io/blog/2017/02/inside-jd-com-shift-to-kubernetes-from-openstack ---- \ No newline at end of file diff --git a/content/en/case-studies/jd/jd.com_featured_logo.svg b/content/en/case-studies/jd/jd.com_featured_logo.svg deleted file mode 100644 index d13de0240a..0000000000 --- a/content/en/case-studies/jd/jd.com_featured_logo.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos \ No newline at end of file diff --git a/content/en/case-studies/jd/jd_logo.png b/content/en/case-studies/jd/jd_logo.png deleted file mode 100644 index 58ef32a322..0000000000 Binary files a/content/en/case-studies/jd/jd_logo.png and /dev/null differ diff --git a/content/en/case-studies/liveperson/index.html b/content/en/case-studies/liveperson/index.html deleted file mode 100644 index 0cadb0f274..0000000000 --- a/content/en/case-studies/liveperson/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: LivePerson -content_url: https://www.openstack.org/videos/video/running-kubernetes-on-openstack-at-liveperson ---- \ No newline at end of file diff --git a/content/en/case-studies/liveperson/liveperson_featured.svg b/content/en/case-studies/liveperson/liveperson_featured.svg deleted file mode 100644 index b7e9b72b1e..0000000000 --- a/content/en/case-studies/liveperson/liveperson_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos-ancestry \ No newline at end of file diff --git a/content/en/case-studies/liveperson/liveperson_logo.png b/content/en/case-studies/liveperson/liveperson_logo.png deleted file mode 100644 index b7e63d94f7..0000000000 Binary files a/content/en/case-studies/liveperson/liveperson_logo.png and /dev/null differ diff --git a/content/en/case-studies/monzo/index.html b/content/en/case-studies/monzo/index.html deleted file mode 100644 index 99d4f35934..0000000000 --- a/content/en/case-studies/monzo/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Monzo -content_url: https://youtu.be/YkOY7DgXKyw ---- \ No newline at end of file diff --git a/content/en/case-studies/monzo/monzo_featured.svg b/content/en/case-studies/monzo/monzo_featured.svg deleted file mode 100644 index f4c8ee6bee..0000000000 --- a/content/en/case-studies/monzo/monzo_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos \ No newline at end of file diff --git a/content/en/case-studies/monzo/monzo_logo.png b/content/en/case-studies/monzo/monzo_logo.png deleted file mode 100644 index 854409d17e..0000000000 Binary files a/content/en/case-studies/monzo/monzo_logo.png and /dev/null differ diff --git a/content/en/case-studies/nav/index.html b/content/en/case-studies/nav/index.html index 5ec525a047..d4cc89590d 100644 --- a/content/en/case-studies/nav/index.html +++ b/content/en/case-studies/nav/index.html @@ -5,11 +5,7 @@ linkTitle: Nav case_study_styles: true cid: caseStudies css: /css/style_case_studies.css -logo: nav_featured_logo.png -featured: true -weight: 3 -quote: > - The community is absolutely vital: being able to pass ideas around, talk about a lot of the similar challenges that we’re all facing, and just get help. I like that we’re able to tackle the same problems for different reasons but help each other along the way. +featured: false ---
diff --git a/content/en/case-studies/philips/index.html b/content/en/case-studies/philips/index.html deleted file mode 100644 index e45d41a776..0000000000 --- a/content/en/case-studies/philips/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Philips -content_url: https://cloud.google.com/customers/philips/ ---- \ No newline at end of file diff --git a/content/en/case-studies/philips/philips_logo.png b/content/en/case-studies/philips/philips_logo.png deleted file mode 100644 index 9ba3421a61..0000000000 Binary files a/content/en/case-studies/philips/philips_logo.png and /dev/null differ diff --git a/content/en/case-studies/philips/philips_logo.svg b/content/en/case-studies/philips/philips_logo.svg deleted file mode 100644 index 3a59825b21..0000000000 --- a/content/en/case-studies/philips/philips_logo.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos2 \ No newline at end of file diff --git a/content/en/case-studies/pokemon-go/index.html b/content/en/case-studies/pokemon-go/index.html deleted file mode 100644 index ed4e168019..0000000000 --- a/content/en/case-studies/pokemon-go/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Pokemon GO -content_url: https://cloudplatform.googleblog.com/2016/09/bringing-Pokemon-GO-to-life-on-Google-Cloud.html ---- \ No newline at end of file diff --git a/content/en/case-studies/pokemon-go/pokemon_go_featured.svg b/content/en/case-studies/pokemon-go/pokemon_go_featured.svg deleted file mode 100644 index dc5fef2b56..0000000000 --- a/content/en/case-studies/pokemon-go/pokemon_go_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos2 \ No newline at end of file diff --git a/content/en/case-studies/pokemon-go/pokemon_go_logo.png b/content/en/case-studies/pokemon-go/pokemon_go_logo.png deleted file mode 100644 index 3cf2b5c7ef..0000000000 Binary files a/content/en/case-studies/pokemon-go/pokemon_go_logo.png and /dev/null differ diff --git a/content/en/case-studies/samsung-sds/index.html b/content/en/case-studies/samsung-sds/index.html deleted file mode 100644 index db4aa479ab..0000000000 --- a/content/en/case-studies/samsung-sds/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Samsung SDS -content_url: http://www.nextplatform.com/2016/05/24/samsung-experts-put-kubernetes-paces/ ---- \ No newline at end of file diff --git a/content/en/case-studies/samsung-sds/sds_featured.svg b/content/en/case-studies/samsung-sds/sds_featured.svg deleted file mode 100644 index 87bf7ab647..0000000000 --- a/content/en/case-studies/samsung-sds/sds_featured.svg +++ /dev/null @@ -1 +0,0 @@ -Samsung SDS (member) logo \ No newline at end of file diff --git a/content/en/case-studies/samsung-sds/sds_logo.png b/content/en/case-studies/samsung-sds/sds_logo.png deleted file mode 100644 index 0a172df65d..0000000000 Binary files a/content/en/case-studies/samsung-sds/sds_logo.png and /dev/null differ diff --git a/content/en/case-studies/sap/index.html b/content/en/case-studies/sap/index.html deleted file mode 100644 index 856dc8be9d..0000000000 --- a/content/en/case-studies/sap/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: SAP -content_url: https://youtu.be/4gyeixJLabo ---- \ No newline at end of file diff --git a/content/en/case-studies/sap/sap_featured.svg b/content/en/case-studies/sap/sap_featured.svg deleted file mode 100644 index d7cc45f617..0000000000 --- a/content/en/case-studies/sap/sap_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos2 \ No newline at end of file diff --git a/content/en/case-studies/sap/sap_logo.png b/content/en/case-studies/sap/sap_logo.png deleted file mode 100644 index 681a3fe5cf..0000000000 Binary files a/content/en/case-studies/sap/sap_logo.png and /dev/null differ diff --git a/content/en/case-studies/sap/sap_small.png b/content/en/case-studies/sap/sap_small.png deleted file mode 100644 index ada89de759..0000000000 Binary files a/content/en/case-studies/sap/sap_small.png and /dev/null differ diff --git a/content/en/case-studies/soundcloud/index.html b/content/en/case-studies/soundcloud/index.html deleted file mode 100644 index 50611ffd85..0000000000 --- a/content/en/case-studies/soundcloud/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Soundcloud -content_url: https://www.youtube.com/watch?v=5378N5iLb2Q ---- \ No newline at end of file diff --git a/content/en/case-studies/soundcloud/soundcloud_featured.svg b/content/en/case-studies/soundcloud/soundcloud_featured.svg deleted file mode 100644 index 06e6da66d5..0000000000 --- a/content/en/case-studies/soundcloud/soundcloud_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos2 \ No newline at end of file diff --git a/content/en/case-studies/soundcloud/soundcloud_logo.png b/content/en/case-studies/soundcloud/soundcloud_logo.png deleted file mode 100644 index f8c12f05b5..0000000000 Binary files a/content/en/case-studies/soundcloud/soundcloud_logo.png and /dev/null differ diff --git a/content/en/case-studies/spotify/index.html b/content/en/case-studies/spotify/index.html index 67f2c848ee..85e7fc1e86 100644 --- a/content/en/case-studies/spotify/index.html +++ b/content/en/case-studies/spotify/index.html @@ -4,11 +4,7 @@ linkTitle: Spotify case_study_styles: true cid: caseStudies css: /css/style_case_studies.css -logo: spotify_featured_logo.png -featured: true -weight: 2 -quote: > - We saw the amazing community that’s grown up around Kubernetes, and we wanted to be part of that. We wanted to benefit from added velocity and reduced cost, and also align with the rest of the industry on best practices and tools. +featured: false ---
diff --git a/content/en/case-studies/wepay/index.html b/content/en/case-studies/wepay/index.html deleted file mode 100644 index b8ce8201d5..0000000000 --- a/content/en/case-studies/wepay/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: WePay -content_url: http://thenewstack.io/wepay-kubernetes-changed-business/ ---- \ No newline at end of file diff --git a/content/en/case-studies/wepay/wepay_featured.svg b/content/en/case-studies/wepay/wepay_featured.svg deleted file mode 100644 index 102b40e212..0000000000 --- a/content/en/case-studies/wepay/wepay_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos2 \ No newline at end of file diff --git a/content/en/case-studies/wepay/wepay_logo.png b/content/en/case-studies/wepay/wepay_logo.png deleted file mode 100644 index 4e35dd8fd6..0000000000 Binary files a/content/en/case-studies/wepay/wepay_logo.png and /dev/null differ diff --git a/content/en/case-studies/zulily/index.html b/content/en/case-studies/zulily/index.html deleted file mode 100644 index a9e480ea97..0000000000 --- a/content/en/case-studies/zulily/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Zulily -content_url: https://www.youtube.com/embed/of45hYbkIZs ---- \ No newline at end of file diff --git a/content/en/case-studies/zulily/zulily_featured.png b/content/en/case-studies/zulily/zulily_featured.png deleted file mode 100644 index 81179f36d2..0000000000 Binary files a/content/en/case-studies/zulily/zulily_featured.png and /dev/null differ diff --git a/content/en/case-studies/zulily/zulily_featured.svg b/content/en/case-studies/zulily/zulily_featured.svg deleted file mode 100644 index b2c6ce5da4..0000000000 --- a/content/en/case-studies/zulily/zulily_featured.svg +++ /dev/null @@ -1 +0,0 @@ -kubernetes.io-logos2 \ No newline at end of file diff --git a/content/en/case-studies/zulily/zulily_logo.png b/content/en/case-studies/zulily/zulily_logo.png deleted file mode 100644 index e144c7897b..0000000000 Binary files a/content/en/case-studies/zulily/zulily_logo.png and /dev/null differ diff --git a/content/en/docs/concepts/architecture/nodes.md b/content/en/docs/concepts/architecture/nodes.md index 6e62881451..62bb4da2f4 100644 --- a/content/en/docs/concepts/architecture/nodes.md +++ b/content/en/docs/concepts/architecture/nodes.md @@ -9,32 +9,132 @@ weight: 10 {{% capture overview %}} -A node is a worker machine in Kubernetes, previously known as a `minion`. A node -may be a VM or physical machine, depending on the cluster. Each node contains -the services necessary to run [pods](/docs/concepts/workloads/pods/pod/) and is managed by the master -components. The services on a node include the [container runtime](/docs/concepts/overview/components/#container-runtime), kubelet and kube-proxy. See -[The Kubernetes Node](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md#the-kubernetes-node) section in the -architecture design doc for more details. +Kubernetes runs your workload by placing containers into Pods to run on _Nodes_. +A node may be a virtual or physical machine, depending on the cluster. Each node +contains the services necessary to run +{{< glossary_tooltip text="Pods" term_id="pod" >}}, managed by the +{{< glossary_tooltip text="control plane" term_id="control-plane" >}}. + +Typically you have several nodes in a cluster; in a learning or resource-limited +environment, you might have just one. + +The [components](/docs/concepts/overview/components/#node-components) on a node include the +{{< glossary_tooltip text="kubelet" term_id="kubelet" >}}, a +{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}, and the +{{< glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}}. {{% /capture %}} - {{% capture body %}} -## Node Status +## Management -A node's status contains the following information: +There are two main ways to have Nodes added to the {{< glossary_tooltip text="API server" term_id="kube-apiserver" >}}: + +1. The kubelet on a node self-registers to the control plane +2. You, or another human user, manually add a Node object + +After you create a Node object, or the kubelet on a node self-registers, the +control plane checks whether the new Node object is valid. For example, if you +try to create a Node from the following JSON manifest: + +```json +{ + "kind": "Node", + "apiVersion": "v1", + "metadata": { + "name": "10.240.79.157", + "labels": { + "name": "my-first-k8s-node" + } + } +} +``` + +Kubernetes creates a Node object internally (the representation). Kubernetes checks +that a kubelet has registered to the API server that matches the `metadata.name` +field of the Node. If the node is healthy (if all necessary services are running), +it is eligible to run a Pod. Otherwise, that node is ignored for any cluster activity +until it becomes healthy. + +{{< note >}} +Kubernetes keeps the object for the invalid Node and continues checking to see whether +it becomes healthy. + +You, or a {{< glossary_tooltip term_id="controller" text="controller">}}, must explicitly +delete the Node object to stop that health checking. +{{< /note >}} + +The name of a Node object must be a valid +[DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names). + +### Self-registration of Nodes + +When the kubelet flag `--register-node` is true (the default), the kubelet will attempt to +register itself with the API server. This is the preferred pattern, used by most distros. + +For self-registration, the kubelet is started with the following options: + + - `--kubeconfig` - Path to credentials to authenticate itself to the API server. + - `--cloud-provider` - How to talk to a {{< glossary_tooltip text="cloud provider" term_id="cloud-provider" >}} to read metadata about itself. + - `--register-node` - Automatically register with the API server. + - `--register-with-taints` - Register the node with the given list of {{< glossary_tooltip text="taints" term_id="taint" >}} (comma separated `=:`). + + No-op if `register-node` is false. + - `--node-ip` - IP address of the node. + - `--node-labels` - {{< glossary_tooltip text="Labels" term_id="label" >}} to add when registering the node in the cluster (see label restrictions enforced by the [NodeRestriction admission plugin](/docs/reference/access-authn-authz/admission-controllers/#noderestriction)). + - `--node-status-update-frequency` - Specifies how often kubelet posts node status to master. + +When the [Node authorization mode](/docs/reference/access-authn-authz/node/) and +[NodeRestriction admission plugin](/docs/reference/access-authn-authz/admission-controllers/#noderestriction) are enabled, +kubelets are only authorized to create/modify their own Node resource. + +### Manual Node administration + +You can create and modify Node objects using +{{< glossary_tooltip text="kubectl" term_id="kubectl" >}}. + +When you want to create Node objects manually, set the kubelet flag `--register-node=false`. + +You can modify Node objects regardless of the setting of `--register-node`. +For example, you can set labels on an existing Node, or mark it unschedulable. + +You can use labels on Nodes in conjunction with node selectors on Pods to control +scheduling. For example, you can to constrain a Pod to only be eligible to run on +a subset of the available nodes. + +Marking a node as unschedulable prevents the scheduler from placing new pods onto +that Node, but does not affect existing Pods on the Node. This is useful as a +preparatory step before a node reboot or other maintenance. + +To mark a Node unschedulable, run: + +```shell +kubectl cordon $NODENAME +``` + +{{< note >}} +Pods that are part of a {{< glossary_tooltip term_id="daemonset" >}} tolerate +being run on an unschedulable Node. DaemonSets typically provide node-local services +that should run on the Node even if it is being drained of workload applications. +{{< /note >}} + +## Node status + +A Node's status contains the following information: * [Addresses](#addresses) * [Conditions](#condition) * [Capacity and Allocatable](#capacity) * [Info](#info) -Node status and other details about a node can be displayed using the following command: +You can use `kubectl` to view a Node's status and other details: + ```shell kubectl describe node ``` -Each section is described in detail below. + +Each section of the output is described below. ### Addresses @@ -49,15 +149,23 @@ The usage of these fields varies depending on your cloud provider or bare metal The `conditions` field describes the status of all `Running` nodes. Examples of conditions include: -| Node Condition | Description | -|----------------|-------------| -| `Ready` | `True` if the node is healthy and ready to accept pods, `False` if the node is not healthy and is not accepting pods, and `Unknown` if the node controller has not heard from the node in the last `node-monitor-grace-period` (default is 40 seconds) | -| `MemoryPressure` | `True` if pressure exists on the node memory -- that is, if the node memory is low; otherwise `False` | -| `PIDPressure` | `True` if pressure exists on the processes -- that is, if there are too many processes on the node; otherwise `False` | -| `DiskPressure` | `True` if pressure exists on the disk size -- that is, if the disk capacity is low; otherwise `False` | -| `NetworkUnavailable` | `True` if the network for the node is not correctly configured, otherwise `False` | +{{< table caption = "Node conditions, and a description of when each condition applies." >}} +| Node Condition | Description | +|----------------------|-------------| +| `Ready` | `True` if the node is healthy and ready to accept pods, `False` if the node is not healthy and is not accepting pods, and `Unknown` if the node controller has not heard from the node in the last `node-monitor-grace-period` (default is 40 seconds) | +| `DiskPressure` | `True` if pressure exists on the disk size--that is, if the disk capacity is low; otherwise `False` | +| `MemoryPressure` | `True` if pressure exists on the node memory--that is, if the node memory is low; otherwise `False` | +| `PIDPressure` | `True` if pressure exists on the processes—that is, if there are too many processes on the node; otherwise `False` | +| `NetworkUnavailable` | `True` if the network for the node is not correctly configured, otherwise `False` | +{{< /table >}} -The node condition is represented as a JSON object. For example, the following response describes a healthy node. +{{< note >}} +If you use command-line tools to print details of a cordoned Node, the Condition includes +`SchedulingDisabled`. `SchedulingDisabled` is not a Condition in the Kubernetes API; instead, +cordoned nodes are marked Unschedulable in their spec. +{{< /note >}} + +The node condition is represented as a JSON object. For example, the following structure describes a healthy node: ```json "conditions": [ @@ -72,20 +180,24 @@ The node condition is represented as a JSON object. For example, the following r ] ``` -If the Status of the Ready condition remains `Unknown` or `False` for longer than the `pod-eviction-timeout` (an argument passed to the [kube-controller-manager](/docs/admin/kube-controller-manager/)), all the Pods on the node are scheduled for deletion by the Node Controller. The default eviction timeout duration is **five minutes**. In some cases when the node is unreachable, the apiserver is unable to communicate with the kubelet on the node. The decision to delete the pods cannot be communicated to the kubelet until communication with the apiserver is re-established. In the meantime, the pods that are scheduled for deletion may continue to run on the partitioned node. +If the Status of the Ready condition remains `Unknown` or `False` for longer than the `pod-eviction-timeout` (an argument passed to the {{< glossary_tooltip text="kube-controller-manager" term_id="kube-controller-manager" >}}), all the Pods on the node are scheduled for deletion by the node controller. The default eviction timeout duration is **five minutes**. In some cases when the node is unreachable, the API server is unable to communicate with the kubelet on the node. The decision to delete the pods cannot be communicated to the kubelet until communication with the API server is re-established. In the meantime, the pods that are scheduled for deletion may continue to run on the partitioned node. -In versions of Kubernetes prior to 1.5, the node controller would [force delete](/docs/concepts/workloads/pods/pod/#force-deletion-of-pods) -these unreachable pods from the apiserver. However, in 1.5 and higher, the node controller does not force delete pods until it is -confirmed that they have stopped running in the cluster. You can see the pods that might be running on an unreachable node as being in -the `Terminating` or `Unknown` state. In cases where Kubernetes cannot deduce from the underlying infrastructure if a node has -permanently left a cluster, the cluster administrator may need to delete the node object by hand. Deleting the node object from -Kubernetes causes all the Pod objects running on the node to be deleted from the apiserver, and frees up their names. +The node controller does not force delete pods until it is confirmed that they have stopped +running in the cluster. You can see the pods that might be running on an unreachable node as +being in the `Terminating` or `Unknown` state. In cases where Kubernetes cannot deduce from the +underlying infrastructure if a node has permanently left a cluster, the cluster administrator +may need to delete the node object by hand. Deleting the node object from Kubernetes causes +all the Pod objects running on the node to be deleted from the API server, and frees up their +names. The node lifecycle controller automatically creates -[taints](/docs/concepts/configuration/taint-and-toleration/) that represent conditions. +[taints](/docs/concepts/scheduling-eviction/taint-and-toleration/) that represent conditions. The scheduler takes the Node's taints into consideration when assigning a Pod to a Node. Pods can also have tolerations which let them tolerate a Node's taints. +See [Taint Nodes by Condition](/docs/concepts/configuration/taint-and-toleration/#taint-nodes-by-condition) +for more details. + ### Capacity and Allocatable {#capacity} Describes the resources available on the node: CPU, memory and the maximum @@ -104,48 +216,10 @@ on a Node. Describes general information about the node, such as kernel version, Kubernetes version (kubelet and kube-proxy version), Docker version (if used), and OS name. This information is gathered by Kubelet from the node. -## Management +### Node controller -Unlike [pods](/docs/concepts/workloads/pods/pod/) and [services](/docs/concepts/services-networking/service/), -a node is not inherently created by Kubernetes: it is created externally by cloud -providers like Google Compute Engine, or it exists in your pool of physical or virtual -machines. So when Kubernetes creates a node, it creates -an object that represents the node. After creation, Kubernetes -checks whether the node is valid or not. For example, if you try to create -a node from the following content: - -```json -{ - "kind": "Node", - "apiVersion": "v1", - "metadata": { - "name": "10.240.79.157", - "labels": { - "name": "my-first-k8s-node" - } - } -} -``` - -Kubernetes creates a node object internally (the representation), and -validates the node by health checking based on the `metadata.name` field. If the node is valid -- that is, if all necessary -services are running -- it is eligible to run a pod. Otherwise, it is -ignored for any cluster activity until it becomes valid. -The name of a Node object must be a valid -[DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names). - -{{< note >}} -Kubernetes keeps the object for the invalid node and keeps checking to see whether it becomes valid. -You must explicitly delete the Node object to stop this process. -{{< /note >}} - -Currently, there are three components that interact with the Kubernetes node -interface: node controller, kubelet, and kubectl. - -### Node Controller - -The node controller is a Kubernetes master component which manages various -aspects of nodes. +The node {{< glossary_tooltip text="controller" term_id="controller" >}} is a +Kubernetes control plane component that manages various aspects of nodes. The node controller has multiple roles in a node's life. The first is assigning a CIDR block to the node when it is registered (if CIDR assignment is turned on). @@ -168,6 +242,7 @@ checks the state of each node every `--node-monitor-period` seconds. #### Heartbeats Heartbeats, sent by Kubernetes nodes, help determine the availability of a node. + There are two forms of heartbeats: updates of `NodeStatus` and the [Lease object](/docs/reference/generated/kubernetes-api/{{< latest-version >}}/#lease-v1-coordination-k8s-io). Each Node has an associated Lease object in the `kube-node-lease` @@ -188,13 +263,7 @@ a Lease object. #### Reliability -In Kubernetes 1.4, we updated the logic of the node controller to better handle -cases when a large number of nodes have problems with reaching the master -(e.g. because the master has networking problems). Starting with 1.4, the node -controller looks at the state of all nodes in the cluster when making a -decision about pod eviction. - -In most cases, node controller limits the eviction rate to + In most cases, node controller limits the eviction rate to `--node-eviction-rate` (default 0.1) per second, meaning it won't evict pods from more than 1 node per 10 seconds. @@ -220,62 +289,12 @@ completely unhealthy (i.e. there are no healthy nodes in the cluster). In such a case, the node controller assumes that there's some problem with master connectivity and stops all evictions until some connectivity is restored. -Starting in Kubernetes 1.6, the NodeController is also responsible for evicting -pods that are running on nodes with `NoExecute` taints, when the pods do not tolerate -the taints. Additionally, as an alpha feature that is disabled by default, the -NodeController is responsible for adding taints corresponding to node problems like -node unreachable or not ready. See [this documentation](/docs/concepts/configuration/taint-and-toleration/) -for details about `NoExecute` taints and the alpha feature. +The node controller is also responsible for evicting pods running on nodes with +`NoExecute` taints, unless those pods tolerate that taint. +The node controller also adds {{< glossary_tooltip text="taints" term_id="taint" >}} +corresponding to node problems like node unreachable or not ready. This means +that the scheduler won't place Pods onto unhealthy nodes. -Starting in version 1.8, the node controller can be made responsible for creating taints that represent -Node conditions. This is an alpha feature of version 1.8. - -### Self-Registration of Nodes - -When the kubelet flag `--register-node` is true (the default), the kubelet will attempt to -register itself with the API server. This is the preferred pattern, used by most distros. - -For self-registration, the kubelet is started with the following options: - - - `--kubeconfig` - Path to credentials to authenticate itself to the apiserver. - - `--cloud-provider` - How to talk to a cloud provider to read metadata about itself. - - `--register-node` - Automatically register with the API server. - - `--register-with-taints` - Register the node with the given list of taints (comma separated `=:`). No-op if `register-node` is false. - - `--node-ip` - IP address of the node. - - `--node-labels` - Labels to add when registering the node in the cluster (see label restrictions enforced by the [NodeRestriction admission plugin](/docs/reference/access-authn-authz/admission-controllers/#noderestriction) in 1.13+). - - `--node-status-update-frequency` - Specifies how often kubelet posts node status to master. - -When the [Node authorization mode](/docs/reference/access-authn-authz/node/) and -[NodeRestriction admission plugin](/docs/reference/access-authn-authz/admission-controllers/#noderestriction) are enabled, -kubelets are only authorized to create/modify their own Node resource. - -#### Manual Node Administration - -A cluster administrator can create and modify node objects. - -If the administrator wishes to create node objects manually, set the kubelet flag -`--register-node=false`. - -The administrator can modify node resources (regardless of the setting of `--register-node`). -Modifications include setting labels on the node and marking it unschedulable. - -Labels on nodes can be used in conjunction with node selectors on pods to control scheduling, -e.g. to constrain a pod to only be eligible to run on a subset of the nodes. - -Marking a node as unschedulable prevents new pods from being scheduled to that -node, but does not affect any existing pods on the node. This is useful as a -preparatory step before a node reboot, etc. For example, to mark a node -unschedulable, run this command: - -```shell -kubectl cordon $NODENAME -``` - -{{< note >}} -Pods created by a DaemonSet controller bypass the Kubernetes scheduler -and do not respect the unschedulable attribute on a node. This assumes that daemons belong on -the machine even if it is being drained of applications while it prepares for a reboot. -{{< /note >}} {{< caution >}} `kubectl cordon` marks a node as 'unschedulable', which has the side effect of the service @@ -285,34 +304,40 @@ eligible for, effectively removing incoming load balancer traffic from the cordo ### Node capacity -The capacity of the node (number of cpus and amount of memory) is part of the node object. -Normally, nodes register themselves and report their capacity when creating the node object. If -you are doing [manual node administration](#manual-node-administration), then you need to set node -capacity when adding a node. +Node objects track information about the Node's resource capacity (for example: the amount +of memory available, and the number of CPUs). +Nodes that [self register](#self-registration-of-nodes) report their capacity during +registration. If you [manually](#manual-node-administration) add a Node, then +you need to set the node's capacity informaton when you add it. -The Kubernetes scheduler ensures that there are enough resources for all the pods on a node. It -checks that the sum of the requests of containers on the node is no greater than the node capacity. It -includes all containers started by the kubelet, but not containers started directly by the [container runtime](/docs/concepts/overview/components/#container-runtime) nor any process running outside of the containers. +The Kubernetes {{< glossary_tooltip text="scheduler" term_id="kube-scheduler" >}} ensures that +there are enough resources for all the Pods on a Node. The scheduler checks that the sum +of the requests of containers on the node is no greater than the node's capacity. +That sum of requests includes all containers managed by the kubelet, but excludes any +containers started directly by the container runtime, and also excludes any +processes running outside of the kubelet's control. -If you want to explicitly reserve resources for non-Pod processes, follow this tutorial to +{{< note >}} +If you want to explicitly reserve resources for non-Pod processes, see [reserve resources for system daemons](/docs/tasks/administer-cluster/reserve-compute-resources/#system-reserved). +{{< /note >}} ## Node topology -{{< feature-state state="alpha" >}} +{{< feature-state state="alpha" for_k8s_version="v1.16" >}} If you have enabled the `TopologyManager` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), then the kubelet can use topology hints when making resource assignment decisions. - -## API Object - -Node is a top-level resource in the Kubernetes REST API. More details about the -API object can be found at: -[Node API object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#node-v1-core). +See [Control Topology Management Policies on a Node](/docs/tasks/administer-cluster/topology-manager/) +for more information. {{% /capture %}} {{% capture whatsnext %}} -* Read about [node components](/docs/concepts/overview/components/#node-components) -* Read about node-level topology: [Control Topology Management Policies on a node](/docs/tasks/administer-cluster/topology-manager/) +* Learn about the [components](/docs/concepts/overview/components/#node-components) that make up a node. +* Read the [API definition for Node](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#node-v1-core). +* Read the [Node](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md#the-kubernetes-node) + section of the architecture design document. +* Read about [taints and tolerations](/docs/concepts/configuration/taint-and-toleration/). +* Read about [cluster autoscaling](/docs/tasks/administer-cluster/cluster-management/#cluster-autoscaling). {{% /capture %}} diff --git a/content/en/docs/concepts/cluster-administration/addons.md b/content/en/docs/concepts/cluster-administration/addons.md index c7f3dd8909..0347327f13 100644 --- a/content/en/docs/concepts/cluster-administration/addons.md +++ b/content/en/docs/concepts/cluster-administration/addons.md @@ -30,6 +30,7 @@ Add-ons in each section are sorted alphabetically - the ordering does not imply * [Flannel](https://github.com/coreos/flannel/blob/master/Documentation/kubernetes.md) is an overlay network provider that can be used with Kubernetes. * [Knitter](https://github.com/ZTE/Knitter/) is a plugin to support multiple network interfaces in a Kubernetes pod. * [Multus](https://github.com/Intel-Corp/multus-cni) is a Multi plugin for multiple network support in Kubernetes to support all CNI plugins (e.g. Calico, Cilium, Contiv, Flannel), in addition to SRIOV, DPDK, OVS-DPDK and VPP based workloads in Kubernetes. +* [OVN4NFV-K8S-Plugin](https://github.com/opnfv/ovn4nfv-k8s-plugin) is OVN based CNI controller plugin to provide cloud native based Service function chaining(SFC), Multiple OVN overlay networking, dynamic subnet creation, dynamic creation of virtual networks, VLAN Provider network, Direct provider network and pluggable with other Multi-network plugins, ideal for edge based cloud native workloads in Multi-cluster networking * [NSX-T](https://docs.vmware.com/en/VMware-NSX-T/2.0/nsxt_20_ncp_kubernetes.pdf) Container Plug-in (NCP) provides integration between VMware NSX-T and container orchestrators such as Kubernetes, as well as integration between NSX-T and container-based CaaS/PaaS platforms such as Pivotal Container Service (PKS) and OpenShift. * [Nuage](https://github.com/nuagenetworks/nuage-kubernetes/blob/v5.1.1-1/docs/kubernetes-1-installation.rst) is an SDN platform that provides policy-based networking between Kubernetes Pods and non-Kubernetes environments with visibility and security monitoring. * [Romana](http://romana.io) is a Layer 3 networking solution for pod networks that also supports the [NetworkPolicy API](/docs/concepts/services-networking/network-policies/). Kubeadm add-on installation details available [here](https://github.com/romana/romana/tree/master/containerize). diff --git a/content/en/docs/concepts/cluster-administration/cloud-providers.md b/content/en/docs/concepts/cluster-administration/cloud-providers.md index 260e689d25..0d9ba6c1ff 100644 --- a/content/en/docs/concepts/cluster-administration/cloud-providers.md +++ b/content/en/docs/concepts/cluster-administration/cloud-providers.md @@ -422,3 +422,15 @@ If you wish to use the external cloud provider, its repository is [TencentCloud/ The Tencent cloud provider uses the hostname of the node (as determined by the kubelet or overridden with `--hostname-override`) as the name of the Kubernetes Node object. Note that the Kubernetes Node name must match the Tencent VM private IP. + +## Alibaba Cloud Kubernetes + + If you wish to use the external cloud provider, its repository is [kubernetes/cloud-provider-alibaba-cloud](https://github.com/kubernetes/cloud-provider-alibaba-cloud). + +### Node Name + +Alibaba Cloud does not require the format of node name, but the kubelet needs to add `--provider-id=${REGION_ID}.${INSTANCE_ID}`. The parameter `${REGION_ID}` represents the region id of the Kubernetes and `${INSTANCE_ID}` denotes the Alibaba ECS (Elastic Compute Service) ID. + +### Load Balancers + +You can setup external load balancers to use specific features in Alibaba Cloud by configuring the [annotations](https://www.alibabacloud.com/help/en/doc-detail/86531.htm) . \ No newline at end of file diff --git a/content/en/docs/concepts/cluster-administration/networking.md b/content/en/docs/concepts/cluster-administration/networking.md index f70e6f7a42..c260963d87 100644 --- a/content/en/docs/concepts/cluster-administration/networking.md +++ b/content/en/docs/concepts/cluster-administration/networking.md @@ -262,6 +262,10 @@ Lars Kellogg-Stedman. Multus supports all [reference plugins](https://github.com/containernetworking/plugins) (eg. [Flannel](https://github.com/containernetworking/plugins/tree/master/plugins/meta/flannel), [DHCP](https://github.com/containernetworking/plugins/tree/master/plugins/ipam/dhcp), [Macvlan](https://github.com/containernetworking/plugins/tree/master/plugins/main/macvlan)) that implement the CNI specification and 3rd party plugins (eg. [Calico](https://github.com/projectcalico/cni-plugin), [Weave](https://github.com/weaveworks/weave), [Cilium](https://github.com/cilium/cilium), [Contiv](https://github.com/contiv/netplugin)). In addition to it, Multus supports [SRIOV](https://github.com/hustcat/sriov-cni), [DPDK](https://github.com/Intel-Corp/sriov-cni), [OVS-DPDK & VPP](https://github.com/intel/vhost-user-net-plugin) workloads in Kubernetes with both cloud native and NFV based applications in Kubernetes. +### OVN4NFV-K8s-Plugin (OVN based CNI controller & plugin) + +[OVN4NFV-K8S-Plugin](https://github.com/opnfv/ovn4nfv-k8s-plugin) is OVN based CNI controller plugin to provide cloud native based Service function chaining(SFC), Multiple OVN overlay networking, dynamic subnet creation, dynamic creation of virtual networks, VLAN Provider network, Direct provider network and pluggable with other Multi-network plugins, ideal for edge based cloud native workloads in Multi-cluster networking + ### NSX-T [VMware NSX-T](https://docs.vmware.com/en/VMware-NSX-T/index.html) is a network virtualization and security platform. NSX-T can provide network virtualization for a multi-cloud and multi-hypervisor environment and is focused on emerging application frameworks and architectures that have heterogeneous endpoints and technology stacks. In addition to vSphere hypervisors, these environments include other hypervisors such as KVM, containers, and bare metal. diff --git a/content/en/docs/concepts/containers/runtime-class.md b/content/en/docs/concepts/containers/runtime-class.md index d29825d698..dca6f2d0a8 100644 --- a/content/en/docs/concepts/containers/runtime-class.md +++ b/content/en/docs/concepts/containers/runtime-class.md @@ -163,7 +163,7 @@ with the pod's tolerations in admission, effectively taking the union of the set by each. To learn more about configuring the node selector and tolerations, see [Assigning Pods to -Nodes](/docs/concepts/configuration/assign-pod-node/). +Nodes](/docs/concepts/scheduling-eviction/assign-pod-node/). [RuntimeClass admission controller]: /docs/reference/access-authn-authz/admission-controllers/#runtimeclass diff --git a/content/en/docs/concepts/overview/components.md b/content/en/docs/concepts/overview/components.md index 71b95fc787..04c4bbe805 100644 --- a/content/en/docs/concepts/overview/components.md +++ b/content/en/docs/concepts/overview/components.md @@ -86,7 +86,7 @@ Node components run on every node, maintaining running pods and providing the Ku {{< glossary_definition term_id="kube-proxy" length="all" >}} -### Container Runtime +### Container runtime {{< glossary_definition term_id="container-runtime" length="all" >}} diff --git a/content/en/docs/concepts/overview/working-with-objects/labels.md b/content/en/docs/concepts/overview/working-with-objects/labels.md index 0de7f04a8c..f08daf323b 100644 --- a/content/en/docs/concepts/overview/working-with-objects/labels.md +++ b/content/en/docs/concepts/overview/working-with-objects/labels.md @@ -226,6 +226,6 @@ selector: #### Selecting sets of nodes One use case for selecting over labels is to constrain the set of nodes onto which a pod can schedule. -See the documentation on [node selection](/docs/concepts/configuration/assign-pod-node/) for more information. +See the documentation on [node selection](/docs/concepts/scheduling-eviction/assign-pod-node/) for more information. {{% /capture %}} diff --git a/content/en/docs/concepts/policy/resource-quotas.md b/content/en/docs/concepts/policy/resource-quotas.md index 8ae3111323..39f51bf2d7 100644 --- a/content/en/docs/concepts/policy/resource-quotas.md +++ b/content/en/docs/concepts/policy/resource-quotas.md @@ -494,7 +494,8 @@ kubectl create quota test --hard=count/deployments.extensions=2,count/replicaset ``` ```shell -kubectl run nginx --image=nginx --replicas=2 --namespace=myspace +kubectl create deployment nginx --image=nginx --namespace=myspace +kubectl scale deployment nginx --replicas=2 --namespace=myspace ``` ```shell diff --git a/content/en/docs/concepts/configuration/assign-pod-node.md b/content/en/docs/concepts/scheduling-eviction/assign-pod-node.md similarity index 97% rename from content/en/docs/concepts/configuration/assign-pod-node.md rename to content/en/docs/concepts/scheduling-eviction/assign-pod-node.md index 3811f75301..79a9487c60 100644 --- a/content/en/docs/concepts/configuration/assign-pod-node.md +++ b/content/en/docs/concepts/scheduling-eviction/assign-pod-node.md @@ -155,7 +155,7 @@ value is `another-node-label-value` should be preferred. You can see the operator `In` being used in the example. The new node affinity syntax supports the following operators: `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, `Lt`. You can use `NotIn` and `DoesNotExist` to achieve node anti-affinity behavior, or use -[node taints](/docs/concepts/configuration/taint-and-toleration/) to repel pods from specific nodes. +[node taints](/docs/concepts/scheduling-eviction/taint-and-toleration/) to repel pods from specific nodes. If you specify both `nodeSelector` and `nodeAffinity`, *both* must be satisfied for the pod to be scheduled onto a candidate node. @@ -226,10 +226,11 @@ The legal operators for pod affinity and anti-affinity are `In`, `NotIn`, `Exist In principle, the `topologyKey` can be any legal label-key. However, for performance and security reasons, there are some constraints on topologyKey: -1. For affinity and for `requiredDuringSchedulingIgnoredDuringExecution` pod anti-affinity, -empty `topologyKey` is not allowed. -2. For `requiredDuringSchedulingIgnoredDuringExecution` pod anti-affinity, the admission controller `LimitPodHardAntiAffinityTopology` was introduced to limit `topologyKey` to `kubernetes.io/hostname`. If you want to make it available for custom topologies, you may modify the admission controller, or simply disable it. -3. For `preferredDuringSchedulingIgnoredDuringExecution` pod anti-affinity, empty `topologyKey` is not allowed. +1. For pod affinity, empty `topologyKey` is not allowed in both `requiredDuringSchedulingIgnoredDuringExecution` +and `preferredDuringSchedulingIgnoredDuringExecution`. +2. For pod anti-affinity, empty `topologyKey` is also not allowed in both `requiredDuringSchedulingIgnoredDuringExecution` +and `preferredDuringSchedulingIgnoredDuringExecution`. +3. For `requiredDuringSchedulingIgnoredDuringExecution` pod anti-affinity, the admission controller `LimitPodHardAntiAffinityTopology` was introduced to limit `topologyKey` to `kubernetes.io/hostname`. If you want to make it available for custom topologies, you may modify the admission controller, or simply disable it. 4. Except for the above cases, the `topologyKey` can be any legal label-key. In addition to `labelSelector` and `topologyKey`, you can optionally specify a list `namespaces` @@ -391,7 +392,7 @@ The above pod will run on the node kube-01. {{% capture whatsnext %}} -[Taints](/docs/concepts/configuration/taint-and-toleration/) allow a Node to *repel* a set of Pods. +[Taints](/docs/concepts/scheduling-eviction/taint-and-toleration/) allow a Node to *repel* a set of Pods. The design documents for [node affinity](https://git.k8s.io/community/contributors/design-proposals/scheduling/nodeaffinity.md) diff --git a/content/en/docs/concepts/scheduling-eviction/kube-scheduler.md b/content/en/docs/concepts/scheduling-eviction/kube-scheduler.md index c258a2d46a..2fea98bfb4 100644 --- a/content/en/docs/concepts/scheduling-eviction/kube-scheduler.md +++ b/content/en/docs/concepts/scheduling-eviction/kube-scheduler.md @@ -1,7 +1,7 @@ --- title: Kubernetes Scheduler content_template: templates/concept -weight: 50 +weight: 10 --- {{% capture overview %}} diff --git a/content/en/docs/concepts/configuration/taint-and-toleration.md b/content/en/docs/concepts/scheduling-eviction/taint-and-toleration.md similarity index 82% rename from content/en/docs/concepts/configuration/taint-and-toleration.md rename to content/en/docs/concepts/scheduling-eviction/taint-and-toleration.md index f2a0befec8..0812b2ce05 100644 --- a/content/en/docs/concepts/configuration/taint-and-toleration.md +++ b/content/en/docs/concepts/scheduling-eviction/taint-and-toleration.md @@ -10,16 +10,17 @@ weight: 40 {{% capture overview %}} -Node affinity, described [here](/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity), -is a property of *pods* that *attracts* them to a set of nodes (either as a -preference or a hard requirement). Taints are the opposite -- they allow a -*node* to *repel* a set of pods. +[_Node affinity_](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity), +is a property of {{< glossary_tooltip text="Pods" term_id="pod" >}} that *attracts* them to +a set of {{< glossary_tooltip text="nodes" term_id="node" >}} (either as a preference or a +hard requirement). _Taints_ are the opposite -- they allow a node to repel a set of pods. + +_Tolerations_ are applied to pods, and allow (but do not require) the pods to schedule +onto nodes with matching taints. Taints and tolerations work together to ensure that pods are not scheduled onto inappropriate nodes. One or more taints are applied to a node; this marks that the node should not accept any pods that do not tolerate the taints. -Tolerations are applied to pods, and allow (but do not require) the pods to schedule -onto nodes with matching taints. {{% /capture %}} @@ -65,12 +66,12 @@ Here’s an example of a pod that uses tolerations: {{< codenew file="pods/pod-with-toleration.yaml" >}} +The default value for `operator` is `Equal`. + A toleration "matches" a taint if the keys are the same and the effects are the same, and: * the `operator` is `Exists` (in which case no `value` should be specified), or -* the `operator` is `Equal` and the `value`s are equal - -`Operator` defaults to `Equal` if not specified. +* the `operator` is `Equal` and the `value`s are equal. {{< note >}} @@ -204,7 +205,7 @@ when there are node problems, which is described in the next section. {{< feature-state for_k8s_version="v1.18" state="stable" >}} -Earlier we mentioned the `NoExecute` taint effect, which affects pods that are already +The `NoExecute` taint effect, mentioned above, affects pods that are already running on the node as follows * pods that do not tolerate the taint are evicted immediately @@ -213,9 +214,8 @@ running on the node as follows * pods that tolerate the taint with a specified `tolerationSeconds` remain bound for the specified amount of time -In addition, Kubernetes 1.6 introduced alpha support for representing node -problems. In other words, the node controller automatically taints a node when -certain condition is true. The following taints are built in: +The node controller automatically taints a Node when certain conditions +are true. The following taints are built in: * `node.kubernetes.io/not-ready`: Node is not ready. This corresponds to the NodeCondition `Ready` being "`False`". @@ -236,19 +236,18 @@ with `NoExecute` effect. If the fault condition returns to normal the kubelet or controller can remove the relevant taint(s). {{< note >}} -To maintain the existing [rate limiting](/docs/concepts/architecture/nodes/) -behavior of pod evictions due to node problems, the system actually adds the taints -in a rate-limited way. This prevents massive pod evictions in scenarios such -as the master becoming partitioned from the nodes. +The control plane limits the rate of adding node new taints to nodes. This rate limiting +manages the number of evictions that are triggered when many nodes become unreachable at +once (for example: if there is a network disruption). {{< /note >}} -The feature, in combination with `tolerationSeconds`, allows a pod -to specify how long it should stay bound to a node that has one or both of these problems. +You can specify `tolerationSeconds` for a Pod to define how long that Pod stays bound +to a failing or unresponsive Node. -For example, an application with a lot of local state might want to stay -bound to node for a long time in the event of network partition, in the hope +For example, you might want to keep an application with a lot of local state +bound to node for a long time in the event of network partition, hoping that the partition will recover and thus the pod eviction can be avoided. -The toleration the pod would use in that case would look like +The toleration you set for that Pod might look like: ```yaml tolerations: @@ -258,20 +257,15 @@ tolerations: tolerationSeconds: 6000 ``` -Note that Kubernetes automatically adds a toleration for -`node.kubernetes.io/not-ready` with `tolerationSeconds=300` -unless the pod configuration provided -by the user already has a toleration for `node.kubernetes.io/not-ready`. -Likewise it adds a toleration for -`node.kubernetes.io/unreachable` with `tolerationSeconds=300` -unless the pod configuration provided -by the user already has a toleration for `node.kubernetes.io/unreachable`. +{{< note >}} +Kubernetes automatically adds a toleration for +`node.kubernetes.io/not-ready` and `node.kubernetes.io/unreachable` +with `tolerationSeconds=300`, +unless you, or a controller, set those tolerations explictly. -These automatically-added tolerations ensure that -the default pod behavior of remaining bound for 5 minutes after one of these -problems is detected is maintained. -The two default tolerations are added by the [DefaultTolerationSeconds -admission controller](https://git.k8s.io/kubernetes/plugin/pkg/admission/defaulttolerationseconds). +These automatically-added tolerations mean that Pods remain bound to +Nodes for 5 minutes after one of these problems is detected. +{{< /note >}} [DaemonSet](/docs/concepts/workloads/controllers/daemonset/) pods are created with `NoExecute` tolerations for the following taints with no `tolerationSeconds`: @@ -287,9 +281,8 @@ The node lifecycle controller automatically creates taints corresponding to Node conditions with `NoSchedule` effect. Similarly the scheduler does not check Node conditions; instead the scheduler checks taints. This assures that Node conditions don't affect what's scheduled onto the Node. The user can choose to ignore some of the Node's problems (represented as Node conditions) by adding appropriate Pod tolerations. -Starting in Kubernetes 1.8, the DaemonSet controller automatically adds the -following `NoSchedule` tolerations to all daemons, to prevent DaemonSets from -breaking. +The DaemonSet controller automatically adds the following `NoSchedule` +tolerations to all daemons, to prevent DaemonSets from breaking. * `node.kubernetes.io/memory-pressure` * `node.kubernetes.io/disk-pressure` @@ -299,3 +292,10 @@ breaking. Adding these tolerations ensures backward compatibility. You can also add arbitrary tolerations to DaemonSets. + +{{% /capture %}} +{{% capture whatsnext %}} +* Read about [out of resource handling](/docs/tasks/administer-cluster/out-of-resource/) and how you can configure it +* Read about [pod priority](/docs/concepts/configuration/pod-priority-preemption/) + +{{% /capture %}} diff --git a/content/en/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases.md b/content/en/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases.md index 6f931a8531..aeae348209 100644 --- a/content/en/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases.md +++ b/content/en/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases.md @@ -93,7 +93,7 @@ hostaliases-pod 0/1 Completed 0 6s 10.200 The `hosts` file content would look like this: ```shell -kubectl logs hostaliases-pod +kubectl exec hostaliases-pod -- cat /etc/hosts ``` ```none diff --git a/content/en/docs/concepts/services-networking/dual-stack.md b/content/en/docs/concepts/services-networking/dual-stack.md index 3128f2eef4..c753c17cc1 100644 --- a/content/en/docs/concepts/services-networking/dual-stack.md +++ b/content/en/docs/concepts/services-networking/dual-stack.md @@ -49,8 +49,8 @@ To enable IPv4/IPv6 dual-stack, enable the `IPv6DualStack` [feature gate](/docs/ * `--feature-gates="IPv6DualStack=true"` * kube-controller-manager: * `--feature-gates="IPv6DualStack=true"` - * `--cluster-cidr=,` eg. `--cluster-cidr=10.244.0.0/16,fc00::/48` - * `--service-cluster-ip-range=,` eg. `--service-cluster-ip-range=10.0.0.0/16,fd00::/108` + * `--cluster-cidr=,` + * `--service-cluster-ip-range=,` * `--node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6` defaults to /24 for IPv4 and /64 for IPv6 * kubelet: * `--feature-gates="IPv6DualStack=true"` @@ -58,6 +58,13 @@ To enable IPv4/IPv6 dual-stack, enable the `IPv6DualStack` [feature gate](/docs/ * `--cluster-cidr=,` * `--feature-gates="IPv6DualStack=true"` +{{< note >}} +An example of an IPv4 CIDR: `10.244.0.0/16` (though you would supply your own address range) + +An example of an IPv6 CIDR: `fdXY:IJKL:MNOP:15::/64` (this shows the format but is not a valid address - see [RFC 4193](https://tools.ietf.org/html/rfc4193)) + +{{< /note >}} + ## Services If your cluster has IPv4/IPv6 dual-stack networking enabled, you can create {{< glossary_tooltip text="Services" term_id="service" >}} with either an IPv4 or an IPv6 address. You can choose the address family for the Service's cluster IP by setting a field, `.spec.ipFamily`, on that Service. diff --git a/content/en/docs/concepts/services-networking/endpoint-slices.md b/content/en/docs/concepts/services-networking/endpoint-slices.md index 7c39f05086..940374ae52 100644 --- a/content/en/docs/concepts/services-networking/endpoint-slices.md +++ b/content/en/docs/concepts/services-networking/endpoint-slices.md @@ -2,11 +2,6 @@ reviewers: - freehan title: EndpointSlices -feature: - title: EndpointSlices - description: > - Scalable tracking of network endpoints in a Kubernetes cluster. - content_template: templates/concept weight: 15 --- diff --git a/content/en/docs/concepts/services-networking/service.md b/content/en/docs/concepts/services-networking/service.md index 92654fc612..e97d80db21 100644 --- a/content/en/docs/concepts/services-networking/service.md +++ b/content/en/docs/concepts/services-networking/service.md @@ -311,8 +311,8 @@ these are: - `nq`: never queue {{< note >}} -To run kube-proxy in IPVS mode, you must make the IPVS Linux available on -the node before you starting kube-proxy. +To run kube-proxy in IPVS mode, you must make IPVS available on +the node before starting kube-proxy. When kube-proxy starts in IPVS proxy mode, it verifies whether IPVS kernel modules are available. If the IPVS kernel modules are not detected, then kube-proxy @@ -692,6 +692,15 @@ metadata: [...] ``` {{% /tab %}} +{{% tab name="Alibaba Cloud" %}} +```yaml +[...] +metadata: + annotations: + service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: "intranet" +[...] +``` +{{% /tab %}} {{< /tabs >}} @@ -896,7 +905,7 @@ the NLB Target Group's health check on the auto-assigned `.spec.healthCheckNodePort` and not receive any traffic. In order to achieve even traffic, either use a DaemonSet or specify a -[pod anti-affinity](/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) +[pod anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) to not locate on the same node. You can also use NLB Services with the [internal load balancer](/docs/concepts/services-networking/service/#internal-load-balancer) diff --git a/content/en/docs/concepts/storage/storage-classes.md b/content/en/docs/concepts/storage/storage-classes.md index 2680185785..1ea7c236d9 100644 --- a/content/en/docs/concepts/storage/storage-classes.md +++ b/content/en/docs/concepts/storage/storage-classes.md @@ -169,9 +169,9 @@ will delay the binding and provisioning of a PersistentVolume until a Pod using PersistentVolumes will be selected or provisioned conforming to the topology that is specified by the Pod's scheduling constraints. These include, but are not limited to, [resource requirements](/docs/concepts/configuration/manage-compute-resources-container), -[node selectors](/docs/concepts/configuration/assign-pod-node/#nodeselector), +[node selectors](/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector), [pod affinity and -anti-affinity](/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity), +anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity), and [taints and tolerations](/docs/concepts/configuration/taint-and-toleration). The following plugins support `WaitForFirstConsumer` with dynamic provisioning: diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index 1dd5f3cb20..faa40c8dc9 100644 --- a/content/en/docs/concepts/storage/volumes.md +++ b/content/en/docs/concepts/storage/volumes.md @@ -305,6 +305,11 @@ A Container using a ConfigMap as a [subPath](#using-subpath) volume mount will n receive ConfigMap updates. {{< /note >}} +{{< note >}} +Text data is exposed as files using the UTF-8 character encoding. To use some other character encoding, use binaryData. +{{< /note >}} + + ### downwardAPI {#downwardapi} A `downwardAPI` volume is used to make downward API data available to applications. diff --git a/content/en/docs/concepts/workloads/controllers/daemonset.md b/content/en/docs/concepts/workloads/controllers/daemonset.md index f2feb36515..92cd35953b 100644 --- a/content/en/docs/concepts/workloads/controllers/daemonset.md +++ b/content/en/docs/concepts/workloads/controllers/daemonset.md @@ -99,8 +99,8 @@ create a Pod with a different value on a node for testing. If you specify a `.spec.template.spec.nodeSelector`, then the DaemonSet controller will create Pods on nodes which match that [node -selector](/docs/concepts/configuration/assign-pod-node/). Likewise if you specify a `.spec.template.spec.affinity`, -then DaemonSet controller will create Pods on nodes which match that [node affinity](/docs/concepts/configuration/assign-pod-node/). +selector](/docs/concepts/scheduling-eviction/assign-pod-node/). Likewise if you specify a `.spec.template.spec.affinity`, +then DaemonSet controller will create Pods on nodes which match that [node affinity](/docs/concepts/scheduling-eviction/assign-pod-node/). If you do not specify either, then the DaemonSet controller will create Pods on all nodes. ## How Daemon Pods are Scheduled diff --git a/content/en/docs/concepts/workloads/controllers/deployment.md b/content/en/docs/concepts/workloads/controllers/deployment.md index 1fd6c5c9d6..c5751059f6 100644 --- a/content/en/docs/concepts/workloads/controllers/deployment.md +++ b/content/en/docs/concepts/workloads/controllers/deployment.md @@ -1081,6 +1081,15 @@ the default value. All existing Pods are killed before new ones are created when `.spec.strategy.type==Recreate`. +{{< note >}} +This will only guarantee Pod termination previous to creation for upgrades. If you upgrade a Deployment, all Pods +of the old revision will be terminated immediately. Successful removal is awaited before any Pod of the new +revision is created. If you manually delete a Pod, the lifecycle is controlled by the ReplicaSet and the +replacement will be created immediately (even if the old Pod is still in a Terminating state). If you need an +"at most" guarantee for your Pods, you should consider using a +[StatefulSet](/docs/concepts/workloads/controllers/statefulset/). +{{< /note >}} + #### Rolling Update Deployment The Deployment updates Pods in a rolling update diff --git a/content/en/docs/concepts/workloads/controllers/replicaset.md b/content/en/docs/concepts/workloads/controllers/replicaset.md index fe7a96c138..92cbe60a33 100644 --- a/content/en/docs/concepts/workloads/controllers/replicaset.md +++ b/content/en/docs/concepts/workloads/controllers/replicaset.md @@ -330,7 +330,7 @@ Alternatively, you can use the `kubectl autoscale` command to accomplish the sam (and it's easier!) ```shell -kubectl autoscale rs frontend --max=10 +kubectl autoscale rs frontend --max=10 --min=3 --cpu-percent=50 ``` ## Alternatives to ReplicaSet diff --git a/content/en/docs/concepts/workloads/pods/disruptions.md b/content/en/docs/concepts/workloads/pods/disruptions.md index 00265e0433..9983a67fc8 100644 --- a/content/en/docs/concepts/workloads/pods/disruptions.md +++ b/content/en/docs/concepts/workloads/pods/disruptions.md @@ -97,6 +97,8 @@ time as frequent voluntary disruptions. We call this set of features ## How Disruption Budgets Work +{{< feature-state for_k8s_version="v1.5" state="beta" >}} + An Application Owner can create a `PodDisruptionBudget` object (PDB) for each application. A PDB limits the number of pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would @@ -211,7 +213,7 @@ state: | node-1 *drained* | node-2 | node-3 | *no node* | |:--------------------:|:-------------------:|:------------------:|:------------------:| -| | pod-b *available* | pod-c *available* | pod-e *pending* | +| | pod-b *terminating* | pod-c *available* | pod-e *pending* | | | pod-d *available* | pod-y | | At this point, the cluster administrator needs to diff --git a/content/en/docs/concepts/workloads/pods/init-containers.md b/content/en/docs/concepts/workloads/pods/init-containers.md index 2ecbdd702a..8565f49bb3 100644 --- a/content/en/docs/concepts/workloads/pods/init-containers.md +++ b/content/en/docs/concepts/workloads/pods/init-containers.md @@ -46,8 +46,8 @@ including resource limits, volumes, and security settings. However, the resource requests and limits for an init container are handled differently, as documented in [Resources](#resources). -Also, init containers do not support readiness probes because they must run to -completion before the Pod can be ready. +Also, init containers do not support `lifecycle`, `livenessProbe`, `readinessProbe`, or +`startupProbe` because they must run to completion before the Pod can be ready. If you specify multiple init containers for a Pod, Kubelet runs each init container sequentially. Each init container must succeed before the next can run. diff --git a/content/en/docs/concepts/workloads/pods/podpreset.md b/content/en/docs/concepts/workloads/pods/podpreset.md index 876ba995c9..a1906c8b99 100644 --- a/content/en/docs/concepts/workloads/pods/podpreset.md +++ b/content/en/docs/concepts/workloads/pods/podpreset.md @@ -7,6 +7,8 @@ weight: 50 --- {{% capture overview %}} +{{< feature-state for_k8s_version="v1.6" state="alpha" >}} + This page provides an overview of PodPresets, which are objects for injecting certain information into pods at creation time. The information can include secrets, volumes, volume mounts, and environment variables. @@ -14,20 +16,38 @@ secrets, volumes, volume mounts, and environment variables. {{% capture body %}} -## Understanding Pod Presets +## Understanding Pod presets -A `Pod Preset` is an API resource for injecting additional runtime requirements +A PodPreset is an API resource for injecting additional runtime requirements into a Pod at creation time. You use [label selectors](/docs/concepts/overview/working-with-objects/labels/#label-selectors) -to specify the Pods to which a given Pod Preset applies. +to specify the Pods to which a given PodPreset applies. -Using a Pod Preset allows pod template authors to not have to explicitly provide +Using a PodPreset allows pod template authors to not have to explicitly provide all information for every pod. This way, authors of pod templates consuming a specific service do not need to know all the details about that service. -For more information about the background, see the [design proposal for PodPreset](https://git.k8s.io/community/contributors/design-proposals/service-catalog/pod-preset.md). -## How It Works +## Enable PodPreset in your cluster {#enable-pod-preset} + +In order to use Pod presets in your cluster you must ensure the following: + +1. You have enabled the API type `settings.k8s.io/v1alpha1/podpreset`. For + example, this can be done by including `settings.k8s.io/v1alpha1=true` in + the `--runtime-config` option for the API server. In minikube add this flag + `--extra-config=apiserver.runtime-config=settings.k8s.io/v1alpha1=true` while + starting the cluster. +1. You have enabled the admission controller `PodPreset`. One way to doing this + is to include `PodPreset` in the `--enable-admission-plugins` option value specified + for the API server. In minikube, add this flag + + ```shell + --extra-config=apiserver.enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,PodPreset + ``` + + while starting the cluster. + +## How it works Kubernetes provides an admission controller (`PodPreset`) which, when enabled, applies Pod Presets to incoming pod creation requests. @@ -62,31 +82,12 @@ There may be instances where you wish for a Pod to not be altered by any Pod Preset mutations. In these cases, you can add an annotation in the Pod Spec of the form: `podpreset.admission.kubernetes.io/exclude: "true"`. -## Enable Pod Preset - -In order to use Pod Presets in your cluster you must ensure the following: - -1. You have enabled the API type `settings.k8s.io/v1alpha1/podpreset`. For - example, this can be done by including `settings.k8s.io/v1alpha1=true` in - the `--runtime-config` option for the API server. In minikube add this flag - `--extra-config=apiserver.runtime-config=settings.k8s.io/v1alpha1=true` while - starting the cluster. -1. You have enabled the admission controller `PodPreset`. One way to doing this - is to include `PodPreset` in the `--enable-admission-plugins` option value specified - for the API server. In minikube add this flag - - ```shell - --extra-config=apiserver.enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,PodPreset - ``` - - while starting the cluster. -1. You have defined your Pod Presets by creating `PodPreset` objects in the - namespace you will use. - {{% /capture %}} {{% capture whatsnext %}} -* [Injecting data into a Pod using PodPreset](/docs/tasks/inject-data-application/podpreset/) +See [Injecting data into a Pod using PodPreset](/docs/tasks/inject-data-application/podpreset/) + +For more information about the background, see the [design proposal for PodPreset](https://git.k8s.io/community/contributors/design-proposals/service-catalog/pod-preset.md). {{% /capture %}} diff --git a/content/en/docs/contribute/advanced.md b/content/en/docs/contribute/advanced.md index 6574bba709..2ed3a4afd6 100644 --- a/content/en/docs/contribute/advanced.md +++ b/content/en/docs/contribute/advanced.md @@ -35,7 +35,7 @@ The PR wrangler’s duties include: - Assign relevant `sig/` label(s). - If needed, assign reviewers from the `reviewers:` block in the file's front matter. - Assign `Docs Review` and `Tech Review` labels to indicate the PR's review status. - - Assign`Needs Doc Review` or `Needs Tech Review` for PRs that haven't yet been reviewed. + - Assign `Needs Doc Review` or `Needs Tech Review` for PRs that haven't yet been reviewed. - Assign `Doc Review: Open Issues` or `Tech Review: Open Issues` for PRs that have been reviewed and require further input or action before merging. - Assign `/lgtm` and `/approve` labels to PRs that can be merged. - Merge PRs when they are ready, or close PRs that shouldn’t be accepted. @@ -43,7 +43,7 @@ The PR wrangler’s duties include: ### Helpful GitHub queries for wranglers -The following queries are helpful when wrangling. After working through these three queries, the remaining list of PRs to be +The following queries are helpful when wrangling. After working through these queries, the remaining list of PRs to be reviewed is usually small. These queries specifically exclude localization PRs, and only include the `master` branch (except for the last one). - [No CLA, not eligible to merge](https://github.com/kubernetes/website/pulls?q=is%3Aopen+is%3Apr+label%3A%22cncf-cla%3A+no%22+-label%3Ado-not-merge+label%3Alanguage%2Fen): @@ -245,4 +245,4 @@ When you’re ready to stop recording, click Stop. The video uploads automatically to YouTube. -{{% /capture %}} \ No newline at end of file +{{% /capture %}} diff --git a/content/en/docs/reference/access-authn-authz/admission-controllers.md b/content/en/docs/reference/access-authn-authz/admission-controllers.md index a19d492d54..a254e43a84 100644 --- a/content/en/docs/reference/access-authn-authz/admission-controllers.md +++ b/content/en/docs/reference/access-authn-authz/admission-controllers.md @@ -250,7 +250,7 @@ for more details. This plug-in facilitates creation of dedicated nodes with extended resources. If operators want to create dedicated nodes with extended resources (like GPUs, FPGAs etc.), they are expected to -[taint the node](/docs/concepts/configuration/taint-and-toleration/#example-use-cases) with the extended resource +[taint the node](/docs/concepts/scheduling-eviction/taint-and-toleration/#example-use-cases) with the extended resource name as the key. This admission controller, if enabled, automatically adds tolerations for such taints to pods requesting extended resources, so users don't have to manually add these tolerations. diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates.md b/content/en/docs/reference/command-line-tools-reference/feature-gates.md index 64ab4d45bf..752ee40f7d 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates.md @@ -114,6 +114,8 @@ different Kubernetes components. | `MountContainers` | `false` | Alpha | 1.9 | | | `NodeDisruptionExclusion` | `false` | Alpha | 1.16 | | | `NonPreemptingPriority` | `false` | Alpha | 1.15 | | +| `PodDisruptionBudget` | `false` | Alpha | 1.3 | 1.4 | +| `PodDisruptionBudget` | `true` | Beta | 1.5 | | | `PodOverhead` | `false` | Alpha | 1.16 | - | | `ProcMountType` | `false` | Alpha | 1.12 | | | `QOSReserved` | `false` | Alpha | 1.11 | | @@ -333,7 +335,7 @@ Each feature gate is designed for enabling/disabling a specific feature: - `Accelerators`: Enable Nvidia GPU support when using Docker - `AdvancedAuditing`: Enable [advanced auditing](/docs/tasks/debug-application-cluster/audit/#advanced-audit) -- `AffinityInAnnotations`(*deprecated*): Enable setting [Pod affinity or anti-affinity](/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). +- `AffinityInAnnotations`(*deprecated*): Enable setting [Pod affinity or anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity). - `AllowExtTrafficLocalEndpoints`: Enable a service to route external requests to node local endpoints. - `AnyVolumeDataSource`: Enable use of any custom resource as the `DataSource` of a {{< glossary_tooltip text="PVC" term_id="persistent-volume-claim" >}}. @@ -441,6 +443,7 @@ Each feature gate is designed for enabling/disabling a specific feature: - `NonPreemptingPriority`: Enable NonPreempting option for PriorityClass and Pod. - `PersistentLocalVolumes`: Enable the usage of `local` volume type in Pods. Pod affinity has to be specified if requesting a `local` volume. +- `PodDisruptionBudget`: Enable the [PodDisruptionBudget](/docs/tasks/run-application/configure-pdb/) feature. - `PodOverhead`: Enable the [PodOverhead](/docs/concepts/configuration/pod-overhead/) feature to account for pod overheads. - `PodPriority`: Enable the descheduling and preemption of Pods based on their [priorities](/docs/concepts/configuration/pod-priority-preemption/). - `PodReadinessGates`: Enable the setting of `PodReadinessGate` field for extending @@ -486,7 +489,7 @@ Each feature gate is designed for enabling/disabling a specific feature: - `Sysctls`: Enable support for namespaced kernel parameters (sysctls) that can be set for each pod. See [sysctls](/docs/tasks/administer-cluster/sysctl-cluster/) for more details. - `TaintBasedEvictions`: Enable evicting pods from nodes based on taints on nodes and tolerations on Pods. - See [taints and tolerations](/docs/concepts/configuration/taint-and-toleration/) for more details. + See [taints and tolerations](/docs/concepts/scheduling-eviction/taint-and-toleration/) for more details. - `TaintNodesByCondition`: Enable automatic tainting nodes based on [node conditions](/docs/concepts/architecture/nodes/#condition). - `TokenRequest`: Enable the `TokenRequest` endpoint on service account resources. - `TokenRequestProjection`: Enable the injection of service account tokens into diff --git a/content/en/docs/reference/command-line-tools-reference/kubelet.md b/content/en/docs/reference/command-line-tools-reference/kubelet.md index 660463c64d..707005d020 100644 --- a/content/en/docs/reference/command-line-tools-reference/kubelet.md +++ b/content/en/docs/reference/command-line-tools-reference/kubelet.md @@ -96,7 +96,7 @@ kubelet [flags] --authorization-mode string - Authorization mode for Kubelet server. Valid options are AlwaysAllow or Webhook. Webhook mode uses the SubjectAccessReview API to determine authorization. (default "AlwaysAllow") (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.) + Authorization mode for Kubelet server. Valid options are AlwaysAllow or Webhook. Webhook mode uses the SubjectAccessReview API to determine authorization. (default "AlwaysAllow" when --config flag is not provided; "Webhook" when --config flag presents.) (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.) diff --git a/content/en/docs/reference/glossary/node.md b/content/en/docs/reference/glossary/node.md index a67ecf488d..fd09ec75b4 100755 --- a/content/en/docs/reference/glossary/node.md +++ b/content/en/docs/reference/glossary/node.md @@ -15,3 +15,5 @@ tags: A worker node may be a VM or physical machine, depending on the cluster. It has local daemons or services necessary to run {{< glossary_tooltip text="Pods" term_id="pod" >}} and is managed by the control plane. The daemons on a node include {{< glossary_tooltip text="kubelet" term_id="kubelet" >}}, {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}}, and a container runtime implementing the {{< glossary_tooltip text="CRI" term_id="cri" >}} such as {{< glossary_tooltip term_id="docker" >}}. + +In early Kubernetes versions, Nodes were called “Minions”. diff --git a/content/en/docs/reference/glossary/taint.md b/content/en/docs/reference/glossary/taint.md index c1aaaf5f65..50ba2d087e 100644 --- a/content/en/docs/reference/glossary/taint.md +++ b/content/en/docs/reference/glossary/taint.md @@ -2,7 +2,7 @@ title: Taint id: taint date: 2019-01-11 -full_link: /docs/concepts/configuration/taint-and-toleration/ +full_link: /docs/concepts/scheduling-eviction/taint-and-toleration/ short_description: > A core object consisting of three required properties: key, value, and effect. Taints prevent the scheduling of pods on nodes or node groups. diff --git a/content/en/docs/reference/glossary/toleration.md b/content/en/docs/reference/glossary/toleration.md index e6264224e9..fb2f2e6d78 100644 --- a/content/en/docs/reference/glossary/toleration.md +++ b/content/en/docs/reference/glossary/toleration.md @@ -2,7 +2,7 @@ title: Toleration id: toleration date: 2019-01-11 -full_link: /docs/concepts/configuration/taint-and-toleration/ +full_link: /docs/concepts/scheduling-eviction/taint-and-toleration/ short_description: > A core object consisting of three required properties: key, value, and effect. Tolerations enable the scheduling of pods on nodes or node groups that have a matching taint. diff --git a/content/en/docs/reference/kubectl/overview.md b/content/en/docs/reference/kubectl/overview.md index 1bb82cf962..de5c98c887 100644 --- a/content/en/docs/reference/kubectl/overview.md +++ b/content/en/docs/reference/kubectl/overview.md @@ -91,7 +91,7 @@ Operation | Syntax | Description `port-forward` | `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags]` | Forward one or more local ports to a pod. `proxy` | `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags]` | Run a proxy to the Kubernetes API server. `replace` | `kubectl replace -f FILENAME` | Replace a resource from a file or stdin. -`run` | `kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=server|client|none] [--overrides=inline-json] [flags]` | Run a specified image on the cluster. +`run` | kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client|none] [--overrides=inline-json] [flags] | Run a specified image on the cluster. `scale` | kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version] [--current-replicas=count] [flags] | Update the size of the specified replication controller. `version` | `kubectl version [--client] [flags]` | Display the Kubernetes version running on the client and server. @@ -243,8 +243,8 @@ kubectl get pods --server-print=false Output looks like this: ```shell -NAME READY STATUS RESTARTS AGE -pod-name 1/1 Running 0 1m +NAME AGE +pod-name 1m ``` ### Sorting list objects @@ -339,8 +339,8 @@ the pods running on it, the events generated for the node etc. # Delete a pod using the type and name specified in the pod.yaml file. kubectl delete -f pod.yaml -# Delete all the pods and services that have the label name=. -kubectl delete pods,services -l name= +# Delete all the pods and services that have the label '='. +kubectl delete pods,services -l = # Delete all pods, including uninitialized ones. kubectl delete pods --all @@ -350,13 +350,13 @@ kubectl delete pods --all ```shell # Get output from running 'date' from pod . By default, output is from the first container. -kubectl exec date +kubectl exec -- date # Get output from running 'date' in container of pod . -kubectl exec -c date +kubectl exec -c -- date # Get an interactive TTY and run /bin/bash from pod . By default, output is from the first container. -kubectl exec -ti /bin/bash +kubectl exec -ti -- /bin/bash ``` `kubectl logs` - Print the logs for a container in a pod. @@ -451,7 +451,7 @@ cat ./kubectl-whoami # this plugin makes use of the `kubectl config` command in order to output # information about the current user, based on the currently selected context -kubectl config view --template='{{ range .contexts }}{{ if eq .name "'$(kubectl config current-context)'" }}Current user: {{ .context.user }}{{ end }}{{ end }}' +kubectl config view --template='{{ range .contexts }}{{ if eq .name "'$(kubectl config current-context)'" }}Current user: {{ printf "%s\n" .context.user }}{{ end }}{{ end }}' ``` Running the above plugin gives us an output containing the user for the currently selected diff --git a/content/en/docs/reference/scheduling/policies.md b/content/en/docs/reference/scheduling/policies.md index 53e5981dea..0bf6e030b0 100644 --- a/content/en/docs/reference/scheduling/policies.md +++ b/content/en/docs/reference/scheduling/policies.md @@ -77,7 +77,7 @@ The following *priorities* implement scoring: {{< glossary_tooltip term_id="replica-set" >}}. - `InterPodAffinityPriority`: Implements preferred - [inter pod affininity and antiaffinity](/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity). + [inter pod affininity and antiaffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity). - `LeastRequestedPriority`: Favors nodes with fewer requested resources. In other words, the more Pods that are placed on a Node, and the more resources those @@ -97,7 +97,7 @@ The following *priorities* implement scoring: - `NodeAffinityPriority`: Prioritizes nodes according to node affinity scheduling preferences indicated in PreferredDuringSchedulingIgnoredDuringExecution. - You can read more about this in [Assigning Pods to Nodes](/docs/concepts/configuration/assign-pod-node/). + You can read more about this in [Assigning Pods to Nodes](/docs/concepts/scheduling-eviction/assign-pod-node/). - `TaintTolerationPriority`: Prepares the priority list for all the nodes, based on the number of intolerable taints on the node. This policy adjusts a node's rank diff --git a/content/en/docs/reference/scheduling/profiles.md b/content/en/docs/reference/scheduling/profiles.md index b8ab40c3fe..48fa961b2e 100644 --- a/content/en/docs/reference/scheduling/profiles.md +++ b/content/en/docs/reference/scheduling/profiles.md @@ -68,7 +68,7 @@ extension points: Pod runs. Extension points: `Score`. - `TaintToleration`: Implements - [taints and tolerations](/docs/concepts/configuration/taint-and-toleration/). + [taints and tolerations](/docs/concepts/scheduling-eviction/taint-and-toleration/). Implements extension points: `Filter`, `Prescore`, `Score`. - `NodeName`: Checks if a Pod spec node name matches the current node. Extension points: `Filter`. @@ -79,8 +79,8 @@ extension points: `scheduler.alpha.kubernetes.io/preferAvoidPods`. Extension points: `Score`. - `NodeAffinity`: Implements - [node selectors](/docs/concepts/configuration/assign-pod-node/#nodeselector) - and [node affinity](/docs/concepts/configuration/assign-pod-node/#node-affinity). + [node selectors](/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) + and [node affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). Extension points: `Filter`, `Score`. - `PodTopologySpread`: Implements [Pod topology spread](/docs/concepts/workloads/pods/pod-topology-spread-constraints/). @@ -117,7 +117,7 @@ extension points: the node. Extension points: `Filter`. - `InterPodAffinity`: Implements - [inter-Pod affinity and anti-affinity](/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity). + [inter-Pod affinity and anti-affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity). Extension points: `PreFilter`, `Filter`, `PreScore`, `Score`. - `PrioritySort`: Provides the default priority based sorting. Extension points: `QueueSort`. diff --git a/content/en/docs/reference/setup-tools/kubeadm/implementation-details.md b/content/en/docs/reference/setup-tools/kubeadm/implementation-details.md index e368a56847..380838b179 100644 --- a/content/en/docs/reference/setup-tools/kubeadm/implementation-details.md +++ b/content/en/docs/reference/setup-tools/kubeadm/implementation-details.md @@ -81,12 +81,12 @@ The user can skip specific preflight checks or all of them with the `--ignore-pr - [warning] If the Kubernetes version to use (specified with the `--kubernetes-version` flag) is at least one minor version higher than the kubeadm CLI version. - Kubernetes system requirements: - if running on linux: - - [error] if not Kernel 3.10+ or 4+ with specific KernelSpec + - [error] if Kernel is older than the minimum required version - [error] if required cgroups subsystem aren't in set up - if using docker: - [warning/error] if Docker service does not exist, if it is disabled, if it is not active. - [error] if Docker endpoint does not exist or does not work - - [warning] if docker version >17.03 + - [warning] if docker version is not in the list of validated docker versions - If using other cri engine: - [error] if crictl socket does not answer - [error] if user is not root @@ -108,7 +108,7 @@ The user can skip specific preflight checks or all of them with the `--ignore-pr - [warning] if connection to services subnet goes through proxy (only first address checked) - [warning] if connection to Pods subnet goes through proxy (only first address checked) - If external etcd is provided: - - [Error] if etcd version less than 3.0.14 + - [Error] if etcd version is older than the minimum required version - [Error] if etcd certificates or keys are specified, but not provided - If external etcd is NOT provided (and thus local etcd will be installed): - [Error] if ports 2379 is used diff --git a/content/en/docs/reference/using-api/api-concepts.md b/content/en/docs/reference/using-api/api-concepts.md index 4d06194a59..956c31323d 100644 --- a/content/en/docs/reference/using-api/api-concepts.md +++ b/content/en/docs/reference/using-api/api-concepts.md @@ -109,6 +109,7 @@ To mitigate the impact of short history window, we introduced a concept of `book `Bookmark` events can be requested by `allowWatchBookmarks=true` option in watch requests, but clients shouldn't assume bookmarks are returned at any specific interval, nor may they assume the server will send any `bookmark` event. ## Retrieving large results sets in chunks +{{< feature-state for_k8s_version="v1.9" state="beta" >}} On large clusters, retrieving the collection of some resource types may result in very large responses that can impact the server and client. For instance, a cluster may have tens of thousands of pods, each of which is 1-2kb of encoded JSON. Retrieving all pods across all namespaces may result in a very large response (10-20MB) and consume a large amount of server resources. Starting in Kubernetes 1.9 the server supports the ability to break a single large collection request into many smaller chunks while preserving the consistency of the total request. Each chunk can be returned sequentially which reduces both the total size of the request and allows user-oriented clients to display results incrementally to improve responsiveness. diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md b/content/en/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md index 641d349440..070dbd7274 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md @@ -15,15 +15,15 @@ The lifecycle of the kubeadm CLI tool is decoupled from the on each node within the Kubernetes cluster. The kubeadm CLI tool is executed by the user when Kubernetes is initialized or upgraded, whereas the kubelet is always running in the background. -Since the kubelet is a daemon, it needs to be maintained by some kind of a init +Since the kubelet is a daemon, it needs to be maintained by some kind of an init system or service manager. When the kubelet is installed using DEBs or RPMs, systemd is configured to manage the kubelet. You can use a different service manager instead, but you need to configure it manually. Some kubelet configuration details need to be the same across all kubelets involved in the cluster, while -other configuration aspects need to be set on a per-kubelet basis, to accommodate the different -characteristics of a given machine, such as OS, storage, and networking. You can manage the configuration -of your kubelets manually, but [kubeadm now provides a `KubeletConfiguration` API type for managing your +other configuration aspects need to be set on a per-kubelet basis to accommodate the different +characteristics of a given machine (such as OS, storage, and networking). You can manage the configuration +of your kubelets manually, but kubeadm now provides a `KubeletConfiguration` API type for [managing your kubelet configurations centrally](#configure-kubelets-using-kubeadm). {{% /capture %}} @@ -67,7 +67,7 @@ For more details on the ComponentConfig have a look at [this section](#configure ### Providing instance-specific configuration details -Some hosts require specific kubelet configurations, due to differences in hardware, operating system, +Some hosts require specific kubelet configurations due to differences in hardware, operating system, networking, or other host-specific parameters. The following list provides a few examples. - The path to the DNS resolution file, as specified by the `--resolv-conf` kubelet @@ -79,7 +79,7 @@ networking, or other host-specific parameters. The following list provides a few unless you are using a cloud provider. You can use the `--hostname-override` flag to override the default behavior if you need to specify a Node name different from the machine's hostname. -- Currently, the kubelet cannot automatically detects the cgroup driver used by the CRI runtime, +- Currently, the kubelet cannot automatically detect the cgroup driver used by the CRI runtime, but the value of `--cgroup-driver` must match the cgroup driver used by the CRI runtime to ensure the health of the kubelet. @@ -107,7 +107,7 @@ for more information on the individual fields. When you call `kubeadm init`, the kubelet configuration is marshalled to disk at `/var/lib/kubelet/config.yaml`, and also uploaded to a ConfigMap in the cluster. The ConfigMap -is named `kubelet-config-1.X`, where `.X` is the minor version of the Kubernetes version you are +is named `kubelet-config-1.X`, where `X` is the minor version of the Kubernetes version you are initializing. A kubelet configuration file is also written to `/etc/kubernetes/kubelet.conf` with the baseline cluster-wide configuration for all kubelets in the cluster. This configuration file points to the client certificates that allow the kubelet to communicate with the API server. This @@ -157,12 +157,12 @@ has finished performing the TLS Bootstrap. ## The kubelet drop-in file for systemd -kubeadm ships with configuration for how systemd should run the kubelet. +`kubeadm` ships with configuration for how systemd should run the kubelet. Note that the kubeadm CLI command never touches this drop-in file. -This configuration file installed by the `kubeadm` [DEB](https://github.com/kubernetes/kubernetes/blob/master/build/debs/10-kubeadm.conf) or [RPM package](https://github.com/kubernetes/kubernetes/blob/master/build/rpms/10-kubeadm.conf) is written to +This configuration file installed by the `kubeadm` [DEB](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf) or [RPM package](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/rpm/kubeadm/10-kubeadm.conf) is written to `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` and is used by systemd. -It augments the basic [`kubelet.service` for RPM](https://github.com/kubernetes/kubernetes/blob/master/build/rpms/kubelet.service) (resp. [`kubelet.service` for DEB](https://github.com/kubernetes/kubernetes/blob/master/build/debs/kubelet.service))): +It augments the basic [`kubelet.service` for RPM](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/rpm/kubelet/kubelet.service) or [`kubelet.service` for DEB](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/deb/kubelet/lib/systemd/system/kubelet.service): ```none [Service] diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md b/content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md index a7ef208052..054f4b28fb 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md @@ -356,7 +356,7 @@ the field will be omitted when marshalling. When the field is omitted, kubeadm a There are at least two workarounds: -1. Use the `node-role.kubernetes.io/master:PreferNoSchedule` taint instead of an empty slice. [Pods will get scheduled on masters](/docs/concepts/configuration/taint-and-toleration/), unless other nodes have capacity. +1. Use the `node-role.kubernetes.io/master:PreferNoSchedule` taint instead of an empty slice. [Pods will get scheduled on masters](/docs/concepts/scheduling-eviction/taint-and-toleration/), unless other nodes have capacity. 2. Remove the taint after kubeadm init exits: ```bash diff --git a/content/en/docs/setup/production-environment/windows/user-guide-windows-containers.md b/content/en/docs/setup/production-environment/windows/user-guide-windows-containers.md index a79cc80b59..aa1c1f3783 100644 --- a/content/en/docs/setup/production-environment/windows/user-guide-windows-containers.md +++ b/content/en/docs/setup/production-environment/windows/user-guide-windows-containers.md @@ -70,7 +70,7 @@ spec: - -command - "<#code used from https://gist.github.com/wagnerandrade/5424431#> ; $$listener = New-Object System.Net.HttpListener ; $$listener.Prefixes.Add('http://*:80/') ; $$listener.Start() ; $$callerCounts = @{} ; Write-Host('Listening at http://*:80/') ; while ($$listener.IsListening) { ;$$context = $$listener.GetContext() ;$$requestUrl = $$context.Request.Url ;$$clientIP = $$context.Request.RemoteEndPoint.Address ;$$response = $$context.Response ;Write-Host '' ;Write-Host('> {0}' -f $$requestUrl) ; ;$$count = 1 ;$$k=$$callerCounts.Get_Item($$clientIP) ;if ($$k -ne $$null) { $$count += $$k } ;$$callerCounts.Set_Item($$clientIP, $$count) ;$$ip=(Get-NetAdapter | Get-NetIpAddress); $$header='

Windows Container Web Server

' ;$$callerCountsString='' ;$$callerCounts.Keys | % { $$callerCountsString+='

IP {0} callerCount {1} ' -f $$ip[1].IPAddress,$$callerCounts.Item($$_) } ;$$footer='' ;$$content='{0}{1}{2}' -f $$header,$$callerCountsString,$$footer ;Write-Output $$content ;$$buffer = [System.Text.Encoding]::UTF8.GetBytes($$content) ;$$response.ContentLength64 = $$buffer.Length ;$$response.OutputStream.Write($$buffer, 0, $$buffer.Length) ;$$response.Close() ;$$responseStatus = $$response.StatusCode ;Write-Host('< {0}' -f $$responseStatus) } ; " nodeSelector: - beta.kubernetes.io/os: windows + kubernetes.io/os: windows ``` {{< note >}} diff --git a/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md b/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md index 4cccac0f58..acd023548a 100644 --- a/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md +++ b/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md @@ -346,7 +346,7 @@ export KUBECONFIG=$KUBECONFIG:$HOME/.kube/config ``` ### Windows Powershell ```shell -$Env:KUBECONFIG=($Env:KUBECONFIG;$HOME/.kube/config) +$Env:KUBECONFIG="$Env:KUBECONFIG;$HOME\.kube\config" ``` View configuration information merged from all the files that are now listed diff --git a/content/en/docs/tasks/access-application-cluster/connecting-frontend-backend.md b/content/en/docs/tasks/access-application-cluster/connecting-frontend-backend.md index 123271be44..264d930d5f 100644 --- a/content/en/docs/tasks/access-application-cluster/connecting-frontend-backend.md +++ b/content/en/docs/tasks/access-application-cluster/connecting-frontend-backend.md @@ -203,6 +203,17 @@ The output shows the message generated by the backend: {{% /capture %}} +{{% capture cleanup %}} + +To delete the Services, enter this command: + + kubectl delete services frontend hello + +To delete the Deployments, the ReplicaSets and the Pods that are running the backend and frontend applications, enter this command: + + kubectl delete deployment frontend hello + +{{% /capture %}} {{% capture whatsnext %}} diff --git a/content/en/docs/tasks/access-application-cluster/ingress-minikube.md b/content/en/docs/tasks/access-application-cluster/ingress-minikube.md index c07155a259..0a16c71064 100644 --- a/content/en/docs/tasks/access-application-cluster/ingress-minikube.md +++ b/content/en/docs/tasks/access-application-cluster/ingress-minikube.md @@ -66,7 +66,7 @@ This page shows you how to set up a simple Ingress which routes requests to Serv 1. Create a Deployment using the following command: ```shell - kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0 --port=8080 + kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0 ``` Output: @@ -203,7 +203,7 @@ The following file is an Ingress resource that sends traffic to your Service via 1. Create a v2 Deployment using the following command: ```shell - kubectl run web2 --image=gcr.io/google-samples/hello-app:2.0 --port=8080 + kubectl create deployment web2 --image=gcr.io/google-samples/hello-app:2.0 ``` Output: @@ -214,7 +214,7 @@ The following file is an Ingress resource that sends traffic to your Service via 1. Expose the Deployment: ```shell - kubectl expose deployment web2 --target-port=8080 --type=NodePort + kubectl expose deployment web2 --port=8080 --type=NodePort ``` Output: @@ -228,7 +228,7 @@ The following file is an Ingress resource that sends traffic to your Service via 1. Edit the existing `example-ingress.yaml` and add the following lines: ```yaml - - path: /v2/* + - path: /v2 backend: serviceName: web2 servicePort: 8080 diff --git a/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md b/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md index 2098a42991..a1d4c786c6 100644 --- a/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md +++ b/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md @@ -20,7 +20,7 @@ in the namespace. {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} -Each node in your cluster must have at least 1 CPU. +Your cluster must have at least 1 CPU available for use to run the task examples. {{% /capture %}} @@ -204,11 +204,7 @@ Because your Container did not specify its own CPU request and limit, it was giv [default CPU request and limit](/docs/tasks/administer-cluster/cpu-default-namespace/) from the LimitRange. -At this point, your Container might be running or it might not be running. Recall that a prerequisite -for this task is that your Nodes have at least 1 CPU. If each of your Nodes has only -1 CPU, then there might not be enough allocatable CPU on any Node to accommodate a request -of 800 millicpu. If you happen to be using Nodes with 2 CPU, then you probably have -enough CPU to accommodate the 800 millicpu request. +At this point, your Container might be running or it might not be running. Recall that a prerequisite for this task is that your cluster must have at least 1 CPU available for use. If each of your Nodes has only 1 CPU, then there might not be enough allocatable CPU on any Node to accommodate a request of 800 millicpu. If you happen to be using Nodes with 2 CPU, then you probably have enough CPU to accommodate the 800 millicpu request. Delete your Pod: diff --git a/content/en/docs/tasks/administer-cluster/namespaces-walkthrough.md b/content/en/docs/tasks/administer-cluster/namespaces-walkthrough.md index 9a69058ceb..9e3f4d6371 100644 --- a/content/en/docs/tasks/administer-cluster/namespaces-walkthrough.md +++ b/content/en/docs/tasks/administer-cluster/namespaces-walkthrough.md @@ -268,7 +268,8 @@ kubectl get pods Production likes to run cattle, so let's create some cattle pods. ```shell -kubectl run cattle --image=k8s.gcr.io/serve_hostname --replicas=5 +kubectl create deployment cattle --image=k8s.gcr.io/serve_hostname +kubectl scale deployment cattle --replicas=5 kubectl get deployment ``` diff --git a/content/en/docs/tasks/administer-cluster/namespaces.md b/content/en/docs/tasks/administer-cluster/namespaces.md index de2230a6a4..076f81d9b9 100644 --- a/content/en/docs/tasks/administer-cluster/namespaces.md +++ b/content/en/docs/tasks/administer-cluster/namespaces.md @@ -189,7 +189,8 @@ This delete is asynchronous, so for a time you will see the namespace in the `Te To demonstrate this, let's spin up a simple Deployment and Pods in the `development` namespace. ```shell - kubectl run snowflake --image=k8s.gcr.io/serve_hostname --replicas=2 -n=development + kubectl create deployment snowflake --image=k8s.gcr.io/serve_hostname -n=development + kubectl scale deployment snowflake --replicas=2 -n=development ``` We have just created a deployment whose replica size is 2 that is running the pod called `snowflake` with a basic container that just serves the hostname. Note that `kubectl run` creates deployments only on Kubernetes cluster >= v1.2. If you are running older versions, it creates replication controllers instead. diff --git a/content/en/docs/tasks/administer-cluster/nodelocaldns.md b/content/en/docs/tasks/administer-cluster/nodelocaldns.md index 6502ce1472..0907f8f0ac 100644 --- a/content/en/docs/tasks/administer-cluster/nodelocaldns.md +++ b/content/en/docs/tasks/administer-cluster/nodelocaldns.md @@ -32,7 +32,7 @@ Having a local cache will help improve the latency in such scenarios. * Skipping iptables DNAT and connection tracking will help reduce [conntrack races](https://github.com/kubernetes/kubernetes/issues/56903) and avoid UDP DNS entries filling up conntrack table. -* Connections from local caching agent to kube-dns servie can be upgraded to TCP. TCP conntrack entries will be removed on connection close in contrast with UDP entries that have to timeout ([default](https://www.kernel.org/doc/Documentation/networking/nf_conntrack-sysctl.txt) `nf_conntrack_udp_timeout` is 30 seconds) +* Connections from local caching agent to kube-dns service can be upgraded to TCP. TCP conntrack entries will be removed on connection close in contrast with UDP entries that have to timeout ([default](https://www.kernel.org/doc/Documentation/networking/nf_conntrack-sysctl.txt) `nf_conntrack_udp_timeout` is 30 seconds) * Upgrading DNS queries from UDP to TCP would reduce tail latency attributed to dropped UDP packets and DNS timeouts usually up to 30s (3 retries + 10s timeout). Since the nodelocal cache listens for UDP DNS queries, applications don't need to be changed. diff --git a/content/en/docs/tasks/administer-cluster/securing-a-cluster.md b/content/en/docs/tasks/administer-cluster/securing-a-cluster.md index 38eab4ded2..d2d58ae702 100644 --- a/content/en/docs/tasks/administer-cluster/securing-a-cluster.md +++ b/content/en/docs/tasks/administer-cluster/securing-a-cluster.md @@ -173,8 +173,8 @@ to the metadata API, and avoid using provisioning data to deliver secrets. ### Controlling which nodes pods may access By default, there are no restrictions on which nodes may run a pod. Kubernetes offers a -[rich set of policies for controlling placement of pods onto nodes](/docs/concepts/configuration/assign-pod-node/) -and the [taint based pod placement and eviction](/docs/concepts/configuration/taint-and-toleration/) +[rich set of policies for controlling placement of pods onto nodes](/docs/concepts/scheduling-eviction/assign-pod-node/) +and the [taint based pod placement and eviction](/docs/concepts/scheduling-eviction/taint-and-toleration/) that are available to end users. For many clusters use of these policies to separate workloads can be a convention that authors adopt or enforce via tooling. diff --git a/content/en/docs/tasks/administer-cluster/sysctl-cluster.md b/content/en/docs/tasks/administer-cluster/sysctl-cluster.md index 5e57c18379..f96c066dd5 100644 --- a/content/en/docs/tasks/administer-cluster/sysctl-cluster.md +++ b/content/en/docs/tasks/administer-cluster/sysctl-cluster.md @@ -159,7 +159,7 @@ A pod with the _unsafe_ sysctls will fail to launch on any node which has not enabled those two _unsafe_ sysctls explicitly. As with _node-level_ sysctls it is recommended to use [_taints and toleration_ feature](/docs/reference/generated/kubectl/kubectl-commands/#taint) or -[taints on nodes](/docs/concepts/configuration/taint-and-toleration/) +[taints on nodes](/docs/concepts/scheduling-eviction/taint-and-toleration/) to schedule those pods onto the right nodes. ## PodSecurityPolicy diff --git a/content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md b/content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md index c5ec448e48..a622eb5917 100644 --- a/content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md +++ b/content/en/docs/tasks/configure-pod-container/assign-cpu-resource.md @@ -18,7 +18,7 @@ allocated as much CPU as it requests. {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} -Each node in your cluster must have at least 1 CPU. +Your cluster must have at least 1 CPU available for use to run the task examples. A few of the steps on this page require you to run the [metrics-server](https://github.com/kubernetes-incubator/metrics-server) @@ -122,9 +122,7 @@ Recall that by setting `-cpu "2"`, you configured the Container to attempt to us {{< note >}} Another possible explanation for the CPU use being below 1.0 is that the Node might not have -enough CPU resources available. Recall that the prerequisites for this exercise require each of -your Nodes to have at least 1 CPU. If your Container runs on a Node that has only 1 CPU, the Container -cannot use more than 1 CPU regardless of the CPU limit specified for the Container. +enough CPU resources available. Recall that the prerequisites for this exercise require your cluster to have at least 1 CPU available for use. If your Container runs on a Node that has only 1 CPU, the Container cannot use more than 1 CPU regardless of the CPU limit specified for the Container. {{< /note >}} ## CPU units diff --git a/content/en/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity.md b/content/en/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity.md index ded131d610..16773cd215 100644 --- a/content/en/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity.md +++ b/content/en/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity.md @@ -116,5 +116,5 @@ This means that the pod will prefer a node that has a `disktype=ssd` label. {{% capture whatsnext %}} Learn more about -[Node Affinity](/docs/concepts/configuration/assign-pod-node/#node-affinity). +[Node Affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity). {{% /capture %}} diff --git a/content/en/docs/tasks/configure-pod-container/configure-gmsa.md b/content/en/docs/tasks/configure-pod-container/configure-gmsa.md index 83d9dee596..8045ae9a02 100644 --- a/content/en/docs/tasks/configure-pod-container/configure-gmsa.md +++ b/content/en/docs/tasks/configure-pod-container/configure-gmsa.md @@ -154,7 +154,7 @@ spec: imagePullPolicy: Always name: iis nodeSelector: - beta.kubernetes.io/os: windows + kubernetes.io/os: windows ``` Individual containers in a Pod spec can also specify the desired GMSA credspec using a per-container `securityContext.windowsOptions.gmsaCredentialSpecName` field. For example: @@ -185,7 +185,7 @@ spec: windowsOptions: gmsaCredentialSpecName: gmsa-Webapp1 nodeSelector: - beta.kubernetes.io/os: windows + kubernetes.io/os: windows ``` As Pod specs with GMSA fields populated (as described above) are applied in a cluster, the following sequence of events take place: diff --git a/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md b/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md index 71fad95de9..c7f80b0fad 100644 --- a/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md +++ b/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md @@ -588,6 +588,10 @@ SPECIAL_TYPE If there are some files in the `/etc/config/` directory, they will be deleted. {{< /caution >}} +{{< note >}} +Text data is exposed as files using the UTF-8 character encoding. To use some other character encoding, use binaryData. +{{< /note >}} + ### Add ConfigMap data to a specific path in the Volume Use the `path` field to specify the desired file path for specific ConfigMap items. diff --git a/content/en/docs/tasks/configure-pod-container/security-context.md b/content/en/docs/tasks/configure-pod-container/security-context.md index 038fbcb97f..0c2bb05d0c 100644 --- a/content/en/docs/tasks/configure-pod-container/security-context.md +++ b/content/en/docs/tasks/configure-pod-container/security-context.md @@ -11,7 +11,7 @@ weight: 80 {{% capture overview %}} A security context defines privilege and access control settings for -a Pod or Container. Security context settings include: +a Pod or Container. Security context settings include, but are not limited to: * Discretionary Access Control: Permission to access an object, like a file, is based on [user ID (UID) and group ID (GID)](https://wiki.archlinux.org/index.php/users_and_groups). @@ -28,6 +28,12 @@ a Pod or Container. Security context settings include: * AllowPrivilegeEscalation: Controls whether a process can gain more privileges than its parent process. This bool directly controls whether the [`no_new_privs`](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt) flag gets set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged OR 2) has `CAP_SYS_ADMIN`. +* readOnlyRootFilesystem: Mounts the container's root filesystem as read-only. + +The above bullets are not a complete set of security context settings -- please see +[SecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core) +for a comprehensive list. + For more information about security mechanisms in Linux, see [Overview of Linux Kernel Security Features](https://www.linux.com/learn/overview-linux-kernel-security-features) diff --git a/content/en/docs/tasks/inject-data-application/podpreset.md b/content/en/docs/tasks/inject-data-application/podpreset.md index de41c0f73a..dcf159acf5 100644 --- a/content/en/docs/tasks/inject-data-application/podpreset.md +++ b/content/en/docs/tasks/inject-data-application/podpreset.md @@ -2,20 +2,23 @@ reviewers: - jessfraz title: Inject Information into Pods Using a PodPreset -min-kubernetes-server-version: v1.10 +min-kubernetes-server-version: v1.6 content_template: templates/task weight: 60 --- {{% capture overview %}} +{{< feature-state for_k8s_version="v1.6" state="alpha" >}} + This page shows how to use PodPreset objects to inject information like {{< glossary_tooltip text="Secrets" term_id="secret" >}}, volume mounts, and {{< glossary_tooltip text="environment variables" term_id="container-env-variables" >}} into Pods at creation time. {{% /capture %}} {{% capture prerequisites %}} -{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} +You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. If you do not already have a cluster, you can create one using [Minikube](/docs/setup/learning-environment/minikube/). +Make sure that you have [enabled PodPreset](/docs/concepts/workloads/pods/podpreset/#enable-pod-preset) in your cluster. {{% /capture %}} diff --git a/content/en/docs/tasks/run-application/configure-pdb.md b/content/en/docs/tasks/run-application/configure-pdb.md index d33dc24364..d98538c262 100644 --- a/content/en/docs/tasks/run-application/configure-pdb.md +++ b/content/en/docs/tasks/run-application/configure-pdb.md @@ -6,6 +6,8 @@ weight: 110 {{% capture overview %}} +{{< feature-state for_k8s_version="v1.5" state="beta" >}} + This page shows how to limit the number of concurrent disruptions that your application experiences, allowing for higher availability while permitting the cluster administrator to manage the clusters diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md index 71357f3416..cab3e0af7f 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md @@ -115,7 +115,7 @@ Now, we will see how the autoscaler reacts to increased load. We will start a container, and send an infinite loop of queries to the php-apache service (please run it in a different terminal): ```shell -kubectl run --generator=run-pod/v1 -it --rm load-generator --image=busybox /bin/sh +kubectl run -it --rm load-generator --image=busybox /bin/sh Hit enter for command prompt diff --git a/content/en/docs/tutorials/clusters/apparmor.md b/content/en/docs/tutorials/clusters/apparmor.md index 184b50ec6e..ae1de98ab2 100644 --- a/content/en/docs/tutorials/clusters/apparmor.md +++ b/content/en/docs/tutorials/clusters/apparmor.md @@ -341,7 +341,7 @@ nodes. There are lots of ways to setup the profiles though, such as: The scheduler is not aware of which profiles are loaded onto which node, so the full set of profiles must be loaded onto every node. An alternative approach is to add a node label for each profile (or class of profiles) on the node, and use a -[node selector](/docs/concepts/configuration/assign-pod-node/) to ensure the Pod is run on a +[node selector](/docs/concepts/scheduling-eviction/assign-pod-node/) to ensure the Pod is run on a node with the required profile. ### Restricting profiles with the PodSecurityPolicy diff --git a/content/en/docs/tutorials/hello-minikube.md b/content/en/docs/tutorials/hello-minikube.md index e64cb16a73..afeae088aa 100644 --- a/content/en/docs/tutorials/hello-minikube.md +++ b/content/en/docs/tutorials/hello-minikube.md @@ -7,7 +7,7 @@ menu: title: "Get Started" weight: 10 post: > -

Ready to get your hands dirty? Build a simple Kubernetes cluster that runs "Hello World" for Node.js.

+

Ready to get your hands dirty? Build a simple Kubernetes cluster that runs a sample app.

card: name: tutorials weight: 10 @@ -15,7 +15,7 @@ card: {{% capture overview %}} -This tutorial shows you how to run a simple Hello World Node.js app +This tutorial shows you how to run a sample app on Kubernetes using [Minikube](/docs/setup/learning-environment/minikube) and Katacoda. Katacoda provides a free, in-browser Kubernetes environment. @@ -27,7 +27,7 @@ You can also follow this tutorial if you've installed [Minikube locally](/docs/t {{% capture objectives %}} -* Deploy a hello world application to Minikube. +* Deploy a sample application to Minikube. * Run the app. * View application logs. @@ -35,13 +35,7 @@ You can also follow this tutorial if you've installed [Minikube locally](/docs/t {{% capture prerequisites %}} -This tutorial provides a container image built from the following files: - -{{< codenew language="js" file="minikube/server.js" >}} - -{{< codenew language="conf" file="minikube/Dockerfile" >}} - -For more information on the `docker build` command, read the [Docker documentation](https://docs.docker.com/engine/reference/commandline/build/). +This tutorial provides a container image that uses NGINX to echo back all the requests. {{% /capture %}} @@ -166,7 +160,7 @@ Kubernetes [*Service*](/docs/concepts/services-networking/service/). 5. Katacoda environment only: Note the 5 digit port number displayed opposite to `8080` in services output. This port number is randomly generated and it can be different for you. Type your number in the port number text box, then click Display Port. Using the example from earlier, you would type `30369`. - This opens up a browser window that serves your app and shows the "Hello World" message. + This opens up a browser window that serves your app and shows the app's response. ## Enable addons diff --git a/content/en/docs/tutorials/stateless-application/guestbook-logs-metrics-with-elk.md b/content/en/docs/tutorials/stateless-application/guestbook-logs-metrics-with-elk.md index 94008289ee..ced3ba7ebc 100644 --- a/content/en/docs/tutorials/stateless-application/guestbook-logs-metrics-with-elk.md +++ b/content/en/docs/tutorials/stateless-application/guestbook-logs-metrics-with-elk.md @@ -67,7 +67,7 @@ kubectl get pods --namespace=kube-system | grep kube-state ```shell git clone https://github.com/kubernetes/kube-state-metrics.git kube-state-metrics -kubectl create -f examples/standard +kubectl apply -f kube-state-metrics/examples/standard kubectl get pods --namespace=kube-system | grep kube-state-metrics ``` Verify that kube-state-metrics is running and ready @@ -78,7 +78,7 @@ kubectl get pods -n kube-system -l app.kubernetes.io/name=kube-state-metrics Output: ```shell NAME READY STATUS RESTARTS AGE -kube-state-metrics-89d656bf8-vdthm 2/2 Running 0 21s +kube-state-metrics-89d656bf8-vdthm 1/1 Running 0 21s ``` ## Clone the Elastic examples GitHub repo ```shell @@ -357,10 +357,14 @@ The output: ```shell deployment.extensions/frontend scaled ``` +Scale the frontend back up to three pods: +```shell +kubectl scale --replicas=3 deployment/frontend +``` ## View the changes in Kibana See the screenshot, add the indicated filters and then add the columns to the view. You can see the ScalingReplicaSet entry that is marked, following from there to the top of the list of events shows the image being pulled, the volumes mounted, the pod starting, etc. -![Kibana Discover](https://raw.githubusercontent.com/elastic/examples/master/beats-k8s-send-anywhere/scaling-discover.png) +![Kibana Discover](https://raw.githubusercontent.com/elastic/examples/master/beats-k8s-send-anywhere/scaling-up.png) {{% /capture %}} diff --git a/content/en/docs/tutorials/stateless-application/guestbook.md b/content/en/docs/tutorials/stateless-application/guestbook.md index f1f93dd988..e8c71bc613 100644 --- a/content/en/docs/tutorials/stateless-application/guestbook.md +++ b/content/en/docs/tutorials/stateless-application/guestbook.md @@ -116,7 +116,7 @@ Although the Redis master is a single pod, you can make it highly available to m Deployments scale based off of the configurations set in the manifest file. In this case, the Deployment object specifies two replicas. -If there are not any replicas running, this Deployment would start the two replicas on your container cluster. Conversely, if there are more than two replicas are running, it would scale down until two replicas are running. +If there are not any replicas running, this Deployment would start the two replicas on your container cluster. Conversely, if there are more than two replicas running, it would scale down until two replicas are running. {{< codenew file="application/guestbook/redis-slave-deployment.yaml" >}} diff --git a/content/en/examples/minikube/Dockerfile b/content/en/examples/minikube/Dockerfile deleted file mode 100644 index dd58cb7e75..0000000000 --- a/content/en/examples/minikube/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM node:6.14.2 -EXPOSE 8080 -COPY server.js . -CMD [ "node", "server.js" ] diff --git a/content/en/examples/minikube/server.js b/content/en/examples/minikube/server.js deleted file mode 100644 index 76345a17d8..0000000000 --- a/content/en/examples/minikube/server.js +++ /dev/null @@ -1,9 +0,0 @@ -var http = require('http'); - -var handleRequest = function(request, response) { - console.log('Received request for URL: ' + request.url); - response.writeHead(200); - response.end('Hello World!'); -}; -var www = http.createServer(handleRequest); -www.listen(8080); diff --git a/content/en/examples/windows/configmap-pod.yaml b/content/en/examples/windows/configmap-pod.yaml index e30939b367..661cb73dee 100644 --- a/content/en/examples/windows/configmap-pod.yaml +++ b/content/en/examples/windows/configmap-pod.yaml @@ -28,4 +28,4 @@ spec: name: example-config key: example.property.2 nodeSelector: - beta.kubernetes.io/os: windows \ No newline at end of file + kubernetes.io/os: windows \ No newline at end of file diff --git a/content/en/examples/windows/daemonset.yaml b/content/en/examples/windows/daemonset.yaml index d3a7bb6636..7483708fc7 100644 --- a/content/en/examples/windows/daemonset.yaml +++ b/content/en/examples/windows/daemonset.yaml @@ -17,5 +17,5 @@ spec: - name: foo image: microsoft/windowsservercore:1709 nodeSelector: - beta.kubernetes.io/os: windows + kubernetes.io/os: windows diff --git a/content/en/examples/windows/emptydir-pod.yaml b/content/en/examples/windows/emptydir-pod.yaml index e164f2caeb..08d8091391 100644 --- a/content/en/examples/windows/emptydir-pod.yaml +++ b/content/en/examples/windows/emptydir-pod.yaml @@ -17,4 +17,4 @@ spec: - name: scratch-volume emptyDir: {} nodeSelector: - beta.kubernetes.io/os: windows + kubernetes.io/os: windows diff --git a/content/en/examples/windows/hostpath-volume-pod.yaml b/content/en/examples/windows/hostpath-volume-pod.yaml index 843250c80c..d95e345b6c 100644 --- a/content/en/examples/windows/hostpath-volume-pod.yaml +++ b/content/en/examples/windows/hostpath-volume-pod.yaml @@ -11,7 +11,7 @@ spec: mountPath: "C:\\etc\\foo" readOnly: true nodeSelector: - beta.kubernetes.io/os: windows + kubernetes.io/os: windows volumes: - name: foo hostPath: diff --git a/content/en/examples/windows/secret-pod.yaml b/content/en/examples/windows/secret-pod.yaml index f4a8122c0a..69ee9b1f1e 100644 --- a/content/en/examples/windows/secret-pod.yaml +++ b/content/en/examples/windows/secret-pod.yaml @@ -29,4 +29,4 @@ spec: name: mysecret key: password nodeSelector: - beta.kubernetes.io/os: windows + kubernetes.io/os: windows diff --git a/content/en/examples/windows/simple-pod.yaml b/content/en/examples/windows/simple-pod.yaml index f056f3cf0a..0b1f0ed5c5 100644 --- a/content/en/examples/windows/simple-pod.yaml +++ b/content/en/examples/windows/simple-pod.yaml @@ -11,4 +11,4 @@ spec: ports: - containerPort: 80 nodeSelector: - "beta.kubernetes.io/os": windows + "kubernetes.io/os": windows diff --git a/content/id/docs/concepts/cluster-administration/monitoring.md b/content/id/docs/concepts/cluster-administration/monitoring.md new file mode 100644 index 0000000000..501719a757 --- /dev/null +++ b/content/id/docs/concepts/cluster-administration/monitoring.md @@ -0,0 +1,167 @@ +--- +title: Metrik-Metrik untuk Control Plane Kubernetes +content_template: templates/concept +weight: 60 +aliases: +- controller-metrics.md +--- + +{{% capture overview %}} + +Metrik dari komponen sistem dapat memberikan pandangan yang lebih baik tentang apa +yang sedang terjadi di dalam sistem. Metrik sangat berguna untuk membuat dasbor (_dashboard_) +dan peringatan (_alert_). + +Metrik di dalam _control plane_ Kubernetes disajikan dalam [format prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) +dan dapat terbaca oleh manusia. + +{{% /capture %}} + +{{% capture body %}} + +## Metrik-Metrik pada Kubernetes + +Dalam kebanyakan kasus, metrik tersedia pada _endpoint_ `/metrics` dari server HTTP. +Untuk komponen yang tidak mengekspos _endpoint_ secara bawaan, _endpoint_ tersebut dapat diaktifkan +dengan menggunakan opsi `--bind-address`. + +Contoh-contoh untuk komponen tersebut adalah: + +* {{< glossary_tooltip term_id="kube-controller-manager" text="kube-controller-manager" >}} +* {{< glossary_tooltip term_id="kube-proxy" text="kube-proxy" >}} +* {{< glossary_tooltip term_id="kube-apiserver" text="kube-apiserver" >}} +* {{< glossary_tooltip term_id="kube-scheduler" text="kube-scheduler" >}} +* {{< glossary_tooltip term_id="kubelet" text="kubelet" >}} + +Di dalam lingkungan produksi, kamu mungkin ingin mengonfigurasi [Server Prometheus](https://prometheus.io/) +atau _scraper_ metrik (pengambil metrik) lainnya untuk mengumpulkan metrik-metrik ini secara berkala +dan membuatnya tersedia dalam semacam basis data yang _time series_. + +Perlu dicatat bahwa {{< glossary_tooltip term_id="kubelet" text="kubelet" >}} +juga mengekspos metrik pada _endpoint-endpoint_ seperti `/metrics/cadvisor`, +`/metrics/resource` dan `/metrics/probes`. Metrik-metrik tersebut tidak memiliki +siklus hidup yang sama. + +Jika klaster kamu menggunakan {{< glossary_tooltip term_id="rbac" text="RBAC" >}}, +untuk membaca metrik memerlukan otorisasi melalui sebuah User, Group, atau +ServiceAccount dengan ClusterRole yang memperbolehkan mengakses `/metrics`. + +Sebagai contoh: + +``` +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus +rules: + - nonResourceURLs: + - "/metrics" + verbs: + - get +``` + +## Siklus Hidup (_Lifecycle_) Metrik + +Alpha metric → Stable metric → Deprecated metric → Hidden metric → Deletion + +Metrik-metrik _Alpha_ tidak memiliki jaminan stabilitas; dengan demikian mereka +dapat dimodifikasi atau dihapus kapan saja. + +Metrik-metrik _Stable_ dijamin tidak berubah (dijamin stabilitasnya); Secara khusus, stabilitas berarti: + +* metrik itu sendiri tidak akan dihapus (atau diganti namanya) +* jenis metrik tidak akan dimodifikasi + +Metrik _Deprecated_ memberi penanda bahwa metrik tersebut suatu saat akan dihapus; untuk +menemukan versi yang mana, kamu perlu memeriksa anotasi, yang mencakup dari versi +Kubernetes mana yang metrik tersebut akan dianggap _deprecated_. + +Sebelum _deprecation_: + +``` +# HELP some_counter this counts things +# TYPE some_counter counter +some_counter 0 +``` + +Sesudah _deprecation_: + +``` +# HELP some_counter (Deprecated since 1.15.0) this counts things +# TYPE some_counter counter +some_counter 0 +``` + +Setelah metrik disembunyikan maka secara bawaan metrik tidak dipublikasikan +untuk _scraping_ (pengambilan metrik). Untuk menggunakan metrik yang tersembunyi, kamu perlu mengganti (_override_) +konfigurasi untuk komponen klaster yang relevan. + +Setelah metrik dihapus, metrik tidak dipublikasikan. Kamu tidak dapat mengubah +metrik tersebut dengan menggunakan _override_. + +## Melihat Metrik tersembunyi + +Seperti dijelaskan di atas, para admin dapat mengaktifkan metrik tersembunyi +melalui opsi pada baris perintah (_command line_) untuk _binary_ (program) tertentu. Ini ditujukan untuk +digunakan sebagai solusi bagi para admin apabila mereka gagal memigrasi +metrik yang sudah _deprecated_ dalam rilis terakhir. + +Opsi `show-hidden-metrics-for-version` menunjukkan versi yang ingin kamu tampilkan +metrik yang sudah _deprecated_ dalam rilis tersebut. Versi ini ditampilkan dalam bentuk x.y, +di mana x adalah versi _major_, y ​​adalah versi minor. Versi _patch_ tidak +diperlukan meskipun metrik dapat di_-deprecate_ dalam rilis _patch_, hal ini +adalah karena kebijakan _deprecation_ untuk metrik hanya berlaku terhadap rilis minor. + +Opsi tersebut hanya dapat menggunakan versi minor sebelumnya sebagai parameternya. Semua +metrik yang disembunyikan di versi sebelumnya akan dikeluarkan jika para admin +mengatur versi sebelumnya ke `show-hidden-metrics-for-version`. Versi yang +terlalu lama tidak diizinkan karena hal ini melanggar kebijakan untuk metrik yang +sudah _deprecated_. + +Ambil metrik `A` sebagai contoh, di sini diasumsikan bahwa `A` sudah _deprecated_ +pada rilis 1.n. Menurut kebijakan metrik yang sudah _deprecated_, kita dapat mencapai kesimpulan +sebagai berikut: + +* Pada rilis `1.n`, metrik sudah di_-deprecated_, dan dapat diperlihatkan secara bawaan. +* Pada rilis `1.n + 1`, metrik disembunyikan secara bawaan dan dapat + diperlihatkan dengan baris perintah `show-hidden-metrics-for-version=1.n`. +* Pada rilis `1.n + 2`, metrik harus dihapus dari _codebase_. Tidak ada jalan + keluar lagi. + +Jika kamu meng-_upgrade_ dari rilis `1.12` ke` 1.13`, tetapi masih bergantung pada +metrik `A` yang di-_deprecate_ dalam` 1.12`, kamu harus mengatur metrik +tersembunyi melalui baris perintah: `--show-hidden-metrics=1.12` dan ingatlah +untuk menghapus ketergantungan terhadap metrik ini sebelum meng-_upgrade_ ke `1.14`. + +## Metrik komponen + +### Metrik kube-controller-manager + +Metrik Controller Manager memberikan pandangan penting +tentang kinerja dan kesehatan Controller Manager. Metrik ini mencakup metrik +_runtime_ berbahasa Go yang umum seperti jumlah _go_routine_ dan metrik khusus +pengontrol seperti latensi _request etcd_ atau latensi API dari Cloud provider +(AWS, GCE, OpenStack) yang dapat digunakan untuk mengukur kesehatan klaster. + +Mulai dari Kubernetes 1.7, metrik Cloud provider yang detail tersedia untuk +operasi penyimpanan untuk GCE, AWS, Vsphere, dan OpenStack. +Metrik ini dapat digunakan untuk memantau kesehatan operasi PersistentVolume. + +Misalnya, untuk GCE metrik tersebut adalah: + +``` +cloudprovider_gce_api_request_duration_seconds { request = "instance_list"} +cloudprovider_gce_api_request_duration_seconds { request = "disk_insert"} +cloudprovider_gce_api_request_duration_seconds { request = "disk_delete"} +cloudprovider_gce_api_request_duration_seconds { request = "attach_disk"} +cloudprovider_gce_api_request_duration_seconds { request = "detach_disk"} +cloudprovider_gce_api_request_duration_seconds { request = "list_disk"} +``` + +{{% /capture %}} + +{{% capture whatsnext %}} +* Baca tentang [format teks Prometheus](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) untuk berbagai metrik +* Lihat daftar [metrik Kubernetes yang _stable_](https://github.com/kubernetes/kubernetes/blob/master/test/instrumentation/testdata/stable-metrics-list.yaml) +* Baca tentang [kebijakan _deprecation_ Kubernetes](https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-a-feature-or-behavior ) +{{% /capture %}} diff --git a/content/id/docs/reference/kubectl/_index.md b/content/id/docs/reference/kubectl/_index.md new file mode 100644 index 0000000000..5580fc654a --- /dev/null +++ b/content/id/docs/reference/kubectl/_index.md @@ -0,0 +1,4 @@ +--- +title: "Baris Perintah kubectl" +weight: 60 +--- diff --git a/content/id/docs/reference/kubectl/cheatsheet.md b/content/id/docs/reference/kubectl/cheatsheet.md new file mode 100644 index 0000000000..80667814ac --- /dev/null +++ b/content/id/docs/reference/kubectl/cheatsheet.md @@ -0,0 +1,401 @@ +--- +title: Contekan kubectl +content_template: templates/concept +card: + name: reference + weight: 30 +--- + +{{% capture overview %}} + +Lihat juga: [Ikhitsar Kubectl](/docs/reference/kubectl/overview/) dan [Panduan JsonPath](/docs/reference/kubectl/jsonpath). + +Laman ini merupakan ikhitisar dari perintah `kubectl`. + +{{% /capture %}} + +{{% capture body %}} + +# kubectl - Contekan + +## Autocomplete Kubectl + +### BASH + +```bash +source <(kubectl completion bash) # menyiapkan autocomplete untuk bash ke dalam shell saat ini, paket bash-completion harus diinstal terlebih dahulu. +echo "source <(kubectl completion bash)" >> ~/.bashrc # menambahkan autocomplete secara permanen ke dalam bash shell kamu. +``` + +Kamu juga dapat menggunakan alias singkatan untuk `kubectl` yang juga bisa berfungsi dengan _completion_: + +```bash +alias k=kubectl +complete -F __start_kubectl k +``` + +### ZSH + + +```bash +source <(kubectl completion zsh) # menyiapkan autocomplete untuk zsh ke dalam shell saat ini. +echo "[[ $commands[kubectl] ]] && source <(kubectl completion zsh)" >> ~/.zshrc # menambahkan autocomplete secara permanen ke dalam zsh shell kamu. +``` + +## Konteks Kubectl dan Konfigurasinya + +Memilih klaster Kubernetes yang mana yang ditembak oleh `kubectl` untuk berkomunikasi dan +diubah konfigurasinya. Lihat dokumentasi [Otentikasi ke berbagai Klaster dengan kubeconfig](/id/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) untuk mengetahui informasi tentang berkas konfigurasi ini secara detail. + +```bash +kubectl config view # memperlihatkan setelan kubeconfig yang sudah digabung (merged) + +# menggunakan beberapa berkas kubeconfig sekaligus dan melihat semua konfigurasinya sekaligus (merged) +KUBECONFIG=~/.kube/config:~/.kube/kubconfig2 + +kubectl config view + +# mendapatkan kata sandi untuk pengguna e2e +kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' + +kubectl config view -o jsonpath='{.users[].name}' # memperlihatkan pengguna pertama +kubectl config view -o jsonpath='{.users[*].name}' # mendapatkan daftar pengguna +kubectl config get-contexts # memperlihatkan daftar konteks +kubectl config current-context # memperlihatkan konteks saat ini +kubectl config use-context my-cluster-name # menyetel konteks bawaan menjadi my-cluster-name + +# menambahkan seorang pengguna baru ke dalam kubeconf kamu yang mendukung basic auth +kubectl config set-credentials kubeuser/foo.kubernetes.com --username=kubeuser --password=kubepassword + +# menyimpan Namespace secara permanen untuk semua perintah kubectl pada konteks tersebut +kubectl config set-context --current --namespace=ggckad-s2 + +# menyetel konteks yang menggunakan pengguna dan namespace yang spesifik +kubectl config set-context gce --user=cluster-admin --namespace=foo \ + && kubectl config use-context gce + +kubectl config unset users.foo # menghapus pengguna foo +``` + +## Menerapkan + +`apply` (menerapkan) mengelola aplikasi melalui berkas-berkas yang berisi definisi tentang sumber daya Kubernetes. Perintah ini membuat dan memperbarui +sumber daya di dalam sebuah klaster dengan menjalankan `kubectl apply`. Ini merupakan cara yang disarankan untuk mengelola aplikasi di dalam _production_. +Lihat [Buku Kubectl](https://kubectl.docs.kubernetes.io). + +## Membuat Objek + +Manifes Kubernetes dapat didefinisikan ke dalam YAML atau JSON. Gunakan berkas dengan ekstensi `.yaml`, +`.yml`, dan `.json`. + +```bash +kubectl apply -f ./my-manifest.yaml # membuat sumber daya +kubectl apply -f ./my1.yaml -f ./my2.yaml # membuat sumber daya dari beberapa berkas +kubectl apply -f ./dir # membuat sumber daya dari berbagai berkas manifes yang ada di dalam direktori +kubectl apply -f https://git.io/vPieo # membuat sumber daya dari sebuah tautan +kubectl create deployment nginx --image=nginx # memulai sebuah instans tunggal nginx +kubectl explain pods # mendapatkan dokumentasi untuk manifes Pod + +# membuat beberapa objek YAML dari masukan (stdin) +cat < pod.yaml + +kubectl attach my-pod -i # melekatkan (meng-attach) ke dalam kontainer yang sedang berjalan +kubectl port-forward my-pod 5000:6000 # mendengar (listen) pada porta 5000 di mesin lokal dan meneruskan ke porta 6000 di Pod my-pod +kubectl exec my-pod -- ls / # menjalankan perintah pada Pod my-pod (kasus 1 kontainer) +kubectl exec my-pod -c my-container -- ls / # menjalankan peirntah pada Pod my-pod (kasus banyak kontainer) +kubectl top pod POD_NAME --containers # memperlihatkan metrik yang dimiliki Pod bersama kontainernya +``` + +## Berinteraksi dengan Node dan Klaster + +```bash +kubectl cordon my-node # menandai my-node supaya tidak bisa dijadwalkan dengan Pod (unschedulable) +kubectl drain my-node # mengeringkan (drain) my-node sebagai bagian dari persiapan untuk pemeliharaan +kubectl uncordon my-node # menandai my-node supaya bisa dijadwalkan dengan Pod (schedulable) +kubectl top node my-node # memperlihatkan metrik dari Node my-node +kubectl cluster-info # memperlihatkan alamaat dari master dan layanan +kubectl cluster-info dump # memperlihatkan state klaster saat ini pada keluaran stdout +kubectl cluster-info dump --output-directory=/path/to/cluster-state # memperlihatkan state klaster saat ini pada /path/to/cluster-state + +# jika sebuah taint dengan sebuah kunci dan efek di bawah pernah diterapkan, maka nilainya akan tergantikan dengan yang baru +kubectl taint nodes foo dedicated=special-user:NoSchedule +``` + +### Berbagai Tipe Sumber Daya + +Mendapatkan seluruh daftar tipe sumber daya yang didukung lengkap dengan singkatan pendeknya, [grup API](/docs/concepts/overview/kubernetes-api/#api-groups), +apakah sumber daya merupakan sumber daya yang berada di dalam Namespace atau tidak, serta [Kind](/docs/concepts/overview/working-with-objects/kubernetes-objects): + +```bash +kubectl api-resources +``` + +Operasi lainnya yang berkaitan dengan sumber daya API (api-resources): + +```bash +kubectl api-resources --namespaced=true # semua sumber daya yang berada di dalam Namespace +kubectl api-resources --namespaced=false # semua sumber daya yang tidak berada di dalam Namespace +kubectl api-resources -o name # semua sumber daya dengan keluaran sederhana (hanya nama sumber daya) +kubectl api-resources -o wide # semua sumber daya dengan keluaran tambahan ("wide") +kubectl api-resources --verbs=list,get # semua sumber daya yang mendukung verb permintaan "list" dan "get" +kubectl api-resources --api-group=extensions # semua sumber daya di dalam grup API "extensions" +``` + +### Memformat Keluaran + + +Untuk mengeluarkan detail ke dalam jendela terminal kamu dengan format tertentu, tambahkan _flag_ `-o` (atau `--output`) +dengan perintah `kubectl` yang didukung. + +Format keluaran | Deskripsi +--------------| ----------- +`-o=custom-columns=` | Mencetak sebuah tabel dengan daftar kolom khas (_custom_) yang dipisahkan dengan koma +`-o=custom-columns-file=` | Mencetak sebuah tabel dengan templat kolom khas pada berkas `` +`-o=json` | Memberikan keluaran objek API dengan format JSON +`-o=jsonpath=