diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..b76244d3b5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/docsy"] + path = themes/docsy + url = https://github.com/google/docsy.git diff --git a/Makefile b/Makefile index c7756208cc..be53b5eac9 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,16 @@ -DOCKER = docker -HUGO_VERSION = $(shell grep ^HUGO_VERSION netlify.toml | tail -n 1 | cut -d '=' -f 2 | tr -d " \"\n") -DOCKER_IMAGE = kubernetes-hugo -DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(CURDIR):/src -NODE_BIN = node_modules/.bin -NETLIFY_FUNC = $(NODE_BIN)/netlify-lambda +HUGO_VERSION = $(shell grep ^HUGO_VERSION netlify.toml | tail -n 1 | cut -d '=' -f 2 | tr -d " \"\n") +NODE_BIN = node_modules/.bin +NETLIFY_FUNC = $(NODE_BIN)/netlify-lambda + +# The CONTAINER_ENGINE variable is used for specifying the container engine. By default 'docker' is used +# but this can be overridden when calling make, e.g. +# CONTAINER_ENGINE=podman make container-image +CONTAINER_ENGINE ?= docker +CONTAINER_IMAGE = kubernetes-hugo +CONTAINER_RUN = $(CONTAINER_ENGINE) run --rm --interactive --tty --volume $(CURDIR):/src + +CCRED=\033[0;31m +CCEND=\033[0m .PHONY: all build build-preview help serve @@ -36,16 +43,28 @@ serve: ## Boot the development server. hugo server --buildFuture docker-image: - $(DOCKER) build . \ - --network=host \ - --tag $(DOCKER_IMAGE) \ - --build-arg HUGO_VERSION=$(HUGO_VERSION) + @echo -e "$(CCRED)**** The use of docker-image is deprecated. Use container-image instead. ****$(CCEND)" + $(MAKE) container-image docker-build: - $(DOCKER_RUN) $(DOCKER_IMAGE) hugo + @echo -e "$(CCRED)**** The use of docker-build is deprecated. Use container-build instead. ****$(CCEND)" + $(MAKE) container-build docker-serve: - $(DOCKER_RUN) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0755 -p 1313:1313 $(DOCKER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 + @echo -e "$(CCRED)**** The use of docker-serve is deprecated. Use container-serve instead. ****$(CCEND)" + $(MAKE) container-serve + +container-image: + $(CONTAINER_ENGINE) build . \ + --network=host \ + --tag $(CONTAINER_IMAGE) \ + --build-arg HUGO_VERSION=$(HUGO_VERSION) + +container-build: + $(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo + +container-serve: + $(CONTAINER_RUN) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0755 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 test-examples: scripts/test_examples.sh install @@ -53,8 +72,13 @@ test-examples: .PHONY: link-checker-setup link-checker-image-pull: - docker pull wjdp/htmltest + $(CONTAINER_ENGINE) pull wjdp/htmltest + +docker-internal-linkcheck: + @echo -e "$(CCRED)**** The use of docker-internal-linkcheck is deprecated. Use container-internal-linkcheck instead. ****$(CCEND)" + $(MAKE) container-internal-linkcheck + +container-internal-linkcheck: link-checker-image-pull + $(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo --config config.toml,linkcheck-config.toml --buildFuture + $(CONTAINER_ENGINE) run --mount type=bind,source=$(CURDIR),target=/test --rm wjdp/htmltest htmltest -docker-internal-linkcheck: link-checker-image-pull - $(DOCKER_RUN) $(DOCKER_IMAGE) hugo --config config.toml,linkcheck-config.toml --buildFuture - $(DOCKER) run --mount type=bind,source=$(CURDIR),target=/test --rm wjdp/htmltest htmltest \ No newline at end of file diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 0de965afdc..c2b0751dbe 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -124,6 +124,7 @@ aliases: - girikuncoro - irvifa - wahyuoi + - phanama sig-docs-it-owners: # Admins for Italian content - fabriziopandini - mattiaperi @@ -133,15 +134,15 @@ aliases: - mattiaperi - micheleberardi sig-docs-ja-owners: # Admins for Japanese content - - cstoku + # cstoku - inductor - nasa9084 sig-docs-ja-reviews: # PR reviews for Japanese content - bells17 - - cstoku + # cstoku - inductor - makocchi-git - - MasayaAoyama + # MasayaAoyama - nasa9084 - oke-py sig-docs-ko-owners: # Admins for Korean content @@ -228,6 +229,7 @@ aliases: - MaxymVlasov sig-docs-uk-reviews: # PR reviews for Ukrainian content - anastyakulyk + - Arhell - butuzov - idvoretskyi - MaxymVlasov diff --git a/README.md b/README.md index d3ee35693b..7ef8f8d2dd 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ To run the website locally when you have Hugo installed: ```bash git clone https://github.com/kubernetes/website.git cd website +git submodule update --init --recursive hugo server --buildFuture ``` diff --git a/assets/images/nav_logo.svg b/assets/images/nav_logo.svg new file mode 100644 index 0000000000..982c04f4aa --- /dev/null +++ b/assets/images/nav_logo.svg @@ -0,0 +1,110 @@ + + + + +Kubernetes_Logo_Hrz_lockup_REV + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/nav_logo2.svg b/assets/images/nav_logo2.svg new file mode 100644 index 0000000000..92b8d19ac4 --- /dev/null +++ b/assets/images/nav_logo2.svg @@ -0,0 +1,108 @@ + + + + +Kubernetes_Logo_Hrz_lockup_POS + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/js/search.js b/assets/js/search.js new file mode 100644 index 0000000000..3d6e9d9447 --- /dev/null +++ b/assets/js/search.js @@ -0,0 +1,36 @@ +/* +Copyright 2018 Google LLC +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + https://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +(function ($) { + "use strict"; + + var Search = { + init: function () { + $(document).ready(function () { + $(document).on("keypress", ".td-search-input", function (e) { + if (e.keyCode !== 13) { + return; + } + + var query = $(this).val(); + var searchPage = "{{ "docs/search/" | absURL }}?q=" + query; + document.location = searchPage; + + return false; + }); + }); + }, + }; + + Search.init(); +})(jQuery); diff --git a/assets/scss/_base.scss b/assets/scss/_base.scss new file mode 100644 index 0000000000..ddfee42444 --- /dev/null +++ b/assets/scss/_base.scss @@ -0,0 +1,834 @@ +@import "reset"; + +// header +$full-width-paddingX: 20px; + +$main-width: 100%; +$main-max-width: 100%; + +$header-height: 80px; + +$logo-width: 180px; + +$nav-buttons-margin-left: 30px; + +$hamburger-size: 50px; + +// main nav +$main-nav-padding: 140px 0 30px; +$main-nav-h5-margin-bottom: 1em; +$main-nav-h3-margin-bottom: 0.6em; +$nav-box-width: 20%; +$nav-box-sibling-margin-left: calc(20% / 3); +$main-nav-main-sibling-margin-top: 60px; +$main-nav-left-button-size: 50px; +$main-nav-left-button-font-size: 18px; + +// hero +$hero-padding-top: 80px; +$headline-wrapper-margin-bottom: 40px; +$quickstart-button-padding: 0 50px; +$vendor-strip-height: 88px; +$vendor-strip-font-size: 16px; + +// video +$video-section-height: 200px; + +@import "size"; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +body { + background-color: white; +} + +section { + position: relative; + background-color: white; +} + +section, +header, +footer { + .main-section { + position: relative; + margin: auto; + } + + p { + font-size: 14px; + font-weight: 400; + } + + .button { + display: inline-block; + border-radius: 6px; + padding: 0 20px; + line-height: 40px; + color: white; + background-color: $blue; + text-decoration: none; + font-size: 1rem; + } + + #cellophane { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: none; + } +} + +// HEADER + +#hamburger { + display: inline-block; + position: relative; + margin-left: auto; + vertical-align: middle; + padding: 0; + border: 0; + background: none; + + div, + &:before, + &:after { + position: absolute; + left: 15%; + width: 70%; + height: 2px; + background-color: $blue; + transition: 0.3s; + content: ""; + } + + div { + top: calc(50% - 1px); + } + + &:before { + top: 24%; + } + + &:after { + bottom: 24%; + } + + &:hover { + div, + &:before, + &:after { + background-color: white; + } + } +} + +// HERO +.header-hero { + background-image: url(/images/texture.png); + background-color: $dark-grey; + text-align: center; + padding-left: 0; + padding-right: 0; + margin-bottom: 0; + position: relative; + + &.bot-bar:after { + display: block; + margin-bottom: -24px; + height: 8px; + width: 100%; + background-color: transparentize(white, 0.9); + content: ""; + } + + &.no-sub { + h5 { + display: none; + } + + h1 { + margin-bottom: 20px; + } + } +} + +.td-home .header-hero:after { + display: none; +} + +.header-hero { + background-color: $dark-grey; + + h5 { + margin: 20px 0; + line-height: 28px; + } +} + +#vendorStrip { + position: relative; + + ul { + float: left; + } + + li { + display: inline-block; + height: 100%; + } + + a { + display: block; + height: 100%; + color: white; + font-size: 0.75em; + font-weight: bold; + } + + li + li { + margin-left: 0; + } +} + +.pi-accordion { + & > .container:first-child > .item:first-child > .title:first-child { + padding-left: 0; + font-size: 1.5em; + font-weight: 700; + } + + & > .container:first-child > .item.yah:first-child > .title:first-child { + margin-left: -20px !important; + } + + .item { + overflow: hidden; + } + + .title { + color: $dark-grey; + position: relative; + padding: 7.5px 10px 7.5px 18px; + cursor: pointer; + transition: 0.3s; + + &:hover { + color: $blue; + } + } + + a.item > .title { + color: black; + + &:hover { + color: $blue; + } + } + + div.item > .title { + &:before { + content: ""; + position: absolute; + top: 12px; + left: 2px; + border-style: solid; + border-width: 5px 0 5px 8px; + border-color: transparent transparent transparent $blue; + transform: rotate(0deg); + transition: 0.3s; + } + } + + .wrapper { + position: relative; + width: 100%; + transition: height 0.3s; + } + + .content { + padding-left: 20px; + opacity: 0; + transition: 0.3s; + } + + .item.on { + & > .title:before { + transform: rotate(90deg); + } + + & > .wrapper > .content { + opacity: 1; + } + } +} + +dt { + margin-bottom: 8px; +} + +dd { + margin-bottom: 16px; +} + +.pi-pushmenu { + display: none; + position: fixed; + top: 0; + width: 100%; + height: 100%; + opacity: 0; + transition: opacity 0.3s; + + &.on { + opacity: 1; + } + + .overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.4); + } + + .sled { + position: absolute; + top: 0; + width: 0; + height: 100%; + background-color: white; + overflow: auto; + transition: 0.3s; + } + + &.on .sled { + width: 400px; + max-width: 100vw; + } + + .top-bar { + height: 0; + line-height: 60px; + background-color: #444; + } + + ul { + margin-top: 25px; + } + + li { + position: relative; + display: block; + width: 100%; + min-height: 45px; + padding: 0 60px 0 20px; + border-bottom: 1px solid #cccccc; + } + + a { + display: inline-block; + width: 100%; + height: 45px; + line-height: 45px; + font-family: "Roboto", sans-serif; + font-size: 20px; + color: $blue; + } + + .button { + background: none; + padding: 0; + } + + ul ul { + padding: 0 20px; + + li { + min-height: 40px; + } + + a { + height: 40px; + line-height: 40px; + font-size: 18px; + color: lighten(#222222, 20%); + } + } +} + +.push-menu-close-button { + position: absolute; + top: 0; + right: 0; + width: 50px; + height: 50px; + + &:before, + &:after { + content: ""; + position: absolute; + top: calc(50% - 1px); + left: 25%; + width: 50%; + height: 2px; + background-color: black; + } + + &:before { + transform: rotate(45deg); + } + + &:after { + transform: rotate(-45deg); + } +} + +// ocean nodes +$ocean-nodes-padding-Y: 60px; +$ocean-nodes-main-margin-bottom: 60px; +$ocean-nodes-h3-margin-bottom: 30px; + +// video +$video-section-height: 200px; + +// features +$features-h3-margin-bottom: 20px; +$feature-box-div-width: 100%; +$feature-box-margin-bottom: 0; +$feature-box-div-margin-bottom: 40px; + +// Home-specific + +.td-home { + &.flip-nav, + &.open-nav { + .logo { + background-image: url(/images/nav_logo2.svg); + } + } +} + +.header-hero { + margin-bottom: 0; + padding-bottom: 1px; + + .main-section { + padding: 0 10px; + margin-bottom: 30px; + } + + #vendorStrip { + display: none; + } +} + +// Add logo to CNCF section +section#cncf { + padding-top: 60px; + padding-bottom: 140px; + background-image: url(/images/cncf-color.svg); + background-position: center 100px; + background-repeat: no-repeat; + background-size: 300px; +} + +// OCEAN NODES +#oceanNodes { + padding-top: $ocean-nodes-padding-Y; + padding-bottom: $ocean-nodes-padding-Y; + + a { + color: $blue; + } + + .main-section { + margin-bottom: $ocean-nodes-padding-Y; + min-height: 160px; + } + + .image-wrapper { + max-width: 75%; + margin: 0 auto 20px; + text-align: center; + + img { + width: 100%; + max-width: 160px; + } + } + + .main-section:first-child { + .image-wrapper { + max-width: 100%; + + img { + max-width: 491px; + } + } + } + + h3 { + margin-bottom: $ocean-nodes-h3-margin-bottom; + } +} + +// Video thingy +#video { + height: $video-section-height; +} + +#video { + width: 100%; + position: relative; + background-position: center center; + background-size: cover; + + & > .light-text { + display: none; + // position: absolute; + // top: 50%; + // left: 75%; + width: 500px; + padding-top: 2rem; + // transform: translate(-50%, -50%); + color: white; + } + + h2 { + font-size: 32px; + line-height: 44px; + margin-bottom: 20px; + } + + p { + margin-bottom: 20px; + } + + #desktopKCButton { + position: relative; + font-size: 18px; + background-color: $dark-grey; + border-radius: 8px; + color: $white; + padding: 20px 10px 20px 10px; + } + + #desktopShowVideoButton { + position: relative; + font-size: 24px; + background-color: white; + border-radius: 8px; + color: $blue; + padding: 15px 30px 15px 80px; + margin-bottom: 15px; + + &:before { + content: ""; + position: absolute; + @include pureCenter(40px); + width: 0; + height: 0; + border-style: solid; + border-width: 10px 0 10px 20px; + border-color: transparent transparent transparent $blue; + } + } + + #mobileShowVideoButton { + @include pureCenter; + width: 80px; + height: 80px; + border-radius: 50%; + background-color: transparent; + border: 5px solid rgba(255, 255, 255, 0.2); + overflow: visible; + + &:after { + @include pureCenter; + left: 40px; + content: ""; + width: 0; + height: 0; + border-style: solid; + border-width: 20px 0 20px 30px; + border-color: transparent transparent transparent #ffffff; + } + } +} + +#videoPlayer { + @include fullScreen; + background-color: rgba(0, 0, 0, 0.9); + display: none; + + iframe { + @include pureCenter; + @include maintain-aspect-ratio; + } + + #closeButton { + position: absolute; + top: 20px; + right: 20px; + width: 50px; + height: 50px; + border: 2px solid transparent; + transition: 0.3s; + + &:before, + &:after { + content: ""; + position: absolute; + top: calc(50% - 1px); + left: 10%; + width: 80%; + height: 2px; + background-color: white; + } + + &:before { + transform: rotate(45deg); + } + + &:after { + transform: rotate(-45deg); + } + + &:hover { + border-color: white; + } + } +} + +// KubeWeekly +#kubeweekly { + background-color: $light-grey; + padding-top: 30px; + padding-bottom: 80px; + background-size: auto; + // font-family: "Roboto Mono", monospace !important; + font-size: 24px; + // font-weight: bold; + + h5 { + font-size: 20px; + } +} + +.subscribe-button { + border-radius: 6px; + padding: 0 20px; + line-height: 31px; + color: white; + background-color: blue; + text-decoration: none; + font-size: 14px; +} + +// Features +#features { + padding-top: 140px; + background-color: $light-grey; + background-image: url(/images/wheel.svg); + background-position: center 60px; + background-repeat: no-repeat; + background-size: 60px; +} + +.feature-box { + //padding: 50px 0 + width: 100%; + overflow: hidden; + clear: both; + + h4 { + line-height: normal; + margin-bottom: 15px; + } + + & > div:first-child { + float: left; + } + + & > div:last-child { + float: right; + } +} + +#features { + h3 { + margin-bottom: $features-h3-margin-bottom; + } + + .feature-box { + margin-bottom: $feature-box-margin-bottom; + + & > div { + width: $feature-box-div-width; + margin-bottom: $feature-box-div-margin-bottom; + } + } +} + +// Talk to us +#talkToUs { + h3, + h4 { + text-align: center; + } + + h3 { + margin-bottom: 15px; + } + + h4 { + line-height: normal; + margin-bottom: 50px; + + br { + display: none; + } + } + + #bigSocial { + overflow: hidden; + + div { + width: 100%; + float: left; + padding: 30px; + padding-top: 110px; + background-position: center top; + background-size: auto; + background-repeat: no-repeat; + } + + div:nth-child(1) { + background-image: url(/images/twitter_icon.png); + } + + div:nth-child(2) { + background-image: url(/images/github_icon.png); + } + + div:nth-child(3) { + background-image: url(/images/slack_icon.png); + } + + div:nth-child(4) { + background-image: url(/images/stackoverflow_icon.png); + } + + div + div { + margin-top: 20px; + margin-left: 0; + } + + a { + display: inline-block; + color: $blue; + font-size: 24px; + font-weight: 400; + text-decoration: none; + margin-bottom: 15px; + } + + a, + p { + text-align: center; + width: 100%; + } + } +} + +.td-home { + #talkToUs { + .main-section { + padding: 30px 0; + } + + h5 { + font-size: 20px; + } + } + + #caseStudiesWrapper { + position: relative; + text-align: center; + margin-bottom: 30px; + + img { + padding-bottom: 1rem; + } + + div { + position: relative; + display: inline-block; + vertical-align: top; + width: 100%; + min-height: 230px; + margin-bottom: 60px; + padding-right: 1rem; + background-position: top center; + } + + p { + font-size: 20px; + } + + a { + position: absolute; + bottom: -30px; + left: 50%; + transform: translateX(-50%); + color: $blue; + font-weight: 400; + } + } +} + +// Docs specific + +#editPageButton { + position: absolute; + top: 50px; + right: 25px; + width: 50px; + height: 50px; + line-height: 50px; + border-radius: 50%; + white-space: nowrap; + text-indent: 50px; + overflow: hidden; + background: $blue url(/images/icon-pencil.svg) no-repeat; + background-position: 12px 10px; + background-size: 29px 29px; +} + +.feedback--response__hidden { + display: none; +} + +// GitHub info/edit buttons +#pre-footer { + margin-top: 2rem; + + .button { + font-size: 1.1rem; + + &:first-of-type { + margin-right: 0.75rem; + } + } + + .lastedit { + margin-top: 1rem; + font-size: 1rem; + } +} diff --git a/assets/scss/_case-studies.scss b/assets/scss/_case-studies.scss new file mode 100644 index 0000000000..d61d24189c --- /dev/null +++ b/assets/scss/_case-studies.scss @@ -0,0 +1,142 @@ +// SASS for Case Studies pages go here: + +hr { + background-color: #999999; +} + +h2 { + margin-bottom: 15px !important; +} + +.subhead { + padding-bottom: 2% !important; + padding-top: 0% !important; +} + +.details { + margin-left: 1.9%; + padding-right: 5%; + font-size: 16px !important; + padding-bottom: 2% !important; +} + +.section1 { + margin-bottom: 3%; + + .cols { + width: 80% !important; + margin-left: 6.8%; + padding-top: 1.5%; + + .col1 { + width: 52% !important; + font-weight: 300 !important; + } + + .col2 { + width: 46% !important; + } + } +} + +.banner2text { + width: 63%; + padding-top: 10%; + padding-left: 0% !important; + float: initial !important; + text-align: center; + margin: 0 auto; + position: relative; +} + +.banner3text, +.banner4text, +.banner5text { + width: 63%; + padding-left: 0% !important; + float: initial !important; + text-align: center; + margin: 0 auto; + position: relative; +} + +.fullcol { + float: initial !important; +} + +body footer { + background-color: #585858 !important; +} + +.section1 { + float: left !important; +} + +.banner1 { + padding-left: 11.9% !important; +} + +.banner2 { + float: initial !important; + padding-bottom: 2% !important; +} + +footer { + padding: 0% 7%; +} + +.banner4, +.banner3, +.banner5 { + float: initial !important; +} + +@media screen and (max-width: 910px) { + .banner2text { + width: 47%; + padding-top: 45%; + } + + .details { + margin-left: 0%; + margin-bottom: 3%; + } + + .subhead { + padding-bottom: 0% !important; + padding-top: 0% !important; + } + + .banner3 { + width: 100% !important; + } +} + +@media screen and (max-width: 780px) { + .section1 .cols { + width: 100% !important; + margin-left: 0%; + padding-top: 5%; + + .col1, + .col2 { + width: 100% !important; + margin-left: 0% !important; + + .fullcol { + width: 90% !important; + margin-left: 5% !important; + + .banner1 { + padding-left: 10% !important; + margin-bottom: 6% !important; + + .banner2text { + padding-top: 60% !important; + padding-bottom: 2% !important; + } + } + } + } + } +} diff --git a/assets/scss/_custom.scss b/assets/scss/_custom.scss new file mode 100644 index 0000000000..52364b0a8a --- /dev/null +++ b/assets/scss/_custom.scss @@ -0,0 +1,386 @@ +/* GLOBAL */ +.td-main { + .row { + margin: 0; + } + + main { + img { + max-width: 100%; + } + + table { + margin-bottom: 1rem; + display: initial; + } + + @media only screen and (min-width: 768px) { + padding-top: 2rem !important; + } + } +} + +section { + .main-section { + @media only screen and (min-width: 1024px) { + max-width: 1200px; + } + } +} + +.td-outer { + padding: 0 !important; +} + +#desktopShowVideoButton { + border: none +} + +#videoPlayer { + #closeButton { + background: transparent; + } +} + +/* HEADER */ + +.td-navbar { + position: fixed !important; + width: 100%; + padding-bottom: 1rem !important; + background: transparent !important; + transition: 0.3s; + + .navbar-brand { + position: absolute; + width: 45px; + height: 44px; + background-repeat: no-repeat; + background-size: contain; + background-image: url("/images/favicon.png"); + } + + #hamburger { + &:focus { + outline: none; + } + } + + @media only screen and (min-width: 768px) { + .navbar-brand { + background-image: url("/images/nav_logo.svg"); + top: 1.5rem; + width: 180px; + margin-left: 1rem; + } + } +} + +.td-navbar-nav-scroll { + overflow: visible !important; + display: none; + + .navbar-nav { + overflow: visible !important; + position: relative; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-evenly; + + .nav-item { + position: relative; + height: 10%; + + .active::after { + position: absolute; + width: 100%; + height: 2px; + content: ""; + bottom: -4px; + left: 0; + background: #fff; + } + + .dropdown-menu { + left: -80px; + } + + &.dropdown:hover { + color: $medium-grey; + } + } + } + + @media only screen and (min-width: 768px) { + display: block; + margin-top: 3.5rem !important; + } + + @media only screen and (min-width: 1075px) { + margin-top: 1.5rem !important; + } +} + +// Flip-Nav +.flip-nav .td-navbar { + background-color: white !important; + box-shadow: 0 1px 2px $medium-grey; + + .navbar-nav { + .nav-item { + &.show .nav-link, + .nav-link { + color: $dark-grey; + + &:hover { + color: $medium-grey; + } + } + + .dropdown { + &:hover { + color: $medium-grey; + } + } + } + } + + .navbar-nav .nav-item .active { + color: $dark-grey; + + &::after { + background: $dark-grey; + } + } + + #hamburger:hover { + div, + &:before, + &:after { + background-color: $dark-grey; + } + } + + @media only screen and (min-width: 768px) { + .navbar-brand { + background-image: url("/images/nav_logo2.svg"); + } + } +} + +/* FOOTER */ +footer { + background-color: #303030; + background-image: url("/images/texture.png"); + padding: 1rem !important; + min-height: initial !important; + + .footer__links { + width: 100%; + margin: auto; + padding-bottom: 1rem; + + nav a { + display: block; + text-align: center; + } + + @media only screen and (min-width: 768px) { + nav { + display: flex; + flex-direction: row; + justify-content: space-around; + } + } + } + + small { + color: $light-grey; + font-size: 0.64rem; + + a { + text-decoration: inherit; + color: inherit; + + &:hover { + color: inherit; + } + } + } +} + +/* SIDE-DRAWER MENU */ + +.pi-pushmenu .sled { + .content ul { + padding: 0; + + li { + &:first-child { + display: none; + } + + a.nav-link { + padding: 0; + } + } + } + .push-menu-close-button { + background: transparent; + border: none; + + &:focus { + outline: none; + } + } +} + +/* DOCS */ + +.launch-cards { + button { + cursor: pointer; + box-sizing: border-box; + background: none; + margin: 0; + border: 0; + } + + ul, + li { + list-style: none; + padding-left: 0; + } +} + +// table of contents +.td-toc { + padding-top: 1.5rem !important; + top: 5rem !important; + + #TableOfContents { + padding-top: 1rem; + } +} + +// blockquotes and callouts + +blockquote { + padding: 0.4rem 0.4rem 0.4rem 1rem !important; +} + +// callouts are contained in static CSS as well. these require override. + +.caution { + border-left-color: #f0ad4e !important; +} + +.note { + border-left-color: #428bca !important; +} + +.warning { + border-left-color: #d9534f !important; +} + +// search & sidebar +.td-sidebar { + @media only screen and (min-width: 768px) { + padding-top: 1.5rem !important; + + .td-sidebar__inner { + top: 8.5rem; + + @media only screen and (min-width: 1075px) { + top: 6.5rem; + } + } + } +} + +.td-sidebar__inner { + form.td-sidebar__search { + + button.td-sidebar__toggle { + &:hover { + color: $white; + } + + color: $blue; + } + } +} + +.no-underline { + text-decoration: none !important; +} + +.hide { + display: none !important; +} + +.td-sidebar-link__page { + &#m-docs-search { + display: none; + } + + &#m-docs-test { + display: none; + } +} + +//Tutorials +main.content { + position: inherit; +} + +/* BLOG */ + +.td-blog { + + .td-sidebar-nav { + max-height: calc(100vh - 8rem); + } + + .widget-link { + margin-bottom: 1rem; + + .svg-inline--fa { + width: 25px; + } + + span { + margin-left: 0.5rem; + } + } +} + +/* COMMUNITY */ + +.newcommunitywrapper { + .news { + margin-left: 0; + + @media screen and (min-width: 768px) { + margin-left: 10%; + } + } +} + +/* CASE-STUDIES */ + +// Many of the case studies have small variations in markup and styles; +// some issues cannot be addressed due to inlined !important rules. +#caseStudies { + section .cols { + margin-left: 11%; + + div { + width: initial !important; + h2 { + margin-top: 1rem; + } + } + } +} diff --git a/assets/scss/_desktop.scss b/assets/scss/_desktop.scss new file mode 100644 index 0000000000..abff764d2f --- /dev/null +++ b/assets/scss/_desktop.scss @@ -0,0 +1,99 @@ +$main-max-width: 1200px; +$vendor-strip-height: 44px; +$video-section-height: 550px; + +@media screen and (min-width: 1024px) { + + .td-home { + .header-hero { + #vendorStrip { + display: block; + } + } + } + + .td-home { + + section, + header, + footer { + .main-section { + max-width: 1000px; + } + } + } + + #oceanNodes { + .main-section { + position: relative; + + &:nth-child(1) { + max-width: 1000px; + padding-right: 475px; + + h3, + p { + text-align: left + } + + .image-wrapper { + position: absolute; + max-width: 48%; + transform: translateY(-50%); + } + + img { + width: 425px; + } + } + } + } + + #video { + height: $video-section-height; + position: relative; + background-position: center center; + background-size: cover; + + &>.light-text { + margin-right: 10%; + } + } + + + + #talkToUs { + h4 { + br { + display: block; + } + } + + #bigSocial { + div { + width: calc(25% - 18px); + } + + div+div { + margin-left: 20px; + } + } + + .td-home #bigSocial { + div { + width: calc(33% - 15px); + } + + div:nth-child(3) { + margin-top: inherit; + } + } + } + + .td-home #caseStudiesWrapper { + div { + width: 24%; + min-height: 260px; + } + } +} \ No newline at end of file diff --git a/assets/scss/_reset.scss b/assets/scss/_reset.scss new file mode 100755 index 0000000000..7e3c0bbd3a --- /dev/null +++ b/assets/scss/_reset.scss @@ -0,0 +1,49 @@ +// CONVENIENCE +.clear { + display: block; + clear: both; +} + +.light-text { + color: white; +} + +.right { + float: right; +} + +.left { + float: left; +} + +.center { + text-align: center; +} + +//mixins +@mixin fullScreen { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; +} + +@mixin pureCenter($left: 50%, $top: 50%) { + position: absolute; + top: $top; + left: $left; + transform: translate(-50%, -50%); +} + +@mixin maintain-aspect-ratio( + $width-factor: 16, + $height-factor: 9, + $target-width: 80vw, + $target-height: 80vh +) { + width: $target-width; + height: $target-width * ($height-factor / $width-factor); + max-width: $target-height * ($width-factor / $height-factor); + max-height: $target-height; +} diff --git a/assets/scss/_size.scss b/assets/scss/_size.scss new file mode 100644 index 0000000000..9f0b7f655f --- /dev/null +++ b/assets/scss/_size.scss @@ -0,0 +1,20 @@ +section, +#vendorStrip { + padding-left: $full-width-paddingX; + padding-right: $full-width-paddingX; +} + +#hamburger { + width: $hamburger-size; + height: $hamburger-size; +} + +.header-hero { + padding-top: $hero-padding-top; +} + +#vendorStrip { + height: $vendor-strip-height; + line-height: $vendor-strip-height; + font-size: $vendor-strip-font-size; +} diff --git a/assets/scss/_skin.scss b/assets/scss/_skin.scss new file mode 100755 index 0000000000..32c94b9dc5 --- /dev/null +++ b/assets/scss/_skin.scss @@ -0,0 +1,5 @@ +$blue: #3371e3; +$light-grey: #f7f7f7; +$dark-grey: #303030; +$medium-grey: #4c4c4c; +$white: #ffffff; diff --git a/assets/scss/_tablet.scss b/assets/scss/_tablet.scss new file mode 100644 index 0000000000..54ead8319c --- /dev/null +++ b/assets/scss/_tablet.scss @@ -0,0 +1,211 @@ +// header +$full-width-paddingX: 20px; + +$main-width: 100%; +$main-max-width: 100%; + +$header-height: 80px; + +$logo-width: 180px; + +$nav-buttons-margin-left: 30px; + +$hamburger-size: 50px; + +// main nav +$main-nav-padding: 140px 0 30px; +$main-nav-h5-margin-bottom: 1em; +$main-nav-h3-margin-bottom: 0.6em; +$nav-box-width: 20%; +$nav-box-sibling-margin-left: calc(20% / 3); +$main-nav-main-sibling-margin-top: 60px; +$main-nav-left-button-size: 50px; +$main-nav-left-button-font-size: 18px; + +// hero +$hero-padding-top: 136px; +$headline-wrapper-margin-bottom: 40px; +$quickstart-button-padding: 0 50px; +$vendor-strip-font-size: 16px; + +//video +$video-section-height: 400px; + +//features +$features-h3-margin-bottom: 40px; +$feature-box-margin-bottom: 60px; +$feature-box-div-margin-bottom: 0; +$feature-box-div-width: 45%; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +@media screen and (min-width: 768px) { + @import "size"; + + #hamburger { + display: none; + } + + .td-home { + #viewDocs, + #tryKubernetes { + display: inline-block; + } + } + + #vendorStrip { + display: block; + text-align: center; + + img { + max-height: 24px; + vertical-align: middle; + margin: 0 30px; + } + } + + #oceanNodes { + h3 { + text-align: left; + margin-bottom: 18px; + } + + main, + .main-section { + position: relative; + clear: both; + display: table; + height: 160px; + + .content { + display: table-cell; + position: relative; + vertical-align: middle; + } + + .image-wrapper { + position: absolute; + top: 50%; + max-width: 25%; + max-height: 100%; + transform: translateY(-50%); + } + + &:nth-child(odd) { + padding-right: 210px; + + .image-wrapper { + right: 0; + } + } + + &:nth-child(even) { + padding-left: 210px; + + .image-wrapper { + left: 0; + } + } + + &:nth-child(1) { + padding-right: 0; + + h3, + p { + text-align: center; + } + + .image-wrapper { + position: relative; + display: block; + float: none; + max-width: 100%; + transform: none; + } + + .content { + display: block; + } + } + + img { + width: 100%; + } + } + } + + #video { + height: $video-section-height; + display: block; + height: 500px; + + & > .light-text { + display: block; + float: right; + text-align: left; + margin-right: 5%; + } + } + + #mobileShowVideoButton { + display: none; + } + + #features { + padding-bottom: 60px; + + .feature-box { + margin-bottom: 30px; + + &:last-child { + margin-bottom: 0; + } + } + + h3 { + margin-bottom: $features-h3-margin-bottom; + } + + .feature-box { + & > div { + width: $feature-box-div-width; + margin-bottom: $feature-box-div-margin-bottom; + } + } + } + + #talkToUs { + #bigSocial { + div { + width: calc(50% - 15px); + } + + div + div { + margin-top: 0; + } + + div:nth-child(2) { + margin-left: 20px; + } + + div:nth-child(4) { + margin-left: 20px; + } + + a { + display: inline-block; + color: $blue; + font-weight: 400; + text-decoration: none; + } + } + } + + .td-home #caseStudiesWrapper { + div { + width: 48%; + } + } +} diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss new file mode 100644 index 0000000000..da42c07367 --- /dev/null +++ b/assets/scss/_variables_project.scss @@ -0,0 +1,13 @@ +/* This file is provided by Docsy as an entry point to styling. +Add styles or override variables from the theme here. */ + +@import "reset"; +@import "skin"; + +//K8S-Docsy integration +@import "custom"; + +//Media queries +@import "base"; +@import "tablet"; +@import "desktop"; diff --git a/config.toml b/config.toml index f829fec6c2..34aa9d756d 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,11 @@ baseURL = "https://kubernetes.io" title = "Kubernetes" +# Hugo allows theme composition (and inheritance). The precedence is from left to right. +theme = ["docsy"] + +# Language settings +contentDir = "content/en" defaultContentLanguage = "en" defaultContentLanguageInSubdir = false enableRobotsTXT = true @@ -10,10 +15,17 @@ disableKinds = ["taxonomy", "taxonomyTerm"] ignoreFiles = [ "^OWNERS$", "README[-]+[a-z]*\\.md", "^node_modules$", "content/en/docs/doc-contributor-tools" ] -contentDir = "content/en" - timeout = 3000 +# Highlighting config. +pygmentsCodeFences = true +pygmentsUseClasses = false +# Use the new Chroma Go highlighter in Hugo. +pygmentsUseClassic = false +#pygmentsOptions = "linenos=table" +# See https://help.farbox.com/pygments.html +pygmentsStyle = "emacs" + # Enable Git variables like commit, lastmod enableGitInfo = true @@ -23,6 +35,14 @@ disableLanguages = ["hi", "no"] [markup] [markup.goldmark] + [markup.goldmark.extensions] + definitionList = true + table = true + typographer = false + [markup.goldmark.parser] + attribute = true + autoHeadingID = true + autoHeadingIDType = "blackfriday" [markup.goldmark.renderer] unsafe = true [markup.highlight] @@ -35,6 +55,10 @@ disableLanguages = ["hi", "no"] noClasses = true style = "emacs" tabWidth = 4 + [markup.tableOfContents] + endLevel = 3 + ordered = false + startLevel = 2 [frontmatter] date = ["date", ":filename", "publishDate", "lastmod"] @@ -64,7 +88,28 @@ baseName = "_headers" isPlainText = true notAlternative = true +# Image processing configuration. +[imaging] +resampleFilter = "CatmullRom" +quality = 75 +anchor = "smart" + +[services] +[services.googleAnalytics] +# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback]. +id = "UA-00000000-0" + [params] +copyright_k8s = "The Kubernetes Authors" +copyright_linux = "Copyright © 2020 The Linux Foundation ®." +# privacy_policy = "https://policies.google.com/privacy" + +# First one is picked as the Twitter card image if not set on page. +# images = ["images/project-illustration.png"] + +# Menu title if your navbar has a versions selector to access old versions of your site. +# This menu appears only if you have at least one [params.versions] set. +version_menu = "Versions" time_format_blog = "Monday, January 02, 2006" description = "Production-Grade Container Orchestration" @@ -82,14 +127,25 @@ nextUrl = "https://kubernetes-io-vnext-staging.netlify.com/" githubWebsiteRepo = "github.com/kubernetes/website" githubWebsiteRaw = "raw.githubusercontent.com/kubernetes/website" -# param for displaying an announcement block on every page; see PR #16210 +# param for displaying an announcement block on every page. +# See /i18n/en.toml for message text and title. announcement = true -# announcement_message is only displayed when announcement = true; update with your specific message -announcement_title = "Black lives matter." -announcement_message_full = "We stand in solidarity with the Black community.
Racism is unacceptable.
It conflicts with the [core values of the Kubernetes project](https://git.k8s.io/community/values.md) and our community does not tolerate it." #appears on homepage. Use md formatting for links and
for line breaks. -announcement_message_compact = "We stand in solidarity with the Black community.
Racism is unacceptable.
It conflicts with the [core values of the Kubernetes project](https://git.k8s.io/community/values.md) and our community does not tolerate it." #appears on subpages announcement_bg = "#000000" #choose a dark color – text is white +#Searching +k8s_search = true + +#The following search parameters are specific to Docsy's implementation. Kubernetes implementes its own search-related partials and scripts. + +# Google Custom Search Engine ID. Remove or comment out to disable search. +#gcs_engine_id = "011737558837375720776:fsdu1nryfng" + +# Enable Algolia DocSearch +algolia_docsearch = false + +# Enable Lunr.js offline search +offlineSearch = false + [params.pushAssets] css = [ "callouts", @@ -136,6 +192,81 @@ githubbranch = "v1.15.11" docsbranch = "release-1.15" url = "https://v1-15.docs.kubernetes.io" + +# User interface configuration +[params.ui] +# Enable to show the side bar menu in its compact state. +sidebar_menu_compact = false +# Set to true to disable breadcrumb navigation. +breadcrumb_disable = false +# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) +sidebar_search_disable = false +# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar +navbar_logo = true +# Set to true to disable the About link in the site footer +footer_about_disable = false + +# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events. +# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set. +# If you want this feature, but occasionally need to remove the "Feedback" section from a single page, +# add "hide_feedback: true" to the page's front matter. +[params.ui.feedback] +enable = true +# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful). +yes = 'Glad to hear it! Please tell us how we can improve.' +no = 'Sorry to hear that. Please tell us how we can improve.' + +[params.links] +# End user relevant links. These will show up on left side of footer and in the community page if you have one. +[[params.links.user]] + name = "User mailing list" + url = "https://discuss.kubernetes.io" + icon = "fa fa-envelope" + desc = "Discussion and help from your fellow users" + +[[params.links.user]] + name = "Twitter" + url = "https://twitter.com/kubernetesio" + icon = "fab fa-twitter" + desc = "Follow us on Twitter to get the latest news!" + +[[params.links.user]] + name = "Calendar" + url = "https://calendar.google.com/calendar/embed?src=nt2tcnbtbied3l6gi2h29slvc0%40group.calendar.google.com" + icon = "fas fa-calendar-alt" + desc = "Google Calendar for Kubernetes" + +[[params.links.user]] + name = "Youtube" + url = "https://youtbue.com/kubernetescommunity" + icon = "fab fa-youtube" + desc = "Youtube community videos" + +# Developer relevant links. These will show up on right side of footer and in the community page if you have one. +[[params.links.developer]] + name = "GitHub" + url = "https://github.com/kubernetes/kubernetes" + icon = "fab fa-github" + desc = "Development takes place here!" + +[[params.links.developer]] + name = "Slack" + url = "https://slack.k8s.io" + icon = "fab fa-slack" + desc = "Chat with other project developers" + +[[params.links.developer]] + name = "Contribute" + url = "https://git.k8s.io/community/contributors/guide" + icon = "fas fa-edit" + desc = "Contribute to the Kubernetes website" + +[[params.links.developer]] + name = "Stack Overflow" + url = "https://stackoverflow.com/questions/tagged/kubernetes" + icon = "fab fa-stack-overflow" + desc = "Practical questions and curated answers" + # Language definitions. [languages] diff --git a/content/de/docs/concepts/_index.md b/content/de/docs/concepts/_index.md index 82b5b0e5b0..43d273b432 100644 --- a/content/de/docs/concepts/_index.md +++ b/content/de/docs/concepts/_index.md @@ -1,17 +1,17 @@ --- title: Konzepte main_menu: true -content_template: templates/concept +content_type: concept weight: 40 --- -{{% capture overview %}} + Im Abschnitt Konzepte erfahren Sie mehr über die Bestandteile des Kubernetes-Systems und die Abstraktionen, die Kubernetes zur Verwaltung Ihres Clusters zur Verfügung stellt. Sie erhalten zudem ein tieferes Verständnis der Funktionsweise von Kubernetes. -{{% /capture %}} -{{% capture body %}} + + ## Überblick @@ -65,11 +65,12 @@ Die Nodes in einem Cluster sind die Maschinen (VMs, physische Server usw.), auf * [Anmerkungen](/docs/concepts/overview/working-with-objects/annotations/) -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + Wenn Sie eine Konzeptseite schreiben möchten, lesen Sie [Seitenvorlagen verwenden](/docs/home/contribute/page-templates/) für Informationen zum Konzeptseitentyp und zur Dokumentations Vorlage. -{{% /capture %}} + diff --git a/content/de/docs/concepts/architecture/cloud-controller.md b/content/de/docs/concepts/architecture/cloud-controller.md index 7e044119b8..21da96e612 100644 --- a/content/de/docs/concepts/architecture/cloud-controller.md +++ b/content/de/docs/concepts/architecture/cloud-controller.md @@ -1,10 +1,10 @@ --- title: Zugrunde liegende Konzepte des Cloud Controller Manager -content_template: templates/concept +content_type: concept weight: 30 --- -{{% capture overview %}} + Das Konzept des Cloud Controller Managers (CCM) (nicht zu verwechseln mit der Binärdatei) wurde ursprünglich entwickelt, um Cloud-spezifischen Anbieter Code und den Kubernetes Kern unabhängig voneinander entwickeln zu können. Der Cloud Controller Manager läuft zusammen mit anderen Master Komponenten wie dem Kubernetes Controller Manager, dem API-Server und dem Scheduler auf dem Host. Es kann auch als Kubernetes Addon gestartet werden, in diesem Fall läuft er auf Kubernetes. Das Design des Cloud Controller Managers basiert auf einem Plugin Mechanismus, der es neuen Cloud Anbietern ermöglicht, sich mit Kubernetes einfach über Plugins zu integrieren. Es gibt Pläne für die Einbindung neuer Cloud Anbieter auf Kubernetes und für die Migration von Cloud Anbietern vom alten Modell auf das neue CCM-Modell. @@ -15,10 +15,10 @@ Die Architektur eines Kubernetes Clusters ohne den Cloud Controller Manager sieh ![Pre CCM Kube Arch](/images/docs/pre-ccm-arch.png) -{{% /capture %}} -{{% capture body %}} + + ## Design @@ -235,4 +235,4 @@ Die folgenden Cloud Anbieter haben CCMs implementiert: Eine vollständige Anleitung zur Konfiguration und zum Betrieb des CCM findest du [hier](/docs/tasks/administer-cluster/running-cloud-controller/#cloud-controller-manager). -{{% /capture %}} + diff --git a/content/de/docs/concepts/architecture/master-node-communication.md b/content/de/docs/concepts/architecture/master-node-communication.md index e7903f2606..6874cdb687 100644 --- a/content/de/docs/concepts/architecture/master-node-communication.md +++ b/content/de/docs/concepts/architecture/master-node-communication.md @@ -1,18 +1,18 @@ --- title: Master-Node Kommunikation -content_template: templates/concept +content_type: concept weight: 20 --- -{{% capture overview %}} + Dieses Dokument katalogisiert die Kommunikationspfade zwischen dem Master (eigentlich dem Apiserver) und des Kubernetes-Clusters. Die Absicht besteht darin, Benutzern die Möglichkeit zu geben, ihre Installation so anzupassen, dass die Netzwerkkonfiguration so abgesichert wird, dass der Cluster in einem nicht vertrauenswürdigen Netzwerk (oder mit vollständig öffentlichen IP-Adressen eines Cloud-Providers) ausgeführt werden kann. -{{% /capture %}} -{{% capture body %}} + + ## Cluster zum Master @@ -69,4 +69,4 @@ Dieser Tunnel stellt sicher, dass der Datenverkehr nicht außerhalb des Netzwerk SSH-Tunnel werden zur Zeit nicht unterstützt. Sie sollten also nicht verwendet werden, sei denn, man weiß, was man tut. Ein Ersatz für diesen Kommunikationskanal wird entwickelt. -{{% /capture %}} + diff --git a/content/de/docs/concepts/architecture/nodes.md b/content/de/docs/concepts/architecture/nodes.md index 0f3d396968..8a2b8b7fde 100644 --- a/content/de/docs/concepts/architecture/nodes.md +++ b/content/de/docs/concepts/architecture/nodes.md @@ -1,10 +1,10 @@ --- title: Nodes -content_template: templates/concept +content_type: concept weight: 10 --- -{{% capture overview %}} + Ein Knoten (Node in Englisch) ist eine Arbeitsmaschine in Kubernetes, früher als `minion` bekannt. Ein Node kann je nach Cluster eine VM oder eine physische Maschine sein. Jeder Node enthält @@ -13,10 +13,10 @@ und wird von den Master-Komponenten verwaltet. Die Dienste auf einem Node umfassen die [Container Runtime](/docs/concepts/overview/components/#node-components), das Kubelet und den Kube-Proxy. Weitere Informationen finden Sie im Abschnitt Kubernetes Node in der Architekturdesign-Dokumentation. -{{% /capture %}} -{{% capture body %}} + + ## Node Status @@ -244,4 +244,4 @@ Wenn Sie Ressourcen explizit für Nicht-Pod-Prozesse reservieren möchten, folge Node ist eine Top-Level-Ressource in der Kubernetes-REST-API. Weitere Details zum API-Objekt finden Sie unter: [Node API object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#node-v1-core). -{{% /capture %}} + diff --git a/content/de/docs/concepts/cluster-administration/addons.md b/content/de/docs/concepts/cluster-administration/addons.md index 4d26b57da8..f5eedeb59b 100644 --- a/content/de/docs/concepts/cluster-administration/addons.md +++ b/content/de/docs/concepts/cluster-administration/addons.md @@ -1,9 +1,9 @@ --- title: Addons Installieren -content_template: templates/concept +content_type: concept --- -{{% capture overview %}} + Add-Ons erweitern die Funktionalität von Kubernetes. @@ -12,10 +12,10 @@ Diese Seite gibt eine Übersicht über einige verfügbare Add-Ons und verweist a Die Add-Ons in den einzelnen Kategorien sind alphabetisch sortiert - Die Reihenfolge impliziert keine bevorzugung einzelner Projekte. -{{% /capture %}} -{{% capture body %}} + + ## Networking und Network Policy @@ -53,4 +53,4 @@ Es gibt einige weitere Add-Ons die in dem abgekündigten [cluster/addons](https: Add-Ons die ordentlich gewartet werden dürfen gerne hier aufgezählt werden. Wir freuen uns auf PRs! -{{% /capture %}} + diff --git a/content/de/docs/concepts/cluster-administration/controller-metrics.md b/content/de/docs/concepts/cluster-administration/controller-metrics.md index 4fd9b0d538..86cd0a1548 100644 --- a/content/de/docs/concepts/cluster-administration/controller-metrics.md +++ b/content/de/docs/concepts/cluster-administration/controller-metrics.md @@ -1,15 +1,15 @@ --- title: Controller Manager Metriken -content_template: templates/concept +content_type: concept weight: 100 --- -{{% capture overview %}} + Controller Manager Metriken liefern wichtige Erkenntnisse über die Leistung und den Zustand von den Controller Managern. -{{% /capture %}} -{{% capture body %}} + + ## Was sind Controller Manager Metriken Die Kennzahlen des Controller Managers liefert wichtige Erkenntnisse über die Leistung und den Zustand des Controller Managers. @@ -38,4 +38,3 @@ Die Metriken werden im [Prometheus Format](https://prometheus.io/docs/instrument In einer Produktionsumgebung können Sie Prometheus oder einen anderen Metrik Scraper konfigurieren, um diese Metriken regelmäßig zu sammeln und in einer Art Zeitreihen Datenbank verfügbar zu machen. -{{% /capture %}} \ No newline at end of file diff --git a/content/de/docs/concepts/cluster-administration/proxies.md b/content/de/docs/concepts/cluster-administration/proxies.md index 16d36ad518..a872dbad8d 100644 --- a/content/de/docs/concepts/cluster-administration/proxies.md +++ b/content/de/docs/concepts/cluster-administration/proxies.md @@ -1,14 +1,14 @@ --- title: Proxies in Kubernetes -content_template: templates/concept +content_type: concept weight: 90 --- -{{% capture overview %}} + Auf dieser Seite werden die im Kubernetes verwendeten Proxies erläutert. -{{% /capture %}} -{{% capture body %}} + + ## Proxies @@ -61,4 +61,3 @@ Kubernetes Benutzer müssen sich in der Regel um nichts anderes als die ersten b Proxies haben die Möglichkeit der Umleitung (redirect) ersetzt. Umleitungen sind veraltet. -{{% /capture %}} \ No newline at end of file diff --git a/content/de/docs/concepts/containers/images.md b/content/de/docs/concepts/containers/images.md index 03ec9b4a0e..d142405f06 100644 --- a/content/de/docs/concepts/containers/images.md +++ b/content/de/docs/concepts/containers/images.md @@ -1,18 +1,18 @@ --- title: Images -content_template: templates/concept +content_type: concept weight: 10 --- -{{% capture overview %}} + Sie erstellen ihr Docker Image und laden es in eine Registry hoch, bevor es in einem Kubernetes Pod referenziert werden kann. Die `image` Eigenschaft eines Containers unterstüzt die gleiche Syntax wie die des `docker` Kommandos, inklusive privater Registries und Tags. -{{% /capture %}} -{{% capture body %}} + + ## Aktualisieren von Images @@ -334,7 +334,7 @@ Es gibt eine Anzahl an Lösungen um eigene Registries zu konfigurieren, hier sin - Generieren die Registry - Zugriffsdaten für jeden Mandanten, abgelegt in einem Secret das in jedem Mandanten - Namespace vorhanden ist. - Der Mandant fügt dieses Sercret zu den imagePullSecrets in jedem seiner Namespace hinzu. -{{% /capture %}} + Falls die Zugriff auf mehrere Registries benötigen, können sie ein Secret für jede Registry erstellen, Kubelet wird jedwede `imagePullSecrets` in einer einzelnen `.docker/config.json` zusammenfassen. diff --git a/content/de/docs/concepts/example-concept-template.md b/content/de/docs/concepts/example-concept-template.md index 9f3a2bcfac..a7694cc54b 100644 --- a/content/de/docs/concepts/example-concept-template.md +++ b/content/de/docs/concepts/example-concept-template.md @@ -1,10 +1,10 @@ --- title: Konzept Dokumentations-Vorlage -content_template: templates/concept +content_type: concept toc_hide: true --- -{{% capture overview %}} + {{< note >}} Stellen Sie auch sicher [einen Eintrag im Inhaltsverzeichnis](/docs/home/contribute/write-new-topic/#creating-an-entry-in-the-table-of-contents) für Ihr neues Dokument zu erstellen. @@ -12,9 +12,9 @@ Stellen Sie auch sicher [einen Eintrag im Inhaltsverzeichnis](/docs/home/contrib Diese Seite erklärt ... -{{% /capture %}} -{{% capture body %}} + + ## Verstehen ... @@ -24,15 +24,16 @@ Kubernetes bietet ... Benutzen Sie ... -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + **[Optionaler Bereich]** * Lernen Sie mehr über [ein neues Thema schreiben](/docs/home/contribute/write-new-topic/). * Besuchen Sie [Seitenvorlagen verwenden - Konzeptvorlage](/docs/home/contribute/page-templates/#concept_template) wie Sie diese Vorlage verwenden. -{{% /capture %}} + diff --git a/content/de/docs/concepts/overview/components.md b/content/de/docs/concepts/overview/components.md index 47560e0a68..af371e3b87 100644 --- a/content/de/docs/concepts/overview/components.md +++ b/content/de/docs/concepts/overview/components.md @@ -1,17 +1,17 @@ --- title: Kubernetes Komponenten -content_template: templates/concept +content_type: concept weight: 20 card: name: concepts weight: 20 --- -{{% capture overview %}} + In diesem Dokument werden die verschiedenen binären Komponenten beschrieben, die zur Bereitstellung eines funktionsfähigen Kubernetes-Clusters erforderlich sind. -{{% /capture %}} -{{% capture body %}} + + ## Master-Komponenten Master-Komponenten stellen die Steuerungsebene des Clusters bereit. Master-Komponenten treffen globale Entscheidungen über den Cluster (z. B. Zeitplanung) und das Erkennen und Reagieren auf Clusterereignisse (Starten eines neuen Pods, wenn das `replicas`-Feld eines Replikationscontrollers nicht zufriedenstellend ist). @@ -107,6 +107,6 @@ Von Kubernetes gestartete Container schließen diesen DNS-Server automatisch in Ein [Cluster-level logging](/docs/concepts/cluster-administration/logging/) Mechanismus ist für das Speichern von Containerprotokollen in einem zentralen Protokollspeicher mit Such- / Browsing-Schnittstelle verantwortlich. -{{% /capture %}} + diff --git a/content/de/docs/concepts/overview/what-is-kubernetes.md b/content/de/docs/concepts/overview/what-is-kubernetes.md index af7cfc614a..66b79d6928 100644 --- a/content/de/docs/concepts/overview/what-is-kubernetes.md +++ b/content/de/docs/concepts/overview/what-is-kubernetes.md @@ -1,17 +1,17 @@ --- title: Was ist Kubernetes? -content_template: templates/concept +content_type: concept weight: 10 card: name: concepts weight: 10 --- -{{% capture overview %}} + Diese Seite ist eine Übersicht über Kubernetes. -{{% /capture %}} -{{% capture body %}} + + Kubernetes ist eine portable, erweiterbare Open-Source-Plattform zur Verwaltung von containerisierten Arbeitslasten und Services, die sowohl die deklarative Konfiguration als auch die Automatisierung erleichtert. @@ -160,11 +160,12 @@ Der Name **Kubernetes** stammt aus dem Griechischen, bedeutet *Steuermann* oder [cybernetic](http://www.etymonline.com/index.php?term=cybernetics). *K8s* ist eine Abkürzung, die durch Ersetzen der 8 Buchstaben "ubernete" mit "8" abgeleitet wird. -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + * [Bereit loszulegen](/docs/setup/)? * Weitere Einzelheiten finden Sie in der [Kubernetes Dokumentation](/docs/home/). -{{% /capture %}} + diff --git a/content/de/docs/contribute/_index.md b/content/de/docs/contribute/_index.md index 9853ef4e54..db7c6687ab 100644 --- a/content/de/docs/contribute/_index.md +++ b/content/de/docs/contribute/_index.md @@ -1,12 +1,12 @@ --- -content_template: templates/concept +content_type: concept title: Zur Kubernets-Dokumentation beitragen linktitle: Mitmachen main_menu: true weight: 80 --- -{{% capture overview %}} + Wenn Sie an der Dokumentation oder der Website von Kubernetes mitwirken möchten, freuen wir uns über Ihre Hilfe! Jeder kann seinen Beitrag leisten, unabhängig davon ob Sie neu im Projekt sind oder schon lange dabei sind, und ob Sie sich als @@ -15,7 +15,7 @@ Entwickler, Endbenutzer oder einfach jemanden, der es einfach nicht aushält, Ti Weitere Möglichkeiten, sich in der Kubernetes-Community zu engagieren oder mehr über uns zu erfahren, finden Sie auf der [Kubernetes-Community-Seite](/community/). Informationen zum Handbuch zur Dokumentation von Kubernetes finden Sie im [Gestaltungshandbuch](/docs/contribute/style/style-guide/). -{{% capture body %}} + ## Arten von Mitwirkenden @@ -59,4 +59,4 @@ Dies ist keine vollständige Liste von Möglichkeiten, wie Sie zur Kubernetes-Do - Verbesserungsvorschläge für Dokumentprüfungen vorschlagen - Vorschläge für Verbesserungen der Kubernetes-Website oder anderer Tools -{{% /capture %}} + diff --git a/content/de/docs/contribute/localization.md b/content/de/docs/contribute/localization.md index 79084cc0f2..031eeb8755 100644 --- a/content/de/docs/contribute/localization.md +++ b/content/de/docs/contribute/localization.md @@ -1,6 +1,6 @@ --- title: Lokalisierung der Kubernetes Dokumentation -content_template: templates/concept +content_type: concept weight: 50 card: name: mitarbeiten @@ -8,13 +8,13 @@ card: title: Übersetzen der Dokumentation --- -{{% capture overview %}} + Diese Seite zeigt dir wie die Dokumentation für verschiedene Sprachen [lokalisiert](https://blog.mozilla.org/l10n/2011/12/14/i18n-vs-l10n-whats-the-diff/) wird. -{{% /capture %}} -{{% capture body %}} + + ## Erste Schritte @@ -277,13 +277,14 @@ SIG Docs begrüßt Upstream Beiträge, also auf das englische Original, und Korr Du kannst auch dazu beitragen, Inhalte zu einer bestehenden Lokalisierung hinzuzufügen oder zu verbessern. Trete dem [Slack-Kanal](https://kubernetes.slack.com/messages/C1J0BPD2M/) für die Lokalisierung bei und beginne mit der Eröffnung von PRs, um zu helfen. Bitte beschränke deine Pull-Anfragen auf eine einzige Lokalisierung, da Pull-Anfragen, die Inhalte in mehreren Lokalisierungen ändern, schwer zu überprüfen sein könnten. -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + Sobald eine Lokalisierung die Anforderungen an den Arbeitsablauf und die Mindestausgabe erfüllt, wird SIG docs: - Die Sprachauswahl auf der Website aktivieren - Die Verfügbarkeit der Lokalisierung über die Kanäle der [Cloud Native Computing Foundation](https://www.cncf.io/about/) (CNCF), einschließlich des [Kubernetes Blogs](https://kubernetes.io/blog/) veröffentlichen. -{{% /capture %}} + diff --git a/content/de/docs/home/supported-doc-versions.md b/content/de/docs/home/supported-doc-versions.md index 8463d1bcd9..c1064b9730 100644 --- a/content/de/docs/home/supported-doc-versions.md +++ b/content/de/docs/home/supported-doc-versions.md @@ -1,20 +1,20 @@ --- title: Unterstützte Versionen der Kubernetes-Dokumentation -content_template: templates/concept +content_type: concept card: name: about weight: 10 title: Unterstützte Versionen der Dokumentation --- -{{% capture overview %}} + Diese Website enthält Dokumentation für die aktuelle Version von Kubernetes und die vier vorherigen Versionen von Kubernetes. -{{% /capture %}} -{{% capture body %}} + + ## Aktuelle Version @@ -25,6 +25,6 @@ Die aktuelle Version ist {{< versions-other >}} -{{% /capture %}} + diff --git a/content/de/docs/reference/_index.md b/content/de/docs/reference/_index.md index b57b2740cd..7ffa9c04c9 100644 --- a/content/de/docs/reference/_index.md +++ b/content/de/docs/reference/_index.md @@ -5,16 +5,16 @@ approvers: linkTitle: "Referenzen" main_menu: true weight: 70 -content_template: templates/concept +content_type: concept --- -{{% capture overview %}} + Dieser Abschnitt der Kubernetes-Dokumentation enthält Referenzinformationen. -{{% /capture %}} -{{% capture body %}} + + ## API-Referenz @@ -58,4 +58,4 @@ Offiziell unterstützte Clientbibliotheken: Ein Archiv der Designdokumente für Kubernetes-Funktionalität. Gute Ansatzpunkte sind [Kubernetes Architektur](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md) und [Kubernetes Design Übersicht](https://git.k8s.io/community/contributors/design-proposals). -{{% /capture %}} + diff --git a/content/de/docs/reference/kubectl/cheatsheet.md b/content/de/docs/reference/kubectl/cheatsheet.md index c68fc183b5..15b8d0bda3 100644 --- a/content/de/docs/reference/kubectl/cheatsheet.md +++ b/content/de/docs/reference/kubectl/cheatsheet.md @@ -1,20 +1,20 @@ --- title: kubectl Spickzettel -content_template: templates/concept +content_type: concept card: name: reference weight: 30 --- -{{% capture overview %}} + Siehe auch: [Kubectl Überblick](/docs/reference/kubectl/overview/) und [JsonPath Dokumentation](/docs/reference/kubectl/jsonpath). Diese Seite ist eine Übersicht über den Befehl `kubectl`. -{{% /capture %}} -{{% capture body %}} + + # kubectl - Spickzettel @@ -335,9 +335,10 @@ Ausführlichkeit | Beschreibung `--v=8` | HTTP-Anforderungsinhalt anzeigen `--v=9` | HTTP-Anforderungsinhalt anzeigen, ohne den Inhalt zu kürzen. -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + * Lernen Sie mehr im [Überblick auf kubectl](/docs/reference/kubectl/overview/). @@ -347,4 +348,4 @@ Ausführlichkeit | Beschreibung * Entdecken Sie mehr Community [kubectl Spickzettel](https://github.com/dennyzhang/cheatsheet-kubernetes-A4). -{{% /capture %}} + diff --git a/content/de/docs/reference/tools.md b/content/de/docs/reference/tools.md index 3daeda6efe..42bba64616 100644 --- a/content/de/docs/reference/tools.md +++ b/content/de/docs/reference/tools.md @@ -1,13 +1,13 @@ --- title: Tools -content_template: templates/concept +content_type: concept --- -{{% capture overview %}} + Kubernetes enthält mehrere integrierte Tools, die Ihnen bei der Arbeit mit dem Kubernetes System helfen. -{{% /capture %}} -{{% capture body %}} + + ## Kubectl [`kubectl`](/docs/tasks/tools/install-kubectl/) ist ein Kommandozeilenprogramm für Kubernetes. Es steuert den Kubernetes Clustermanager. @@ -49,4 +49,4 @@ Verwenden Sie Kompose um: * Ein Docker Compose Datei in Kubernetes Objekte zu übersetzen * Von Ihrer lokalen Docker Entwicklung auf eine Kubernetes verwaltete Entwicklung zu wechseln * v1 oder v2 Docker Compose `yaml` Dateien oder [Distributed Application Bundles](https://docs.docker.com/compose/bundles/) zu konvertieren -{{% /capture %}} + diff --git a/content/de/docs/setup/_index.md b/content/de/docs/setup/_index.md index 3ee12cbb7b..d7f074efb3 100644 --- a/content/de/docs/setup/_index.md +++ b/content/de/docs/setup/_index.md @@ -2,10 +2,10 @@ title: Setup main_menu: true weight: 30 -content_template: templates/concept +content_type: concept --- -{{% capture overview %}} + Diese Sektion umfasst verschiedene Optionen zum Einrichten und Betrieb von Kubernetes. @@ -15,9 +15,9 @@ Sie können einen Kubernetes-Cluster auf einer lokalen Maschine, Cloud, On-Prem Noch einfacher können Sie einen Kubernetes-Cluster in einer Lern- und Produktionsumgebung erstellen. -{{% /capture %}} -{{% capture body %}} + + ## Lernumgebung @@ -99,4 +99,4 @@ Die folgende Tabelle für Produktionsumgebungs-Lösungen listet Anbieter und der | [VMware](https://cloud.vmware.com/) | [VMware Cloud PKS](https://cloud.vmware.com/vmware-cloud-pks) |[VMware Enterprise PKS](https://cloud.vmware.com/vmware-enterprise-pks) | [VMware Enterprise PKS](https://cloud.vmware.com/vmware-enterprise-pks) | [VMware Essential PKS](https://cloud.vmware.com/vmware-essential-pks) | |[VMware Essential PKS](https://cloud.vmware.com/vmware-essential-pks) | [Z.A.R.V.I.S.](https://zarvis.ai/) | ✔ | | | | | | -{{% /capture %}} + diff --git a/content/de/docs/setup/minikube.md b/content/de/docs/setup/minikube.md index 06734bd28f..f0484a8447 100644 --- a/content/de/docs/setup/minikube.md +++ b/content/de/docs/setup/minikube.md @@ -1,15 +1,15 @@ --- title: Kubernetes lokal über Minikube betreiben -content_template: templates/concept +content_type: concept --- -{{% capture overview %}} + Minikube ist ein Tool, mit dem Kubernetes lokal einfach ausgeführt werden kann. Minikube führt einen Kubernetes-Cluster mit einem einzigen Node in einer VM auf Ihrem Laptop aus, damit Anwender Kubernetes ausprobieren oder täglich damit entwickeln können. -{{% /capture %}} -{{% capture body %}} + + ## Minikube-Funktionen @@ -34,10 +34,10 @@ Minikube unterstützt die folgenden Treiber: * virtualbox * vmwarefusion -* kvm2 ([Treiber installation](https://git.k8s.io/minikube/docs/drivers.md#kvm2-driver)) -* kvm ([Treiber installation](https://git.k8s.io/minikube/docs/drivers.md#kvm-driver)) -* hyperkit ([Treiber installation](https://git.k8s.io/minikube/docs/drivers.md#hyperkit-driver)) -* xhyve ([Treiber installation](https://git.k8s.io/minikube/docs/drivers.md#xhyve-driver)) (deprecated) +* kvm2 ([Treiber installation](https://minikube.sigs.k8s.io/docs/drivers/#kvm2-driver)) +* kvm ([Treiber installation](https://minikube.sigs.k8s.io/docs/drivers/#kvm-driver)) +* hyperkit ([Treiber installation](https://minikube.sigs.k8s.io/docs/drivers/#hyperkit-driver)) +* xhyve ([Treiber installation](https://minikube.sigs.k8s.io/docs/drivers/#xhyve-driver)) (deprecated) * hyperv ([Treiber installation](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperv-driver)) Beachten Sie, dass die unten angegebene IP-Adresse dynamisch ist und sich ändern kann. Sie kann mit `minikube ip` abgerufen werden. * none (Führt die Kubernetes-Komponenten auf dem Host und nicht in einer VM aus. Die Verwendung dieses Treibers erfordert Docker ([Docker installieren](https://docs.docker.com/install/linux/docker-ce/ubuntu/)) und eine Linux-Umgebung) @@ -201,7 +201,7 @@ Hierbei wird ein alternatives Minikube-ISO-Image verwendet, das sowohl rkt als a ### Treiber Plugins -Weitere Informationen zu unterstützten Treibern und zur Installation von Plugins finden Sie bei Bedarf unter [TREIBER](https://git.k8s.io/minikube/docs/drivers.md). +Weitere Informationen zu unterstützten Treibern und zur Installation von Plugins finden Sie bei Bedarf unter [TREIBER](https://minikube.sigs.k8s.io/docs/drivers/). ### Lokale Images durch erneute Verwendung des Docker-Daemon ausführen @@ -431,7 +431,7 @@ Weitere Informationen zu Minikube finden Sie im [Vorschlag](https://git.k8s.io/c * **Ziele und Nichtziele**: Die Ziele und Nichtziele des Minikube-Projekts finden Sie in unserer [Roadmap](https://git.k8s.io/minikube/docs/contributors/roadmap.md). * **Entwicklungshandbuch**: Lesen Sie [CONTRIBUTING.md](https://git.k8s.io/minikube/CONTRIBUTING.md) für einen Überblick über das Senden von Pull-Requests. * **Minikube bauen**: Anweisungen zum Erstellen/Testen von Minikube aus dem Quellcode finden Sie im [build Handbuch](https://git.k8s.io/minikube/docs/contributors/build_guide.md). -* **Neue Abhängigkeit hinzufügen**: Anweisungen zum Hinzufügen einer neuen Abhängigkeit zu Minikube finden Sie in der [Anleitung zum Hinzufügen von Abhängigkeiten](https://git.k8s.io/minikube/docs/contributors/adding_a_dependency.md). +* **Neue Abhängigkeit hinzufügen**: Anweisungen zum Hinzufügen einer neuen Abhängigkeit zu Minikube finden Sie in der [Anleitung zum Hinzufügen von Abhängigkeiten](https://minikube.sigs.k8s.io/docs/drivers/). * **Neues Addon hinzufügen**: Anweisungen zum Hinzufügen eines neuen Addons für Minikube finden Sie im [Anleitung zum Hinzufügen eines Addons](https://git.k8s.io/minikube/docs/contributors/adding_an_addon.md). * **MicroK8s**: Linux-Benutzer, die die Ausführung einer virtuellen Maschine vermeiden möchten, sollten [MicroK8s](https://microk8s.io/) als Alternative in Betracht ziehen. @@ -439,4 +439,4 @@ Weitere Informationen zu Minikube finden Sie im [Vorschlag](https://git.k8s.io/c Beiträge, Fragen und Kommentare werden begrüßt und ermutigt! Minikube-Entwickler finden Sie in [Slack](https://kubernetes.slack.com) im #minikube Kanal (Erhalten Sie [hier](http://slack.kubernetes.io/) eine Einladung). Wir haben ausserdem die [kubernetes-dev Google Groups-Mailingliste](https://groups.google.com/forum/#!forum/kubernetes-dev). Wenn Sie in der Liste posten, fügen Sie Ihrem Betreff bitte "minikube:" voran. -{{% /capture %}} + diff --git a/content/de/docs/setup/release/building-from-source.md b/content/de/docs/setup/release/building-from-source.md index 55d324574f..76879df995 100644 --- a/content/de/docs/setup/release/building-from-source.md +++ b/content/de/docs/setup/release/building-from-source.md @@ -1,19 +1,19 @@ --- title: Release erstellen -content_template: templates/concept +content_type: concept card: name: download weight: 20 title: Release erstellen --- -{{% capture overview %}} + Sie können entweder eine Version aus dem Quellcode erstellen oder eine bereits kompilierte Version herunterladen. Wenn Sie nicht vorhaben, Kubernetes selbst zu entwickeln, empfehlen wir die Verwendung eines vorkompilierten Builds der aktuellen Version, die Sie in den [Versionshinweisen](/docs/setup/release/notes/) finden. Der Kubernetes-Quellcode kann aus dem [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) repo der heruntergeladen werden. -{{% /capture %}} -{{% capture body %}} + + ## Aus dem Quellcode kompilieren @@ -29,4 +29,4 @@ make release Mehr Informationen zum Release-Prozess finden Sie im kubernetes/kubernetes [`build`](http://releases.k8s.io/{{< param "githubbranch" >}}/build/) Verzeichnis. -{{% /capture %}} + diff --git a/content/de/docs/tasks/_index.md b/content/de/docs/tasks/_index.md index 1589a013e0..bfa2a73dba 100644 --- a/content/de/docs/tasks/_index.md +++ b/content/de/docs/tasks/_index.md @@ -2,19 +2,19 @@ title: Aufgaben main_menu: true weight: 50 -content_template: templates/concept +content_type: concept --- {{< toc >}} -{{% capture overview %}} + Dieser Abschnitt der Kubernetes-Dokumentation enthält Seiten, die zeigen, wie man einzelne Aufgaben erledigt. Eine Aufgabenseite zeigt, wie man eine einzelne Aufgabe ausführt, typischerweise durch eine kurze Abfolge von Schritten. -{{% /capture %}} -{{% capture body %}} + + ## Webbenutzeroberfläche (Dashboard) @@ -76,10 +76,11 @@ Konfigurieren und planen Sie NVIDIA-GPUs für die Verwendung durch Nodes in eine Konfigurieren und verwalten Sie `HugePages` als planbare Ressource in einem Cluster. -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + Wenn Sie eine Aufgabenseite schreiben möchten, finden Sie weitere Informationen unter [Erstellen einer Pull-Anfrage für Dokumentation](/docs/home/contribute/create-pull-request/). -{{% /capture %}} + diff --git a/content/de/docs/tasks/run-application/horizontal-pod-autoscale.md b/content/de/docs/tasks/run-application/horizontal-pod-autoscale.md index 03cbb787bb..cd120285f1 100644 --- a/content/de/docs/tasks/run-application/horizontal-pod-autoscale.md +++ b/content/de/docs/tasks/run-application/horizontal-pod-autoscale.md @@ -5,11 +5,11 @@ feature: description: > Skaliere deine Anwendung mit einem einfachen Befehl, über die Benutzeroberfläche oder automatisch, basierend auf der CPU-Auslastung. -content_template: templates/concept +content_type: concept weight: 90 --- -{{% capture overview %}} + Der Horizontal Pod Autoscaler skaliert automatisch die Anzahl der Pods eines Replication Controller, Deployment oder Replikat Set basierend auf der beobachteten CPU-Auslastung (oder, mit Unterstützung von [benutzerdefinierter Metriken](https://git.k8s.io/community/contributors/design-proposals/instrumentation/custom-metrics-api.md), von der Anwendung bereitgestellten Metriken). Beachte, dass die horizontale Pod Autoskalierung nicht für Objekte gilt, die nicht skaliert werden können, z. B. DaemonSets. @@ -17,9 +17,9 @@ Der Horizontal Pod Autoscaler ist als Kubernetes API-Ressource und einem Control Die Ressource bestimmt das Verhalten des Controllers. Der Controller passt die Anzahl der Replikate eines Replication Controller oder Deployments regelmäßig an, um die beobachtete durchschnittliche CPU-Auslastung an das vom Benutzer angegebene Ziel anzupassen. -{{% /capture %}} -{{% capture body %}} + + ## Wie funktioniert der Horizontal Pod Autoscaler? @@ -161,12 +161,13 @@ Standardmäßig ruft der HorizontalPodAutoscaler Controller Metriken aus einer R * Das Flag `--horizontal-pod-autoscaler-use-rest-clients` ist auf `true` oder ungesetzt. Wird dies auf `false` gesetzt wird die Heapster basierte Autoskalierung aktiviert, welche veraltet ist. -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + * Design Dokument [Horizontal Pod Autoscaling](https://git.k8s.io/community/contributors/design-proposals/autoscaling/horizontal-pod-autoscaler.md). * kubectl autoscale Befehl: [kubectl autoscale](/docs/reference/generated/kubectl/kubectl-commands/#autoscale). * Verwenden des [Horizontal Pod Autoscaler](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/). -{{% /capture %}} + diff --git a/content/de/docs/tasks/tools/install-kubectl.md b/content/de/docs/tasks/tools/install-kubectl.md index dd9c68c2ca..d7fb7aa759 100644 --- a/content/de/docs/tasks/tools/install-kubectl.md +++ b/content/de/docs/tasks/tools/install-kubectl.md @@ -1,6 +1,6 @@ --- title: Installieren und konfigurieren von kubectl -content_template: templates/task +content_type: task weight: 10 card: name: tasks @@ -8,17 +8,18 @@ card: title: Kubectl installieren --- -{{% capture overview %}} + Verwenden Sie das Kubernetes Befehlszeilenprogramm, [kubectl](/docs/user-guide/kubectl/), um Anwendungen auf Kubernetes bereitzustellen und zu verwalten. Mit kubectl können Sie Clusterressourcen überprüfen, Komponenten erstellen, löschen und aktualisieren; Ihren neuen Cluster betrachten; und Beispielanwendungen aufrufen. -{{% /capture %}} -{{% capture prerequisites %}} + +## {{% heading "prerequisites" %}} + Sie müssen eine kubectl-Version verwenden, die innerhalb eines geringfügigen Versionsunterschieds zur Version Ihres Clusters liegt. Ein v1.2-Client sollte beispielsweise mit einem v1.1, v1.2 und v1.3-Master arbeiten. Die Verwendung der neuesten Version von kubectl verhindert unvorhergesehene Probleme. -{{% /capture %}} -{{% capture steps %}} + + ## Kubectl installieren @@ -421,9 +422,10 @@ compinit {{% /tab %}} {{< /tabs >}} -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + [Erfahren Sie, wie Sie Ihre Anwendung starten und verfügbar machen.](/docs/tasks/access-application-cluster/service-access-application-cluster/) -{{% /capture %}} + diff --git a/content/de/docs/tasks/tools/install-minikube.md b/content/de/docs/tasks/tools/install-minikube.md index c3d08bac30..318fcf25aa 100644 --- a/content/de/docs/tasks/tools/install-minikube.md +++ b/content/de/docs/tasks/tools/install-minikube.md @@ -1,28 +1,29 @@ --- title: Installation von Minikube -content_template: templates/task +content_type: task weight: 20 card: name: tasks weight: 10 --- -{{% capture overview %}} + Diese Seite zeigt Ihnen, wie Sie [Minikube](/docs/tutorials/hello-minikube) installieren, ein Programm, das einen Kubernetes-Cluster mit einem einzigen Node in einer virtuellen Maschine auf Ihrem Laptop ausführt. -{{% /capture %}} -{{% capture prerequisites %}} + +## {{% heading "prerequisites" %}} + Die VT-x- oder AMD-v-Virtualisierung muss im BIOS Ihres Computers aktiviert sein. Um dies unter Linux zu überprüfen, führen Sie Folgendes aus und vergewissern Sie sich, dass die Ausgabe nicht leer ist: ```shell egrep --color 'vmx|svm' /proc/cpuinfo ``` -{{% /capture %}} -{{% capture steps %}} + + ## Einen Hypervisor installieren @@ -106,13 +107,6 @@ Schließen Sie nach der Installation von Minikube die aktuelle CLI-Sitzung und s So installieren Sie Minikube manuell unter Windows mit [Windows Installer](https://docs.microsoft.com/en-us/windows/desktop/msi/windows-installer-portal), laden Sie die Datei [`minikube-installer.exe`](https://github.com/kubernetes/minikube/releases/latest) und führen Sie den Installer aus. -{{% /capture %}} - -{{% capture whatsnext %}} - -* [Kubernetes lokal über Minikube ausführen](/docs/setup/minikube/) - -{{% /capture %}} ## Eine bestehende Installation bereinigen @@ -130,3 +124,8 @@ Müssen Sie die Konfigurationsdateien löschen: ```shell rm -rf ~/.minikube ``` + +## {{% heading "whatsnext" %}} + + +* [Kubernetes lokal über Minikube ausführen](/docs/setup/minikube/) diff --git a/content/de/docs/tutorials/_index.md b/content/de/docs/tutorials/_index.md index 4cb042c124..1dcbbd8a63 100644 --- a/content/de/docs/tutorials/_index.md +++ b/content/de/docs/tutorials/_index.md @@ -2,19 +2,19 @@ title: Tutorials main_menu: true weight: 60 -content_template: templates/concept +content_type: concept --- -{{% capture overview %}} + Dieser Abschnitt der Kubernetes-Dokumentation enthält Tutorials. Ein Tutorial zeigt, wie Sie ein Ziel erreichen, das größer ist als eine einzelne [Aufgabe](/docs/tasks/). Ein Tutorial besteht normalerweise aus mehreren Abschnitten, die jeweils eine Abfolge von Schritten haben. Bevor Sie die einzelnen Lernprogramme durchgehen, möchten Sie möglicherweise ein Lesezeichen zur Seite mit dem [Standardisierten Glossar](/docs/reference/glossary/) setzen um später Informationen nachzuschlagen. -{{% /capture %}} -{{% capture body %}} + + ## Grundlagen @@ -64,12 +64,13 @@ Bevor Sie die einzelnen Lernprogramme durchgehen, möchten Sie möglicherweise e * [Source IP verwenden](/docs/tutorials/services/source-ip/) -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + Wenn Sie ein Tutorial schreiben möchten, lesen Sie [Seitenvorlagen verwenden](/docs/home/contribute/page-templates/) für weitere Informationen zum Typ der Tutorial-Seite und zur Tutorial-Vorlage. -{{% /capture %}} + diff --git a/content/de/docs/tutorials/hello-minikube.md b/content/de/docs/tutorials/hello-minikube.md index 4d0bc7f0f6..a1bf6dd493 100644 --- a/content/de/docs/tutorials/hello-minikube.md +++ b/content/de/docs/tutorials/hello-minikube.md @@ -1,6 +1,6 @@ --- title: Hallo Minikube -content_template: templates/tutorial +content_type: tutorial weight: 5 menu: main: @@ -13,7 +13,7 @@ card: weight: 10 --- -{{% capture overview %}} + Dieses Tutorial zeigt Ihnen, wie Sie eine einfache "Hallo Welt" Node.js-Anwendung auf Kubernetes mit [Minikube](/docs/getting-started-guides/minikube) und Katacoda ausführen. Katacoda bietet eine kostenlose Kubernetes-Umgebung im Browser. @@ -22,17 +22,19 @@ Katacoda bietet eine kostenlose Kubernetes-Umgebung im Browser. Sie können dieses Tutorial auch verwenden, wenn Sie [Minikube lokal](/docs/tasks/tools/install-minikube/) installiert haben. {{< /note >}} -{{% /capture %}} -{{% capture objectives %}} + +## {{% heading "objectives" %}} + * Stellen Sie eine Hallo-Welt-Anwendung für Minikube bereit. * Führen Sie die App aus. * Betrachten Sie die Log Dateien. -{{% /capture %}} -{{% capture prerequisites %}} + +## {{% heading "prerequisites" %}} + Dieses Lernprogramm enthält ein aus den folgenden Dateien erstelltes Container-Image: @@ -42,9 +44,9 @@ Dieses Lernprogramm enthält ein aus den folgenden Dateien erstelltes Container- Weitere Informationen zum `docker build` Befehl, lesen Sie die [Docker Dokumentation](https://docs.docker.com/engine/reference/commandline/build/). -{{% /capture %}} -{{% capture lessoncontent %}} + + ## Erstellen Sie einen Minikube-Cluster @@ -260,12 +262,13 @@ Löschen Sie optional die Minikube-VM: minikube delete ``` -{{% /capture %}} -{{% capture whatsnext %}} + +## {{% heading "whatsnext" %}} + * Lernen Sie mehr über [Bereitstellungsobjekte](/docs/concepts/workloads/controllers/deployment/). * Lernen Sie mehr über [Anwendungen bereitstellen](/docs/user-guide/deploying-applications/). * Lernen Sie mehr über [Serviceobjekte](/docs/concepts/services-networking/service/). -{{% /capture %}} + diff --git a/content/en/_index.html b/content/en/_index.html index f389669d03..97e02aa259 100644 --- a/content/en/_index.html +++ b/content/en/_index.html @@ -3,7 +3,6 @@ title: "Production-Grade Container Orchestration" abstract: "Automated container deployment, scaling, and management" cid: home --- -{{< deprecationwarning >}} {{< blocks/section id="oceanNodes" >}} {{% blocks/feature image="flower" %}} diff --git a/content/en/blog/_posts/2017-01-00-Running-Mongodb-On-Kubernetes-With-Statefulsets.md b/content/en/blog/_posts/2017-01-00-Running-Mongodb-On-Kubernetes-With-Statefulsets.md index f07860212a..6682d54df1 100644 --- a/content/en/blog/_posts/2017-01-00-Running-Mongodb-On-Kubernetes-With-Statefulsets.md +++ b/content/en/blog/_posts/2017-01-00-Running-Mongodb-On-Kubernetes-With-Statefulsets.md @@ -4,70 +4,49 @@ date: 2017-01-30 slug: running-mongodb-on-kubernetes-with-statefulsets url: /blog/2017/01/Running-Mongodb-On-Kubernetes-With-Statefulsets --- -_Editor's note: Today’s post is by Sandeep Dinesh, Developer Advocate, Google Cloud Platform, showing how to run a database in a container._ +_Editor's note: Today’s post is by Sandeep Dinesh, Developer Advocate, Google Cloud Platform, showing how to run a database in a container._ +{{% warning %}} +This post is several years old. The code examples need changes to work on a current Kubernetes cluster. +{{% /warning %}} -Conventional wisdom says you can’t run a database in a container. “Containers are stateless!” they say, and “databases are pointless without state!” +Conventional wisdom says you can’t run a database in a container. “Containers are stateless!” they say, and “databases are pointless without state!” Of course, this is not true at all. At Google, everything runs in a container, including databases. You just need the right tools. [Kubernetes 1.5](https://kubernetes.io/blog/2016/12/kubernetes-1-5-supporting-production-workloads/) includes the new [StatefulSet](/docs/concepts/abstractions/controllers/statefulsets/) API object (in previous versions, StatefulSet was known as PetSet). With StatefulSets, Kubernetes makes it much easier to run stateful workloads such as databases. -If you’ve followed my previous posts, you know how to create a [MEAN Stack app with Docker](http://blog.sandeepdinesh.com/2015/07/running-mean-web-application-in-docker.html), then [migrate it to Kubernetes](https://medium.com/google-cloud/running-a-mean-stack-on-google-cloud-platform-with-kubernetes-149ca81c2b5d) to provide easier management and reliability, and [create a MongoDB replica set](https://medium.com/google-cloud/mongodb-replica-sets-with-kubernetes-d96606bd9474) to provide redundancy and high availability. +If you’ve followed my previous posts, you know how to create a [MEAN Stack app with Docker](http://blog.sandeepdinesh.com/2015/07/running-mean-web-application-in-docker.html), then [migrate it to Kubernetes](https://medium.com/google-cloud/running-a-mean-stack-on-google-cloud-platform-with-kubernetes-149ca81c2b5d) to provide easier management and reliability, and [create a MongoDB replica set](https://medium.com/google-cloud/mongodb-replica-sets-with-kubernetes-d96606bd9474) to provide redundancy and high availability. -While the replica set in my previous blog post worked, there were some annoying steps that you needed to follow. You had to manually create a disk, a ReplicationController, and a service for each replica. Scaling the set up and down meant managing all of these resources manually, which is an opportunity for error, and would put your stateful application at risk In the previous example, we created a Makefile to ease the management of these resources, but it would have been great if Kubernetes could just take care of all of this for us. - -With StatefulSets, these headaches finally go away. You can create and manage your MongoDB replica set natively in Kubernetes, without the need for scripts and Makefiles. Let’s take a look how. - -_Note: StatefulSets are currently a beta resource. The [sidecar container](https://github.com/cvallance/mongo-k8s-sidecar) used for auto-configuration is also unsupported._ +While the replica set in my previous blog post worked, there were some annoying steps that you needed to follow. You had to manually create a disk, a ReplicationController, and a service for each replica. Scaling the set up and down meant managing all of these resources manually, which is an opportunity for error, and would put your stateful application at risk In the previous example, we created a Makefile to ease the management of these resources, but it would have been great if Kubernetes could just take care of all of this for us. +With StatefulSets, these headaches finally go away. You can create and manage your MongoDB replica set natively in Kubernetes, without the need for scripts and Makefiles. Let’s take a look how. +_Note: StatefulSets are currently a beta resource. The [sidecar container](https://github.com/cvallance/mongo-k8s-sidecar) used for auto-configuration is also unsupported._ **Prerequisites and Setup** - - Before we get started, you’ll need a Kubernetes 1.5+ and the [Kubernetes command line tool](/docs/user-guide/prereqs/). If you want to follow along with this tutorial and use Google Cloud Platform, you also need the [Google Cloud SDK](http://cloud.google.com/sdk). - - Once you have a [Google Cloud project created](https://console.cloud.google.com/projectcreate) and have your Google Cloud SDK setup (hint: gcloud init), we can create our cluster. - - -To create a Kubernetes 1.5 cluster, run the following command: - +To create a Kubernetes 1.5 cluster, run the following command: ``` gcloud container clusters create "test-cluster" ``` - - -This will make a three node Kubernetes cluster. Feel free to [customize the command](https://cloud.google.com/sdk/gcloud/reference/container/clusters/create) as you see fit. +This will make a three node Kubernetes cluster. Feel free to [customize the command](https://cloud.google.com/sdk/gcloud/reference/container/clusters/create) as you see fit. Then, authenticate into the cluster: - - ``` gcloud container clusters get-credentials test-cluster ``` - - - - - - **Setting up the MongoDB replica set** - - To set up the MongoDB replica set, you need three things: A [StorageClass](/docs/user-guide/persistent-volumes/#storageclasses), a [Headless Service](/docs/user-guide/services/#headless-services), and a [StatefulSet](/docs/concepts/abstractions/controllers/statefulsets/). - - -I’ve created the configuration files for these already, and you can clone the example from GitHub: - +I’ve created the configuration files for these already, and you can clone the example from GitHub: ``` git clone https://github.com/thesandlord/mongo-k8s-sidecar.git @@ -75,10 +54,7 @@ git clone https://github.com/thesandlord/mongo-k8s-sidecar.git cd /mongo-k8s-sidecar/example/StatefulSet/ ``` - - -To create the MongoDB replica set, run these two commands: - +To create the MongoDB replica set, run these two commands: ``` kubectl apply -f googlecloud\_ssd.yaml @@ -86,341 +62,202 @@ kubectl apply -f googlecloud\_ssd.yaml kubectl apply -f mongo-statefulset.yaml ``` - - That's it! With these two commands, you have launched all the components required to run an highly available and redundant MongoDB replica set. - - At an high level, it looks something like this: - - ![](https://lh4.googleusercontent.com/ohALxLD4Ugj5FCwWqgqZ4xP9al4lTgrPDc9HsgPWYRZRz_buuYK6LKSC7A5n98DdOO-Po3Zq77Yt43-QhTWdIaXqltHI7PX0zMXAXbpiilYgdowGZapG0lJ9lgubwBj1CwNHHtXA) - - Let’s examine each piece in more detail. - - **StorageClass** - - The storage class tells Kubernetes what kind of storage to use for the database nodes. You can set up many different types of StorageClasses in a ton of different environments. For example, if you run Kubernetes in your own datacenter, you can use [GlusterFS](https://www.gluster.org/). On GCP, your [storage choices](https://cloud.google.com/compute/docs/disks/) are SSDs and hard disks. There are currently drivers for [AWS](/docs/user-guide/persistent-volumes/#aws), [Azure](/docs/user-guide/persistent-volumes/#azure-disk), [Google Cloud](/docs/user-guide/persistent-volumes/#gce), [GlusterFS](/docs/user-guide/persistent-volumes/#glusterfs), [OpenStack Cinder](/docs/user-guide/persistent-volumes/#openstack-cinder), [vSphere](/docs/user-guide/persistent-volumes/#vsphere), [Ceph RBD](/docs/user-guide/persistent-volumes/#ceph-rbd), and [Quobyte](/docs/user-guide/persistent-volumes/#quobyte). +The configuration for the StorageClass looks like this: - -The configuration for the StorageClass looks like this: - - -``` -kind: StorageClass -apiVersion: storage.k8s.io/v1beta1 -metadata: - name: fast -provisioner: kubernetes.io/gce-pd -parameters: +```yaml +kind: StorageClass +apiVersion: storage.k8s.io/v1beta1 +metadata: + name: fast +provisioner: kubernetes.io/gce-pd +parameters: type: pd-ssd ``` - - This configuration creates a new StorageClass called “fast” that is backed by SSD volumes. The StatefulSet can now request a volume, and the StorageClass will automatically create it! - - -Deploy this StorageClass: - +Deploy this StorageClass: ``` kubectl apply -f googlecloud\_ssd.yaml ``` - - **Headless Service** - - Now you have created the Storage Class, you need to make a Headless Service. These are just like normal Kubernetes Services, except they don’t do any load balancing for you. When combined with StatefulSets, they can give you unique DNS addresses that let you directly access the pods! This is perfect for creating MongoDB replica sets, because our app needs to connect to all of the MongoDB nodes individually. +The configuration for the Headless Service looks like this: - -The configuration for the Headless Service looks like this: - - -``` +```yaml apiVersion: v1 - kind: Service - metadata: - - name: mongo - - labels: - - name: mongo - + name: mongo + labels: + name: mongo spec: - - ports: - - - port: 27017 - - targetPort: 27017 - - clusterIP: None - - selector: - - role: mongo + ports: + - port: 27017 + targetPort: 27017 + clusterIP: None + selector: + role: mongo ``` - - You can tell this is a Headless Service because the clusterIP is set to “None.” Other than that, it looks exactly the same as any normal Kubernetes Service. - - **StatefulSet** - - The pièce de résistance. The StatefulSet actually runs MongoDB and orchestrates everything together. StatefulSets differ from Kubernetes [ReplicaSets](/docs/user-guide/replicasets/) (not to be confused with MongoDB replica sets!) in certain ways that makes them more suited for stateful applications. Unlike Kubernetes ReplicaSets, pods created under a StatefulSet have a few unique attributes. The name of the pod is not random, instead each pod gets an ordinal name. Combined with the Headless Service, this allows pods to have stable identification. In addition, pods are created one at a time instead of all at once, which can help when bootstrapping a stateful system. You can read more about StatefulSets in the [documentation](/docs/concepts/abstractions/controllers/statefulsets/). - - Just like before, [this “sidecar” container](https://github.com/cvallance/mongo-k8s-sidecar) will configure the MongoDB replica set automatically. A “sidecar” is a helper container which helps the main container do its work. +The configuration for the StatefulSet looks like this: - -The configuration for the StatefulSet looks like this: - - -``` +```yaml apiVersion: apps/v1beta1 - kind: StatefulSet - metadata: - - name: mongo - + name: mongo spec: - - serviceName: "mongo" - - replicas: 3 - - template: - - metadata: - - labels: - - role: mongo - - environment: test - - spec: - - terminationGracePeriodSeconds: 10 - - containers: - - - name: mongo - - image: mongo - - command: - - - mongod - - - "--replSet" - - - rs0 - - - "--smallfiles" - - - "--noprealloc" - - ports: - - - containerPort: 27017 - - volumeMounts: - - - name: mongo-persistent-storage - - mountPath: /data/db - - - name: mongo-sidecar - - image: cvallance/mongo-k8s-sidecar - - env: - - - name: MONGO\_SIDECAR\_POD\_LABELS - - value: "role=mongo,environment=test" - - volumeClaimTemplates: - - - metadata: - - name: mongo-persistent-storage - - annotations: - - volume.beta.kubernetes.io/storage-class: "fast" - - spec: - - accessModes: ["ReadWriteOnce"] - - resources: - - requests: - - storage: 100Gi + selector: + matchLabels: + role: mongo + environment: test + serviceName: "mongo" + replicas: 3 + template: + metadata: + labels: + role: mongo + environment: test + spec: + terminationGracePeriodSeconds: 10 + containers: + - name: mongo + image: mongo + command: + - mongod + - "--replSet" + - rs0 + - "--smallfiles" + - "--noprealloc" + ports: + - containerPort: 27017 + volumeMounts: + - name: mongo-persistent-storage + mountPath: /data/db + - name: mongo-sidecar + image: cvallance/mongo-k8s-sidecar + env: + - name: MONGO_SIDECAR_POD_LABELS + value: "role=mongo,environment=test" + volumeClaimTemplates: + - metadata: + name: mongo-persistent-storage + spec: + storageClassName: "fast" + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: 100Gi ``` - - It’s a little long, but fairly straightforward. - - The first second describes the StatefulSet object. Then, we move into the Metadata section, where you can specify labels and the number of replicas. +Next comes the pod spec. The terminationGracePeriodSeconds is used to gracefully shutdown the pod when you scale down the number of replicas, which is important for databases! Then the configurations for the two containers is shown. The first one runs MongoDB with command line flags that configure the replica set name. It also mounts the persistent storage volume to /data/db, the location where MongoDB saves its data. The second container runs the sidecar. - -Next comes the pod spec. The terminationGracePeriodSeconds is used to gracefully shutdown the pod when you scale down the number of replicas, which is important for databases! Then the configurations for the two containers is shown. The first one runs MongoDB with command line flags that configure the replica set name. It also mounts the persistent storage volume to /data/db, the location where MongoDB saves its data. The second container runs the sidecar. - - - -Finally, there is the volumeClaimTemplates. This is what talks to the StorageClass we created before to provision the volume. It will provision a 100 GB disk for each MongoDB replica. - - +Finally, there is the volumeClaimTemplates. This is what talks to the StorageClass we created before to provision the volume. It will provision a 100 GB disk for each MongoDB replica. **Using the MongoDB replica set** - - -At this point, you should have three pods created in your cluster. These correspond to the three nodes in your MongoDB replica set. You can see them with this command: - +At this point, you should have three pods created in your cluster. These correspond to the three nodes in your MongoDB replica set. You can see them with this command: ``` kubectl get pods NAME READY STATUS RESTARTS AGE - mongo-0 2/2 Running 0 3m - mongo-1 2/2 Running 0 3m - mongo-2 2/2 Running 0 3m ``` +Each pod in a StatefulSet backed by a Headless Service will have a stable DNS name. The template follows this format: \.\ - -Each pod in a StatefulSet backed by a Headless Service will have a stable DNS name. The template follows this format: \.\ - -This means the DNS names for the MongoDB replica set are: - - +This means the DNS names for the MongoDB replica set are: ``` mongo-0.mongo - mongo-1.mongo - mongo-2.mongo ``` +You can use these names directly in the [connection string URI](http://docs.mongodb.com/manual/reference/connection-string) of your app. - -You can use these names directly in the [connection string URI](http://docs.mongodb.com/manual/reference/connection-string) of your app. - -In this case, the connection string URI would be: - +In this case, the connection string URI would be: ``` -“mongodb://mongo-0.mongo,mongo-1.mongo,mongo-2.mongo:27017/dbname\_?” +mongodb://mongo-0.mongo,mongo-1.mongo,mongo-2.mongo:27017/dbname\_? ``` +That’s it! -That’s it! - -**Scaling the MongoDB replica set** - -A huge advantage of StatefulSets is that you can scale them just like Kubernetes ReplicaSets. If you want 5 MongoDB Nodes instead of 3, just run the scale command: - +**Scaling the MongoDB replica set** +A huge advantage of StatefulSets is that you can scale them just like Kubernetes ReplicaSets. If you want 5 MongoDB Nodes instead of 3, just run the scale command: ``` kubectl scale --replicas=5 statefulset mongo ``` +The sidecar container will automatically configure the new MongoDB nodes to join the replica set. -The sidecar container will automatically configure the new MongoDB nodes to join the replica set. +Include the two new nodes (mongo-3.mongo & mongo-4.mongo) in your connection string URI and you are good to go. Too easy! -Include the two new nodes (mongo-3.mongo & mongo-4.mongo) in your connection string URI and you are good to go. Too easy! +**Cleaning Up** -**Cleaning Up** - -To clean up the deployed resources, delete the StatefulSet, Headless Service, and the provisioned volumes. - -Delete the StatefulSet: +To clean up the deployed resources, delete the StatefulSet, Headless Service, and the provisioned volumes. +Delete the StatefulSet: ``` kubectl delete statefulset mongo ``` - - -Delete the Service: - +Delete the Service: ``` kubectl delete svc mongo ``` - - -Delete the Volumes: - - - +Delete the Volumes: ``` kubectl delete pvc -l role=mongo ``` - - - -Finally, you can delete the test cluster: - - - +Finally, you can delete the test cluster: ``` gcloud container clusters delete "test-cluster" ``` - - Happy Hacking! - - For more cool Kubernetes and Container blog posts, follow me on [Twitter](https://twitter.com/sandeepdinesh) and [Medium](https://medium.com/@SandeepDinesh). - - _--Sandeep Dinesh, Developer Advocate, Google Cloud Platform._ diff --git a/content/en/blog/_posts/2018-03-26-kubernetes-1-10-stabilizing-storage-security-networking.md b/content/en/blog/_posts/2018-03-26-kubernetes-1-10-stabilizing-storage-security-networking.md index 2a84097979..922ec9f706 100644 --- a/content/en/blog/_posts/2018-03-26-kubernetes-1-10-stabilizing-storage-security-networking.md +++ b/content/en/blog/_posts/2018-03-26-kubernetes-1-10-stabilizing-storage-security-networking.md @@ -76,7 +76,7 @@ Each Special Interest Group (SIG) within the community continues to deliver the most-requested enhancements, fixes, and functionality for their respective specialty areas. For a complete list of inclusions by SIG, please visit the [release -notes](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.10.md#110-release-notes). +notes](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.10.md#110-release-notes). ## Availability diff --git a/content/en/blog/_posts/2020-06-15-better-docs-ux-with-docsy.md b/content/en/blog/_posts/2020-06-15-better-docs-ux-with-docsy.md new file mode 100644 index 0000000000..6fe469927e --- /dev/null +++ b/content/en/blog/_posts/2020-06-15-better-docs-ux-with-docsy.md @@ -0,0 +1,25 @@ +--- +layout: blog +title: A Better Docs UX With Docsy +date: 2020-06-15 +slug: better-docs-ux-with-docsy +url: /blog/2020/06/better-docs-ux-with-docsy +--- + +**Author:** Zach Corleissen, Cloud Native Computing Foundation + +*Editor's note: Zach is one of the chairs for the Kubernetes documentation special interest group (SIG Docs).* + +I'm pleased to announce that the [Kubernetes website](https://kubernetes.io) now features the [Docsy Hugo theme](https://docsy.dev). + +The Docsy theme improves the site's organization and navigability, and opens a path to improved API references. After over 4 years with few meaningful UX improvements, Docsy implements some best practices for technical content. The theme makes the Kubernetes site easier to read and makes individual pages easier to navigate. It gives the site a much-needed facelift. + +For example: adding a right-hand rail for navigating topics on the page. No more scrolling up to navigate! + +The theme opens a path for future improvements to the website. The Docsy functionality I'm most excited about is the theme's [`swaggerui` shortcode](https://www.docsy.dev/docs/adding-content/shortcodes/#swaggerui), which provides native support for generating API references from an OpenAPI spec. The CNCF is partnering with [Google Season of Docs](https://developers.google.com/season-of-docs) (GSoD) for staffing to make better API references a reality in Q4 this year. We're hopeful to be chosen, and we're looking forward to Google's list of announced projects on August 16th. Better API references have been a personal goal since I first started working with SIG Docs in 2017. It's exciting to see the goal within reach. + +One of SIG Docs' tech leads, [Karen Bradshaw](https://github.com/kbhawkey) did a lot of heavy lifting to fix a wide range of site compatibility issues, including a fix to the last of our [legacy pieces](https://github.com/kubernetes/website/pull/21359) when we [migrated from Jekyll to Hugo](2018-05-05-hugo-migration/) in 2018. Our other tech leads, [Tim Bannister](https://github.com/sftim) and [Taylor Dolezal](https://github.com/onlydole) provided extensive reviews. + +Thanks also to [Björn-Erik Pedersen](https://bep.is/), who provided invaluable advice about how to navigate a Hugo upgrade beyond [version 0.60.0](https://gohugo.io/news/0.60.0-relnotes/). + +The CNCF contracted with [Gearbox](https://gearboxbuilt.com/) in Victoria, BC to apply the theme to the site. Thanks to Aidan, Troy, and the rest of the team for all their work! \ No newline at end of file diff --git a/content/en/community/_index.html b/content/en/community/_index.html index 0f6fb9bc04..e1ebb9e9cb 100644 --- a/content/en/community/_index.html +++ b/content/en/community/_index.html @@ -17,7 +17,7 @@ cid: community
-