From 1955629f4221f86f0463322da047998e02a19b92 Mon Sep 17 00:00:00 2001 From: chenxuc Date: Sat, 10 Jul 2021 22:01:56 +0800 Subject: [PATCH 001/228] clarify rollout behavior in deployment --- content/en/docs/concepts/workloads/controllers/deployment.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/en/docs/concepts/workloads/controllers/deployment.md b/content/en/docs/concepts/workloads/controllers/deployment.md index 22b95255c5..beea0f19fb 100644 --- a/content/en/docs/concepts/workloads/controllers/deployment.md +++ b/content/en/docs/concepts/workloads/controllers/deployment.md @@ -709,6 +709,7 @@ You can pause a Deployment before triggering one or more updates and then resume apply multiple fixes in between pausing and resuming without triggering unnecessary rollouts. * For example, with a Deployment that was created: + Get the Deployment details: ```shell kubectl get deploy @@ -759,7 +760,7 @@ apply multiple fixes in between pausing and resuming without triggering unnecess REVISION CHANGE-CAUSE 1 ``` -* Get the rollout status to ensure that the Deployment is updated successfully: +* Get the rollout status to verify that the existing ReplicaSet has not changed: ```shell kubectl get rs ``` From ef94676e4e910cab90499ae0dbff48a18eb50ba1 Mon Sep 17 00:00:00 2001 From: xeathen Date: Sat, 17 Jul 2021 15:59:31 +0800 Subject: [PATCH 002/228] [zh] fix typo of expose-intro.html --- .../docs/tutorials/kubernetes-basics/expose/expose-intro.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/zh/docs/tutorials/kubernetes-basics/expose/expose-intro.html b/content/zh/docs/tutorials/kubernetes-basics/expose/expose-intro.html index 307260631e..2c6fc39bfa 100644 --- a/content/zh/docs/tutorials/kubernetes-basics/expose/expose-intro.html +++ b/content/zh/docs/tutorials/kubernetes-basics/expose/expose-intro.html @@ -35,7 +35,7 @@ weight: 10

Kubernetes Service 总览

-

Kubernetes Pod 是转瞬即逝的。 Pod 实际上拥有 生命周期。 当一个工作 Node 挂掉后, 在 Node 上运行的 Pod 也会消亡。 ReplicaSet 会自动地通过创建新的 Pod 驱动集群回到目标状态,以保证应用程序正常运行。 换一个例子,考虑一个具有3个副本数的用作图像处理的后端程序。这些副本是可替换的; 前端系统不应该关心后端副本,即使 Pod 丢失或重新创建。也就是说,Kubernetes 集群中的每个 Pod (即使是在同一个 Node 上的 Pod )都有一个惟一的 IP 地址,因此需要一种方法自动协调 Pod 之间的变更,以便应用程序保持运行。

+

Kubernetes Pod 是转瞬即逝的。 Pod 实际上拥有 生命周期。 当一个工作 Node 挂掉后, 在 Node 上运行的 Pod 也会消亡。 ReplicaSet 会自动地通过创建新的 Pod 驱动集群回到目标状态,以保证应用程序正常运行。 换一个例子,考虑一个具有3个副本数的用作图像处理的后端程序。这些副本是可替换的; 前端系统不应该关心后端副本,即使 Pod 丢失或重新创建。也就是说,Kubernetes 集群中的每个 Pod (即使是在同一个 Node 上的 Pod )都有一个唯一的 IP 地址,因此需要一种方法自动协调 Pod 之间的变更,以便应用程序保持运行。

Kubernetes 中的服务(Service)是一种抽象概念,它定义了 Pod 的逻辑集和访问 Pod 的协议。Service 使从属 Pod 之间的松耦合成为可能。 和其他 Kubernetes 对象一样, Service 用 YAML (更推荐) 或者 JSON 来定义. Service 下的一组 Pod 通常由 LabelSelector (请参阅下面的说明为什么您可能想要一个 spec 中不包含selector的服务)来标记。

From 61ab2f72321eb46de253587a1148895f8d162626 Mon Sep 17 00:00:00 2001 From: MarcosN Date: Wed, 8 Sep 2021 16:02:10 -0300 Subject: [PATCH 003/228] feat: adding pt-br translation for install kubeadm page --- .../tools/kubeadm/install-kubeadm.md | 291 ++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md diff --git a/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md new file mode 100644 index 0000000000..981b4c5aac --- /dev/null +++ b/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md @@ -0,0 +1,291 @@ +--- +title: Instalando a ferramenta kubeadm +content_type: task +weight: 10 +--- + + + +Essa página mostra o processo de instalação do conjunto de ferramentas `kubeadm`. +Para mais informações sobre como criar um cluster com o kubeadm após efetuar a instalação, veja a página [Utilizando kubeadm para criar um cluster](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). + + +## {{% heading "prerequisites" %}} + +* Uma máquina com sistema operacional Linux compatível. O projeto Kubernetes provê instruções para distribuições Linux baseadas em Debian e Red Hat, bem como para distribuições sem um gerenciador de pacotes. +* 2 GB ou mais de RAM por máquina (menos que isso deixará pouca memória para as suas aplicações). +* 2 CPUs ou mais. +* Conexão de rede entre todas as máquinas no cluster. Seja essa pública ou privada. +* Nome da máquina na rede, endereço MAC e producy_uuid únicos para cada nó. Mais detalhes podem ser lidos [aqui](#veficiar-endereco-mac). +* Portas específicas abertas nas suas máquinas. Você poderá ler quais são [aqui](#verificar-portas-necessarias). +* Swap desabilitado. Você *precisa* desabilitar a funcionalidade de swap para que o kubelet funcione de forma correta. + + + +## Verificando se o endereço MAC e o product_uiid são únicos para cada nó {#veficiar-endereco-mac} + +* Você pode verificar o endereço MAC da interface de rede utilizando o comando `ip link` ou o comando `ipconfig -a`. +* O product_uuid pode ser verificado utilizando o comando `sudo cat /sys/class/dmi/I'd/product_uuid`. + +É provável que dispositivos físicos possuam endereços únicos. No entanto, é possível que algumas máquinas virtuais possuam endereços iguais. O Kubernetes utiliza esses valores para identificar unicamente os nós em um cluster. Se esses valores não forem únicos para cada nó, o processo de instalação pode [falhar](https://github.com/kubernetes/kubeadm/issues/31). + +## Verificando os adaptadores de rede + +Se você possuir mais de um adaptador de rede, e seus componentes Kubernetes não forem acessíveis através da rota padrão, recomendamos adicionar o IP das rotas para que os endereços do cluster Kubernetes passem pelo adaptador correto. + +## Fazendo com que o iptables enxergue o tráfego agregado + +Se assegure de que o módulo `br_netfilter` está carregado. Isso pode ser feito executando o comando `lsmod | grep br_netfilter`. Para carrega-lo explicitamente execute `sudo modprobe br_netfilter`. + +Você também deve se assegurar de que o valor da configuração `net.bridge.bridge-nf-call-iptables` no seu `sysctl` está com o valor 1. Um requerimento para que as iptables dos seus nós enxerguem o tráfego agregado corretamente. Como no exemplo abaixo: + +```bash +cat <}}. + +{{< tabs name="container_runtime" >}} +{{% tab name="Nós Linux" %}} + +Por padrão, o Kubernetes utiliza a {{< glossary_tooltip term_id="cri" text="interface do agente de execução">}} (CRI) para interagir com o seu agente de execução de contêiner escolhido. + +Se você não especificar nenhum agente de execução, o kubeadm irá tentar identifica-lo automaticamente através de uma lista dos sockets Unix mais utilizados. A tabela a seguir lista os agentes de execução e os caminhos dos sockets a eles associados. + +{{< table caption = "Agentes de execução e seus caminhos de socket" >}} +| Agente de execução | Caminho do socket Unix | +|------------|-----------------------------------| +| Docker | `/var/run/dockershim.sock` | +| containerd | `/run/containerd/containerd.sock` | +| CRI-O | `/var/run/crio/crio.sock` | +{{< /table >}} + +
+Se tanto o Docker quanto o containerd forem detectados no sistema, o Docker terá precedência. Isso acontece porque o Docker, desde a versão 18.09, já incluí o containerd e ambos são detectaveis mesmo que você só tenha instalado o Docker. Se outros dois ou mais agentes de execução forem detectados, o kubeadm é encerrado com um erro. + +O kubelet se integra com o Docker através da implementação CRI `dockershim` já inclusa. + +Veja [agente de execução](/docs/setup/production-environment/container-runtimes/) +para mais detalhes. +{{% /tab %}} +{{% tab name="outros sistemas operacionais" %}} +Por padrão, o kubeadm utiliza o {{< glossary_tooltip term_id="docker" >}} como agente de execução. +O kubelet se integra com o Docker através da implementação CRI `dockershim` já inclusa. + +Veja [agente de execução](/docs/setup/production-environment/container-runtimes/) +para mais detalhes. +{{% /tab %}} +{{< /tabs >}} + + +## Instalando o kubeadm, kubelet e o kubectl + +Você instalará esses pacotes em todas as suas máquinas: + +* `kubeadm`: o comando para iniciar o cluster. + +* `kubelet`: o componente que executa em todas as máquinas no seu cluster e cuida de coisas como a inicialização de pods e contêineres. + +* `kubectl`: a ferramenta de linha de comando para interação com o cluster. + +O kubeadm **não irá** instalar ou gerenciar o `kubelet` ou o `kubectl` para você, então você +precisará garantir que as versões deles são as mesmas da versão da camada de gerenciamento do Kubernetes +que você quer que o kubeadm instale. Caso isso não seja feito, surge o risco de que uma diferença nas versões +leve a bugs e comportamentos inesperados. Dito isso, _uma_ diferença de menor grandeza nas versões entre o kubelet e a +camada de gerenciamento é suportada, mas a versão do kubelet nunca poderá ser superior a versão do servidor da API. +Por exemplo, um kubelet com a versão 1.7.0 será totalmente compatível com a versão 1.8.0 do servidor da API, mas o contrário não será verdadeiro. + +Para mais informações acerca da instalação do `kubectl`, veja [Instale e configure o kubectl](/docs/tasks/tools/). + +{{< warning >}} +Essas instruções removem todos os pacotes Kubernetes de quaisquer atualizações de sistema. +Isso ocorre porque o kubeadm e o Kubernetes requerem alguns [cuidados especiais para serem atualizados](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/). +{{}} + +para mais detalhes da compatibilidade entre as versões, veja: + +* [Políticas de versão e compatibilidade entre versões](/docs/setup/release/version-skew-policy/) do Kubernetes. +* [Compatibilidade entre versões](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#version-skew-policy) do Kubeadm. + +{{< tabs name="k8s_install" >}} +{{% tab name="Distribuições Debian" %}} + +1. Atualize o índice de pacotes `apt` e instale os pacotes necessários para utilizar o repositório `apt` do Kubernetes: + + ```shell + sudo apt-get update + sudo apt-get install -y apt-transport-https ca-certificates curl + ``` + +2. Faça o download da chave de assinatura pública da Google Cloud: + + ```shell + sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg + ``` + +3. Adicione o repositório `apt` do Kubernetes: + + ```shell + echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list + ``` + +4. Atualize o índice de pacotes `apt`, instale o kubelet, o kubeadm e o kubectl, e fixe suas versões: + + ```shell + sudo apt-get update + sudo apt-get install -y kubelet kubeadm kubectl + sudo apt-mark hold kubelet kubeadm kubectl + ``` + +{{% /tab %}} +{{% tab name="Distribuições Red Hat" %}} +```bash +cat <}} +A variável `DOWNLOAD_DIR` precisa estar configurada para um diretório que permita escrita. +Se você estiver utilizando o Flatcar Container Linux, veja `DOWNLOAD_DIR=/opt/bin`. +{{< /note >}} + +```bash +DOWNLOAD_DIR=/usr/local/bin +sudo mkdir -p $DOWNLOAD_DIR +``` + +Instale o crictl (utilizado pelo kubeadm e pela Interface do Agente de execução do Kubelet (CRI)) + +```bash +CRICTL_VERSION="v1.17.0" +ARCH="amd64" +curl -L "https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-${ARCH}.tar.gz" | sudo tar -C $DOWNLOAD_DIR -xz +``` + +Instale o `kubeadm`, o `kubelet`, e o `kubectl` e adicione o serviço systemd `kubelet`: + +```bash +RELEASE="$(curl -sSL https://dl.k8s.io/release/stable.txt)" +ARCH="amd64" +cd $DOWNLOAD_DIR +sudo curl -L --remote-name-all https://storage.googleapis.com/kubernetes-release/release/${RELEASE}/bin/linux/${ARCH}/{kubeadm,kubelet,kubectl} +sudo chmod +x {kubeadm,kubelet,kubectl} + +RELEASE_VERSION="v0.4.0" +curl -sSL "https://raw.githubusercontent.com/kubernetes/release/${RELEASE_VERSION}/cmd/kubepkg/templates/latest/deb/kubelet/lib/systemd/system/kubelet.service" | sed "s:/usr/bin:${DOWNLOAD_DIR}:g" | sudo tee /etc/systemd/system/kubelet.service +sudo mkdir -p /etc/systemd/system/kubelet.service.d +curl -sSL "https://raw.githubusercontent.com/kubernetes/release/${RELEASE_VERSION}/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf" | sed "s:/usr/bin:${DOWNLOAD_DIR}:g" | sudo tee /etc/systemd/system/kubelet.service.d/10-kubeadm.conf +``` + +Habilite e inicie o `kubelet`: + +```bash +systemctl enable --now kubelet +``` + +{{< note >}} +A distribuição Linux Flatcar Container instala o diretório `/usr` como um sistema de arquivos apenas para leitura. +Antes de inicializar o seu cluster, você precisa de alguns passos adicionais para configurar um diretório com escrita. +Veja o [Guia de solução de problemas do Kubeadm](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#usr-mounted-read-only/) para aprender como configurar um diretório com escrita. +{{< /note >}} +{{% /tab %}} +{{< /tabs >}} + +O kubelet agora ficará reiniciando de alguns em alguns segundos, enquanto espera por instruções vindas do kubeadm. + +## Configurando um driver cgroup + +Tanto o agente de execução quanto o kubelet possuem uma propriedade chamada +["driver cgroup"](/docs/setup/production-environment/container-runtimes/), que é importante +para o gerenciamento dos cgroups em máquinas Linux. + +{{< warning >}} +A compatibilidade entre os drivers cgroup e o agente de execução é necessária. Sem ela o processo do kubelet irá falhar. + +Veja [configurando um driver cgroup](/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/) para mais detalhes. +{{< /warning >}} + +## Solucionando problemas + +Se você encontrar problemas com o kubeadm, por favor consulte a nossa [documentação de solução de problemas](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/). + +## {{% heading "whatsnext" %}} + +* [Utilizando o kubeadm para criar um cluster](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). From 7d2a184556ac03d6891ba528f142a79b8e15b8f8 Mon Sep 17 00:00:00 2001 From: Marcos Nery Date: Wed, 8 Sep 2021 18:26:05 -0300 Subject: [PATCH 004/228] feat: improving readability --- .../tools/kubeadm/install-kubeadm.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md index 981b4c5aac..81f1bebe7b 100644 --- a/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md +++ b/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md @@ -51,7 +51,7 @@ EOF sudo sysctl --system ``` -Para mais detalhes veja a página [Requisitos do plugin de rede](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements). +Para mais detalhes veja a página [Requisitos do plugin de rede](/pt-br/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements). ## Verificando as portas necessárias @@ -105,14 +105,14 @@ Se tanto o Docker quanto o containerd forem detectados no sistema, o Docker ter O kubelet se integra com o Docker através da implementação CRI `dockershim` já inclusa. -Veja [agente de execução](/docs/setup/production-environment/container-runtimes/) +Veja a página dos [agentes de execução](/docs/setup/production-environment/container-runtimes/) para mais detalhes. {{% /tab %}} -{{% tab name="outros sistemas operacionais" %}} +{{% tab name="Outros sistemas operacionais" %}} Por padrão, o kubeadm utiliza o {{< glossary_tooltip term_id="docker" >}} como agente de execução. O kubelet se integra com o Docker através da implementação CRI `dockershim` já inclusa. -Veja [agente de execução](/docs/setup/production-environment/container-runtimes/) +Veja a página dos [agentes de execução](/docs/setup/production-environment/container-runtimes/) para mais detalhes. {{% /tab %}} {{< /tabs >}} From c86b8a3e430f57e0e579e2a2b1fb585f40bb7c09 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Wed, 2 Jun 2021 11:30:01 +0200 Subject: [PATCH 005/228] Add docs about auth differences between Docker and Kubernetes The interpretation between Docker and Kubernetes varies when comparing its implementations. This allows different use cases and should be documented accordingly. Signed-off-by: Sascha Grunert Co-authored-by: Geoffrey Cline Signed-off-by: Sascha Grunert --- content/en/docs/concepts/containers/images.md | 68 +++++++++++++++++++ .../pull-image-private-registry.md | 2 +- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/content/en/docs/concepts/containers/images.md b/content/en/docs/concepts/containers/images.md index 78323b1302..0dad305c84 100644 --- a/content/en/docs/concepts/containers/images.md +++ b/content/en/docs/concepts/containers/images.md @@ -208,6 +208,73 @@ template needs to include the `.docker/config.json` or mount a drive that contai All pods will have read access to images in any private registry once private registry keys are added to the `.docker/config.json`. +### Interpretation of config.json {#config-json} + +The interpretation of `config.json` varies between the original Docker +implementation and the Kubernetes interpretation. In Docker, the `auths` keys +can only specify root URLs, whereas Kubernetes allows glob URLs as well as +prefix-matched paths. This means that a `config.json` like this is valid: + +```json +{ + "auths": { + "*my-registry.io/images": { + "auth": "…" + } + } +} +``` + +The root URL (`*my-registry.io`) is matched by using the following syntax: + +``` +pattern: + { term } + +term: + '*' matches any sequence of non-Separator characters + '?' matches any single non-Separator character + '[' [ '^' ] { character-range } ']' + character class (must be non-empty) + c matches character c (c != '*', '?', '\\', '[') + '\\' c matches character c + +character-range: + c matches character c (c != '\\', '-', ']') + '\\' c matches character c + lo '-' hi matches character c for lo <= c <= hi +``` + +Image pull operations would now pass the credentials to the CRI container +runtime for every valid pattern. For example the following container image names +would match successfully: + +- `my-registry.io/images` +- `my-registry.io/images/my-image` +- `my-registry.io/images/another-image` +- `sub.my-registry.io/images/my-image` +- `a.sub.my-registry.io/images/my-image` + +The kubelet performs image pulls sequentially for every found credential. This +means, that multiple entries in `config.json` are possible, too: + +```json +{ + "auths": { + "my-registry.io/images": { + "auth": "…" + }, + "my-registry.io/images/subpath": { + "auth": "…" + } + } +} +``` + +If now a container specifies an image `my-registry.io/images/subpath/my-image` +to be pulled, then the kubelet will try to download them from both +authentication sources if one of them fails. + ### Pre-pulled images {{< note >}} @@ -332,3 +399,4 @@ Kubelet will merge any `imagePullSecrets` into a single virtual `.docker/config. * Read the [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/master/manifest.md). * Learn about [container image garbage collection](/docs/concepts/architecture/garbage-collection/#container-image-garbage-collection). +* Learn more about [pulling an Image from a Private Registry](/docs/tasks/configure-pod-container/pull-image-private-registry). diff --git a/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md b/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md index 57c5329b7a..ecb8dd1bfd 100644 --- a/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md +++ b/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md @@ -28,7 +28,7 @@ docker login When prompted, enter your Docker username and password. -The login process creates or updates a `config.json` file that holds an authorization token. +The login process creates or updates a `config.json` file that holds an authorization token. Review [how Kubernetes interprets this file](/docs/concepts/containers/images#config-json). View the `config.json` file: From 1f2e4cf9e087ec6e0068f30af535b853e5c27846 Mon Sep 17 00:00:00 2001 From: Marcos Nery Date: Mon, 13 Sep 2021 02:55:20 -0300 Subject: [PATCH 006/228] improving readability --- .../production-environment/tools/kubeadm/install-kubeadm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md index 81f1bebe7b..0e4e498916 100644 --- a/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md +++ b/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md @@ -25,7 +25,7 @@ Para mais informações sobre como criar um cluster com o kubeadm após efetuar ## Verificando se o endereço MAC e o product_uiid são únicos para cada nó {#veficiar-endereco-mac} * Você pode verificar o endereço MAC da interface de rede utilizando o comando `ip link` ou o comando `ipconfig -a`. -* O product_uuid pode ser verificado utilizando o comando `sudo cat /sys/class/dmi/I'd/product_uuid`. +* O product_uuid pode ser verificado utilizando o comando `sudo cat /sys/class/dmi/id/product_uuid`. É provável que dispositivos físicos possuam endereços únicos. No entanto, é possível que algumas máquinas virtuais possuam endereços iguais. O Kubernetes utiliza esses valores para identificar unicamente os nós em um cluster. Se esses valores não forem únicos para cada nó, o processo de instalação pode [falhar](https://github.com/kubernetes/kubeadm/issues/31). @@ -37,7 +37,7 @@ Se você possuir mais de um adaptador de rede, e seus componentes Kubernetes nã Se assegure de que o módulo `br_netfilter` está carregado. Isso pode ser feito executando o comando `lsmod | grep br_netfilter`. Para carrega-lo explicitamente execute `sudo modprobe br_netfilter`. -Você também deve se assegurar de que o valor da configuração `net.bridge.bridge-nf-call-iptables` no seu `sysctl` está com o valor 1. Um requerimento para que as iptables dos seus nós enxerguem o tráfego agregado corretamente. Como no exemplo abaixo: +Você também deve se assegurar de que a configuração `net.bridge.bridge-nf-call-iptables` no seu `sysctl` está com o valor 1. Um requerimento para que o iptables de cada um dos seus nós Linux enxergue o tráfego agregado corretamente. Como no exemplo abaixo: ```bash cat < Date: Thu, 16 Sep 2021 08:20:34 -0500 Subject: [PATCH 007/228] "First this user must have [a] certificate issued..." Added 'a' to the sentence "First this user must have certificate issued..." from the subsection "Normal Users" --- .../access-authn-authz/certificate-signing-requests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/reference/access-authn-authz/certificate-signing-requests.md b/content/en/docs/reference/access-authn-authz/certificate-signing-requests.md index 73b43f38bf..e5ed3a5d1b 100644 --- a/content/en/docs/reference/access-authn-authz/certificate-signing-requests.md +++ b/content/en/docs/reference/access-authn-authz/certificate-signing-requests.md @@ -199,7 +199,7 @@ To allow signing a CertificateSigningRequest: ## Normal user A few steps are required in order to get a normal user to be able to -authenticate and invoke an API. First, this user must have certificate issued +authenticate and invoke an API. First, this user must have a certificate issued by the Kubernetes cluster, and then present that certificate to the Kubernetes API. ### Create private key From 997efe20b04144e6f5156023f2f914904b4b1430 Mon Sep 17 00:00:00 2001 From: Marcos Nery Date: Sun, 19 Sep 2021 18:44:22 -0300 Subject: [PATCH 008/228] improving translation --- .../tools/kubeadm/install-kubeadm.md | 41 +++++-------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md index 0e4e498916..a281d8369f 100644 --- a/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md +++ b/content/pt-br/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md @@ -35,9 +35,9 @@ Se você possuir mais de um adaptador de rede, e seus componentes Kubernetes nã ## Fazendo com que o iptables enxergue o tráfego agregado -Se assegure de que o módulo `br_netfilter` está carregado. Isso pode ser feito executando o comando `lsmod | grep br_netfilter`. Para carrega-lo explicitamente execute `sudo modprobe br_netfilter`. +Assegure-se de que o módulo `br_netfilter` está carregado. Isso pode ser feito executando o comando `lsmod | grep br_netfilter`. Para carrega-lo explicitamente execute `sudo modprobe br_netfilter`. -Você também deve se assegurar de que a configuração `net.bridge.bridge-nf-call-iptables` no seu `sysctl` está com o valor 1. Um requerimento para que o iptables de cada um dos seus nós Linux enxergue o tráfego agregado corretamente. Como no exemplo abaixo: +Como um requisito para que seus nós Linux enxerguem corretamente o tráfego agregado de rede, você deve garantir que a configuração `net.bridge.bridge-nf-call-iptables` do seu `sysctl` está configurada com valor 1. Como no exemplo abaixo: ```bash cat <}}. @@ -122,9 +101,9 @@ para mais detalhes. Você instalará esses pacotes em todas as suas máquinas: -* `kubeadm`: o comando para iniciar o cluster. +* `kubeadm`: o comando para criar o cluster. -* `kubelet`: o componente que executa em todas as máquinas no seu cluster e cuida de coisas como a inicialização de pods e contêineres. +* `kubelet`: o componente que executa em todas as máquinas no seu cluster e cuida de tarefas como a inicialização de pods e contêineres. * `kubectl`: a ferramenta de linha de comando para interação com o cluster. @@ -132,7 +111,7 @@ O kubeadm **não irá** instalar ou gerenciar o `kubelet` ou o `kubectl` para vo precisará garantir que as versões deles são as mesmas da versão da camada de gerenciamento do Kubernetes que você quer que o kubeadm instale. Caso isso não seja feito, surge o risco de que uma diferença nas versões leve a bugs e comportamentos inesperados. Dito isso, _uma_ diferença de menor grandeza nas versões entre o kubelet e a -camada de gerenciamento é suportada, mas a versão do kubelet nunca poderá ser superior a versão do servidor da API. +camada de gerenciamento é suportada, mas a versão do kubelet nunca poderá ser superior à versão do servidor da API. Por exemplo, um kubelet com a versão 1.7.0 será totalmente compatível com a versão 1.8.0 do servidor da API, mas o contrário não será verdadeiro. Para mais informações acerca da instalação do `kubectl`, veja [Instale e configure o kubectl](/docs/tasks/tools/). @@ -142,7 +121,7 @@ Essas instruções removem todos os pacotes Kubernetes de quaisquer atualizaçõ Isso ocorre porque o kubeadm e o Kubernetes requerem alguns [cuidados especiais para serem atualizados](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/). {{}} -para mais detalhes da compatibilidade entre as versões, veja: +Para mais detalhes sobre compatibilidade entre as versões, veja: * [Políticas de versão e compatibilidade entre versões](/docs/setup/release/version-skew-policy/) do Kubernetes. * [Compatibilidade entre versões](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#version-skew-policy) do Kubeadm. @@ -223,7 +202,7 @@ Escolha o diretório para baixar os arquivos de comandos. {{< note >}} A variável `DOWNLOAD_DIR` precisa estar configurada para um diretório que permita escrita. -Se você estiver utilizando o Flatcar Container Linux, veja `DOWNLOAD_DIR=/opt/bin`. +Se você estiver utilizando o Flatcar Container Linux, configure a váriavel de ambiente `DOWNLOAD_DIR=/opt/bin`. {{< /note >}} ```bash @@ -261,7 +240,7 @@ systemctl enable --now kubelet ``` {{< note >}} -A distribuição Linux Flatcar Container instala o diretório `/usr` como um sistema de arquivos apenas para leitura. +A distribuição Flatcar Container Linux instala o diretório `/usr` como um sistema de arquivos apenas para leitura. Antes de inicializar o seu cluster, você precisa de alguns passos adicionais para configurar um diretório com escrita. Veja o [Guia de solução de problemas do Kubeadm](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#usr-mounted-read-only/) para aprender como configurar um diretório com escrita. {{< /note >}} From 1ebf0f30b0845ca41a7f6cc3a24a111cb63aff64 Mon Sep 17 00:00:00 2001 From: Marcos Nery Date: Thu, 23 Sep 2021 01:29:19 -0300 Subject: [PATCH 009/228] translating ports and protocols to pt-br --- .../docs/reference/ports-and-protocols.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 content/pt-br/docs/reference/ports-and-protocols.md diff --git a/content/pt-br/docs/reference/ports-and-protocols.md b/content/pt-br/docs/reference/ports-and-protocols.md new file mode 100644 index 0000000000..9ec24c8b8e --- /dev/null +++ b/content/pt-br/docs/reference/ports-and-protocols.md @@ -0,0 +1,38 @@ +--- +title: Ports and Protocols +content_type: reference +weight: 50 +--- + +Quando o Kubernetes está sendo executado em um ambiente com uma rede mais restritiva, +como por exemplo um data center on-premises com firewalls de rede físicos ou redes virtuais em nuvens públicas, +é útil saber quais portas e protocolos são utilizados pelos componentes do Kubernetes. + +## Camada de gerenciamento + +| Protocol | Direction | Port Range | Purpose | Used By | +|----------|-----------|------------|-------------------------|---------------------------| +| TCP | Entrada | 6443 | Servidor da API do Kubernetes | Todos | +| TCP | Entrada | 2379-2380 | API servidor-cliente do etcd | kube-apiserver, etcd | +| TCP | Entrada | 10250 | API do kubelet | kubeadm, Camada de gerenciamento | +| TCP | Entrada | 10259 | kube-scheduler | kubeadm | +| TCP | Entrada | 10257 | kube-controller-manager | kubeadm | + +Embora as portas do etcd estjam inclusas na secção da Camada de gerenciamento, você também +pode hospedar o seu próprio cluster etcd externamente ou em portas customizadas. + +## Nós de processamento {#node} + +| Protocol | Direction | Port Range | Purpose | Used By | +|----------|-----------|-------------|-----------------------|-------------------------| +| TCP | Entrada | 10250 | API do Kubelet | Self, Camada de gerenciamento | +| TCP | Entrada | 30000-32767 | Serviços NodePort† | Todos | + +† Intervalo padrão de portas para os [serviços NodePort](/docs/concepts/services-networking/service/). + +Todas as portas padrão podem ser sobrescritas. Quando portas customizadas são utilizadas, essas portas +precisam estar abertas, ao invés das mencionadas aqui. + +Um exemplo comum é a porta do servidor da API, que as vezes é trocado para a porta 433. +Com isso, a porta padrão é mantida e o servidor da API é colocado atrás de um balanceador de carga +que escuta na porta 433 e faz o roteamento das requisições para o servidor da API na porta padrão. From 650d956be609d728522daa9933a332d485e2fb36 Mon Sep 17 00:00:00 2001 From: Riita <42636694+riita10069@users.noreply.github.com> Date: Fri, 8 Oct 2021 17:25:27 +0900 Subject: [PATCH 010/228] Update cluster-administration-overview.md --- .../cluster-administration/cluster-administration-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ja/docs/concepts/cluster-administration/cluster-administration-overview.md b/content/ja/docs/concepts/cluster-administration/cluster-administration-overview.md index 89b3b28919..b6e2c9d0a5 100644 --- a/content/ja/docs/concepts/cluster-administration/cluster-administration-overview.md +++ b/content/ja/docs/concepts/cluster-administration/cluster-administration-overview.md @@ -35,7 +35,7 @@ Kubernetesクラスターの計画、セットアップ、設定の例を知る ## クラスターをセキュアにする -* [Certificates](/docs/concepts/cluster-administration/certificates/)では、異なるツールチェインを使用して証明書を作成する方法を説明します。 +* [Certificates](/ja/docs/concepts/cluster-administration/certificates/)では、異なるツールチェインを使用して証明書を作成する方法を説明します。 * [Kubernetes コンテナの環境](/ja/docs/concepts/containers/container-environment/)では、Kubernetesノード上でのKubeletが管理するコンテナの環境について説明します。 From 7fe322059f010e44478e0be4b1fe75bb3a0a5c35 Mon Sep 17 00:00:00 2001 From: Riita <42636694+riita10069@users.noreply.github.com> Date: Fri, 8 Oct 2021 17:49:49 +0900 Subject: [PATCH 011/228] Update service.md --- content/ja/docs/concepts/services-networking/service.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ja/docs/concepts/services-networking/service.md b/content/ja/docs/concepts/services-networking/service.md index f7273d45f1..8481f990aa 100644 --- a/content/ja/docs/concepts/services-networking/service.md +++ b/content/ja/docs/concepts/services-networking/service.md @@ -303,7 +303,7 @@ ServiceのclusterIPを発見するためにDNSのみを使う場合、このよ ### DNS -ユーザーは[アドオン](/docs/concepts/cluster-administration/addons/)を使ってKubernetesクラスターにDNS Serviceをセットアップできます(常にセットアップすべきです)。 +ユーザーは[アドオン](/ja/docs/concepts/cluster-administration/addons/)を使ってKubernetesクラスターにDNS Serviceをセットアップできます(常にセットアップすべきです)。 CoreDNSなどのクラスター対応のDNSサーバーは新しいServiceや、各Service用のDNSレコードのセットのためにKubernetes APIを常に監視します。 もしクラスターを通してDNSが有効になっている場合、全てのPodはDNS名によって自動的にServiceに対する名前解決をするようにできるはずです。 From 05692590ad9a204e5922fe64bef360046134e304 Mon Sep 17 00:00:00 2001 From: Riita <42636694+riita10069@users.noreply.github.com> Date: Fri, 8 Oct 2021 17:55:56 +0900 Subject: [PATCH 012/228] Update rbac.md --- content/ja/docs/reference/access-authn-authz/rbac.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/ja/docs/reference/access-authn-authz/rbac.md b/content/ja/docs/reference/access-authn-authz/rbac.md index 04409b3b8e..8775a5deb9 100644 --- a/content/ja/docs/reference/access-authn-authz/rbac.md +++ b/content/ja/docs/reference/access-authn-authz/rbac.md @@ -678,7 +678,7 @@ Secretsの内容を読み取るとNamespaceのServiceAccountのクレデンシ system:kube-dns kube-systemNamespaceのサービスアカウントkube-dns -kube-dnsコンポーネントのRole。 +kube-dnsコンポーネントのRole。 system:kubelet-api-admin @@ -698,7 +698,7 @@ Secretsの内容を読み取るとNamespaceのServiceAccountのクレデンシ system:persistent-volume-provisioner None -ほとんどのdynamic volume provisionersが必要とするリソースへのアクセスを許可します。 +ほとんどのdynamic volume provisionersが必要とするリソースへのアクセスを許可します。 @@ -995,7 +995,7 @@ subjects: --namespace=my-namespace ``` - 多くの[アドオン](https://kubernetes.io/docs/concepts/cluster-administration/addons/)は、 + 多くの[アドオン](/ja/docs/concepts/cluster-administration/addons/)は、 Namespace`kube-system`のサービスアカウント「default」として実行されます。 これらのアドオンをスーパーユーザーアクセスでの実行を許可するには、Namespace`kube-system`のサービスアカウント「default」のcluster-admin権限を付与します。 From 0cc9ae1a503b3526c4f7f3d3eab9aa8065a59adc Mon Sep 17 00:00:00 2001 From: Seokho Son Date: Sun, 10 Oct 2021 00:42:12 +0900 Subject: [PATCH 013/228] Update outdated in dev-1.22-ko.2 (Task M3-M5) --- .../cluster-administration/logging.md | 8 +++--- .../cluster-administration/networking.md | 25 +++---------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/content/ko/docs/concepts/cluster-administration/logging.md b/content/ko/docs/concepts/cluster-administration/logging.md index 5ae2aafffd..39ef2f2dcb 100644 --- a/content/ko/docs/concepts/cluster-administration/logging.md +++ b/content/ko/docs/concepts/cluster-administration/logging.md @@ -17,8 +17,8 @@ weight: 60 -클러스터-레벨 로깅은 로그를 저장하고, 분석하고, 쿼리하기 위해 별도의 백엔드가 필요하다. 쿠버네티스는 -로그 데이터를 위한 네이티브 스토리지 솔루션을 제공하지 않지만, +클러스터-레벨 로깅은 로그를 저장, 분석, 쿼리하기 위해서는 별도의 백엔드가 필요하다. 쿠버네티스가 +로그 데이터를 위한 네이티브 스토리지 솔루션을 제공하지는 않지만, 쿠버네티스에 통합될 수 있는 기존의 로깅 솔루션이 많이 있다. ## 쿠버네티스의 기본 로깅 @@ -136,7 +136,7 @@ systemd를 사용하지 않으면, kubelet과 컨테이너 런타임은 `/var/lo 각 노드에 _노드-레벨 로깅 에이전트_ 를 포함시켜 클러스터-레벨 로깅을 구현할 수 있다. 로깅 에이전트는 로그를 노출하거나 로그를 백엔드로 푸시하는 전용 도구이다. 일반적으로, 로깅 에이전트는 해당 노드의 모든 애플리케이션 컨테이너에서 로그 파일이 있는 디렉터리에 접근할 수 있는 컨테이너이다. -로깅 에이전트는 모든 노드에서 실행해야 하므로, 에이전트는 +로깅 에이전트는 모든 노드에서 실행되어야 하므로, 에이전트를 `DaemonSet` 으로 동작시키는 것을 추천한다. 노드-레벨 로깅은 노드별 하나의 에이전트만 생성하며, 노드에서 실행되는 애플리케이션에 대한 변경은 필요로 하지 않는다. @@ -262,4 +262,4 @@ fluentd를 구성하는 것에 대한 자세한 내용은, [fluentd 문서](http ![애플리케이션에서 직접 로그 노출](/images/docs/user-guide/logging/logging-from-application.png) -모든 애플리케이션에서 직접 로그를 노출하거나 푸시하는 클러스터-로깅은 쿠버네티스의 범위를 벗어난다. +애플리케이션에서 직접 로그를 노출하거나 푸시하는 클러스터-로깅은 쿠버네티스의 범위를 벗어난다. diff --git a/content/ko/docs/concepts/cluster-administration/networking.md b/content/ko/docs/concepts/cluster-administration/networking.md index b72d38a360..3f6e103ba7 100644 --- a/content/ko/docs/concepts/cluster-administration/networking.md +++ b/content/ko/docs/concepts/cluster-administration/networking.md @@ -1,4 +1,6 @@ --- + + title: 클러스터 네트워킹 content_type: concept weight: 50 @@ -89,18 +91,6 @@ VM 내의 프로세스와 동일하다. 이것을 "IP-per-pod(파드별 IP)" 모 프로젝트 [Antrea](https://github.com/vmware-tanzu/antrea)는 쿠버네티스 고유의 오픈소스 쿠버네티스 네트워킹 솔루션이다. 네트워킹 데이터 플레인으로 Open vSwitch를 활용한다. Open vSwitch는 리눅스와 윈도우를 모두 지원하는 고성능의 프로그래밍이 가능한 가상 스위치이다. Antrea는 Open vSwitch를 통해 쿠버네티스 네트워크 정책을 고성능의 효율적인 방식으로 구현할 수 있다. Antrea는 Open vSwitch의 "프로그래밍이 가능한" 특성으로 인해 Open vSwitch 위에 광범위한 네트워킹 및 보안 기능과 서비스를 구현할 수 있다. -### Apstra의 AOS - -[AOS](https://www.apstra.com/products/aos/)는 단순한 통합 플랫폼에서 복잡한 데이터센터 환경을 만들고 관리하는 의도기반(Intent-Based) 네트워킹 시스템이다. AOS는 확장성이 뛰어난 분산 설계를 활용하여 네트워크 중단을 제거하면서 비용을 최소화한다. - -AOS 레퍼런스 디자인은 현재 레거시 Layer-2 스위칭 문제를 제거하는 Layer-3 연결 호스트를 지원한다. 이 Layer-3 호스트는 리눅스 서버(Debian, Ubuntu, CentOS)일 수 있으며 랙 상단 스위치(TOR)와 직접 BGP 인접 관계를 만든다. AOS는 라우팅 인접성을 자동화한 다음 쿠버네티스 디플로이먼트에서 일반적으로 사용되는 RHI(Route Health Injection)에 대한 세밀한 제어를 제공한다. - -AOS는 쿠버네티스가 애플리케이션 요구 사항에 따라 네트워크 정책을 신속하게 변경할 수 있는 풍부한 REST API 엔드포인트 셋을 제공한다. 네트워크 설계에 사용된 AOS 그래프 모델을 워크로드 프로비저닝과 통합하여 프라이빗 클라우드와 퍼블릭 클라우드 모두에 대한 엔드-투-엔드 관리 시스템을 향상시킬 수 있다. - -AOS는 Cisco, Arista, Dell, Mellanox, HPE 그리고 Microsoft SONiC, Dell OPX 및 Cumulus Linux와 같은 개방형 네트워크 운영체제와 수많은 화이트-박스 시스템을 포함한 제조업체의 일반적인 벤더 장비 사용을 지원한다. - -AOS 시스템 작동 방식에 대한 자세한 내용은 다음을 참고한다. https://www.apstra.com/products/how-it-works/ - ### 쿠버네티스용 AWS VPC CNI [AWS VPC CNI](https://github.com/aws/amazon-vpc-cni-k8s)는 쿠버네티스 클러스터를 위한 통합된 AWS 버추얼 프라이빗 클라우드(Virtual Private Cloud, VPC) 네트워킹을 제공한다. 이 CNI 플러그인은 높은 처리량과 가용성, 낮은 레이턴시(latency) 그리고 최소 네트워크 지터(jitter)를 제공한다. 또한, 사용자는 쿠버네티스 클러스터를 구축하기 위한 기존의 AWS VPC 네트워킹 및 보안 모범 사례를 적용할 수 있다. 여기에는 VPC 플로우 로그, VPC 라우팅 정책과 네트워크 트래픽 격리를 위한 보안 그룹을 사용하는 기능이 포함되어 있다. @@ -114,15 +104,6 @@ AOS 시스템 작동 방식에 대한 자세한 내용은 다음을 참고한다 Azure CNI는 [Azure 쿠버네티스 서비스(Azure Kubernetes Service, AKS)](https://docs.microsoft.com/en-us/azure/aks/configure-azure-cni)에서 기본적으로 사용할 수 있다. - -### Big Switch Networks의 빅 클라우드 패브릭(Big Cloud Fabric) - -[빅 클라우드 패브릭](https://www.bigswitch.com/container-network-automation)은 클라우드 네이티브 네트워킹 아키텍처로, 프라이빗 클라우드/온-프레미스 환경에서 쿠버네티스를 실행하도록 디자인되었다. 통합된 물리 및 가상 SDN을 사용하여, 빅 클라우드 패브릭은 로드 밸런싱, 가시성, 문제 해결, 보안 정책 및 컨테이너 트래픽 모니터링과 같은 내재한 컨테이너 네트워킹 문제를 해결한다. - -빅 클라우드 패브릭의 가상 파드 멀티 테넌트 아키텍처를 통해 쿠버네티스, RedHat OpenShift, Mesosphere DC/OS 및 Docker Swarm과 같은 컨테이너 오케스트레이션 시스템은 VMware, OpenStack 및 Nutanix와 같은 VM 오케스트레이션 시스템과 함께 네이티브로 통합된다. 고객은 원하는 수의 클러스터를 안전하게 상호 연결할 수 있으며 필요한 경우 이들 사이의 테넌트 간 통신을 활성화할 수 있다. - -가트너는 최신의 [매직 쿼드런트(Magic Quadrant)](https://go.bigswitch.com/17GatedDocuments-MagicQuadrantforDataCenterNetworking_Reg.html)에서 BCF를 비저너리(Visionary)로 인정했다. BCF 쿠버네티스 온-프레미스 디플로이먼트 중 하나(지리적으로 다른 리전에 걸쳐 여러 DC에서 실행되는 쿠버네티스, DC/OS 및 VMware 포함)도 [여기](https://portworx.com/architects-corner-kubernetes-satya-komala-nio/)에서 사례로 참조된다. - ### 캘리코 [캘리코](https://docs.projectcalico.org/)는 컨테이너, 가상 시스템 및 기본 호스트 기반 워크로드를 위한 오픈소스 네트워킹 및 네트워크 보안 솔루션이다. 캘리코는 순수 리눅스 eBPF 데이터플레인, 표준 리눅스 네트워킹 데이터플레인, 윈도우 HNS 데이터플레인을 포함한 여러 데이터플레인을 지원한다. 캘리코는 완전한 네트워킹 스택을 제공하지만, [클라우드 제공자 CNI](https://docs.projectcalico.org/networking/determine-best-networking#calico-compatible-cni-plugins-and-cloud-provider-integrations)와 함께 사용하여 네트워크 정책 시행을 제공할 수도 있다. @@ -267,7 +248,7 @@ Lars Kellogg-Stedman이 제공하는 [Multus](https://github.com/Intel-Corp/multus-cni)는 쿠버네티스의 CRD 기반 네트워크 오브젝트를 사용하여 쿠버네티스에서 멀티 네트워킹 기능을 지원하는 멀티 CNI 플러그인이다. -Multus는 CNI 명세를 구현하는 모든 [레퍼런스 플러그인](https://github.com/containernetworking/plugins)(예: [플라넬](https://github.com/containernetworking/plugins/tree/master/plugins/meta/flannel), [DHCP](https://github.com/containernetworking/plugins/tree/master/plugins/ipam/dhcp), [Macvlan](https://github.com/containernetworking/plugins/tree/master/plugins/main/macvlan)) 및 써드파티 플러그인(예: [캘리코](https://github.com/projectcalico/cni-plugin), [위브(Weave)](https://github.com/weaveworks/weave), [실리움](https://github.com/cilium/cilium), [콘티브](https://github.com/contiv/netplugin))을 지원한다. 또한, Multus는 쿠버네티스의 클라우드 네이티브 애플리케이션과 NFV 기반 애플리케이션을 통해 쿠버네티스의 [SRIOV](https://github.com/hustcat/sriov-cni), [DPDK](https://github.com/Intel-Corp/sriov-cni), [OVS-DPDK 및 VPP](https://github.com/intel/vhost-user-net-plugin) 워크로드를 지원한다. +Multus는 CNI 명세를 구현하는 모든 [레퍼런스 플러그인](https://github.com/containernetworking/plugins)(예: [플라넬](https://github.com/containernetworking/cni.dev/blob/main/content/plugins/v0.9/meta/flannel.md), [DHCP](https://github.com/containernetworking/plugins/tree/master/plugins/ipam/dhcp), [Macvlan](https://github.com/containernetworking/plugins/tree/master/plugins/main/macvlan)) 및 써드파티 플러그인(예: [캘리코](https://github.com/projectcalico/cni-plugin), [위브(Weave)](https://github.com/weaveworks/weave), [실리움](https://github.com/cilium/cilium), [콘티브](https://github.com/contiv/netplugin))을 지원한다. 또한, Multus는 쿠버네티스의 클라우드 네이티브 애플리케이션과 NFV 기반 애플리케이션을 통해 쿠버네티스의 [SRIOV](https://github.com/hustcat/sriov-cni), [DPDK](https://github.com/Intel-Corp/sriov-cni), [OVS-DPDK 및 VPP](https://github.com/intel/vhost-user-net-plugin) 워크로드를 지원한다. ### OVN4NFV-K8s-Plugin (OVN 기반의 CNI 컨트롤러 & 플러그인) From 1a256a68cdd557128f62b04f04658b624ef3e9a5 Mon Sep 17 00:00:00 2001 From: June Yi Date: Sun, 10 Oct 2021 01:52:21 +0900 Subject: [PATCH 014/228] [ko] Update outdated in dev-1.22-ko.2 (Task M6) --- content/ko/docs/concepts/configuration/configmap.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/ko/docs/concepts/configuration/configmap.md b/content/ko/docs/concepts/configuration/configmap.md index 841feb8fb3..0225ba7778 100644 --- a/content/ko/docs/concepts/configuration/configmap.md +++ b/content/ko/docs/concepts/configuration/configmap.md @@ -61,6 +61,11 @@ v1.19부터 컨피그맵 정의에 `immutable` 필드를 추가하여 기반으로 해당 파드의 컨테이너를 구성할 수 있다. 파드와 컨피그맵은 동일한 {{< glossary_tooltip text="네임스페이스" term_id="namespace" >}}에 있어야 한다. +{{< note >}} +{{< glossary_tooltip text="스태틱(static) 파드" term_id="static-pod" >}}의 `spec`은 컨피그맵 +또는 다른 API 오브젝트를 참조할 수 없다. +{{< /note >}} + 다음은 단일 값을 가진 키와, 값이 구성 형식의 일부처럼 보이는 키를 가진 컨피그맵의 예시이다. From 850144b6ef78531d85c1cb73d2b638efdb8dc3a9 Mon Sep 17 00:00:00 2001 From: June Yi Date: Sun, 10 Oct 2021 02:19:08 +0900 Subject: [PATCH 015/228] [ko] Update outdated content in dev-1.22-ko.2 (Task M7) --- .../configuration/manage-resources-containers.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/content/ko/docs/concepts/configuration/manage-resources-containers.md b/content/ko/docs/concepts/configuration/manage-resources-containers.md index 3084651390..fa7ec69fc9 100644 --- a/content/ko/docs/concepts/configuration/manage-resources-containers.md +++ b/content/ko/docs/concepts/configuration/manage-resources-containers.md @@ -182,8 +182,8 @@ kubelet은 파드의 컨테이너를 시작할 때, CPU와 메모리 제한을 플래그의 값으로 사용된다. - 이 `spec.containers[].resources.limits.cpu` 값은 밀리코어 값으로 변환되고 - 100을 곱한 값이다. 그 결과 값은 컨테이너가 100ms마다 사용할 수 있는 총 CPU - 시간이다. 이 간격 동안 컨테이너는 CPU 시간을 초과하여 사용할 수 없다. + 100을 곱한 값이다. 그 결과 값은 컨테이너가 100ms마다 사용할 수 있는 마이크로초 단위의 + 총 CPU 시간이다. 이 간격 동안 컨테이너는 CPU 시간을 초과하여 사용할 수 없다. {{< note >}} 기본 쿼터 기간은 100ms이다. 최소 CPU 쿼터는 1ms이다. @@ -338,6 +338,9 @@ spec: ephemeral-storage: "2Gi" limits: ephemeral-storage: "4Gi" + volumeMounts: + - name: ephemeral + mountPath: "/tmp" - name: log-aggregator image: images.my-company.example/log-aggregator:v6 resources: @@ -345,6 +348,12 @@ spec: ephemeral-storage: "2Gi" limits: ephemeral-storage: "4Gi" + volumeMounts: + - name: ephemeral + mountPath: "/tmp" + volumes: + - name: ephemeral + emptyDir: {} ``` ### 임시-스토리지 요청이 있는 파드의 스케줄링 방법 From 4499017f7c6f0a3ab3a12189ae2f308400732d7f Mon Sep 17 00:00:00 2001 From: June Yi Date: Sun, 10 Oct 2021 02:44:22 +0900 Subject: [PATCH 016/228] [ko] Update outdated content in dev-1.22-ko.2 (Task M8) --- .../docs/concepts/configuration/overview.md | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/content/ko/docs/concepts/configuration/overview.md b/content/ko/docs/concepts/configuration/overview.md index f89d873a37..64b6bc3395 100644 --- a/content/ko/docs/concepts/configuration/overview.md +++ b/content/ko/docs/concepts/configuration/overview.md @@ -73,32 +73,6 @@ DNS 서버는 새로운 `서비스`를 위한 쿠버네티스 API를 Watch하며 - 디버깅을 위해 레이블을 조작할 수 있다. (레플리카셋과 같은) 쿠버네티스 컨트롤러와 서비스는 셀렉터 레이블을 사용해 파드를 선택하기 때문에, 관련된 레이블을 파드에서 삭제하는 것은 컨트롤러로부터 관리되거나 서비스로부터 트래픽을 전달받는 것을 중단시킨다. 만약 이미 존재하는 파드의 레이블을 삭제한다면, 파드의 컨트롤러는 그 자리를 대신할 새로운 파드를 생성한다. 이것은 이전에 "살아 있는" 파드를 "격리된" 환경에서 디버그할 수 있는 유용한 방법이다. 레이블을 상호적으로 추가하고 삭제하기 위해서, [`kubectl label`](/docs/reference/generated/kubectl/kubectl-commands#label)를 사용할 수 있다. -## 컨테이너 이미지 - -[imagePullPolicy](/ko/docs/concepts/containers/images/#이미지-업데이트)와 이미지의 태그는 [kubelet](/docs/reference/command-line-tools-reference/kubelet/)이 명시된 이미지를 풀(pull) 하려고 시도할 때 영향을 미친다. - -- `imagePullPolicy: IfNotPresent`: 이미지가 로컬에 이미 존재하지 않으면 이미지가 풀(Pull) 된다. - -- `imagePullPolicy: Always`: kubelet이 컨테이너를 시작할 때마다, kubelet은 컨테이너 이미지 레지스트리를 쿼리해서 이름을 이미지 다이제스트(digest)로 확인한다. kubelet에 정확한 다이제스트가 저장된 컨테이너 이미지가 로컬로 캐시된 경우, kubelet은 캐시된 이미지를 사용한다. 그렇지 않으면, kubelet은 확인한 다이제스트를 사용해서 이미지를 다운로드(pull)하고, 해당 이미지를 사용해서 컨테이너를 시작한다. - -- `imagePullPolicy`가 생략되어 있고, 이미지 태그가 `:latest` 이거나 생략되어 있다면 `imagePullPolicy`는 자동으로 `Always`가 적용된다. 태그 값을 변경하더라도 이 값은 `IfNotPresent`로 업데이트 되지 _않는다_. - -- `imagePullPolicy`가 생략되어 있고, 이미지 태그가 존재하지만 `:latest`가 아니라면 `imagePullPolicy`는 자동으로 `IfNotPresent`가 적용된다. 태그가 나중에 제거되거나 `:latest`로 변경되더라도 `Always`로 업데이트 되지 _않는다_. - -- `imagePullPolicy: Never`: 이미지가 로컬에 존재한다고 가정한다. 이미지를 풀(Pull) 하기 위해 시도하지 않는다. - -{{< note >}} -컨테이너가 항상 같은 버전의 이미지를 사용하도록 하기 위해, `<이미지 이름>:<태그>` 를 `<이미지 이름>@<다이제스트>` (예시 `image@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2`)로 변경해서 이미지의 [다이제스트](https://docs.docker.com/engine/reference/commandline/pull/#pull-an-image-by-digest-immutable-identifier)를 명시할 수 있다. 다이제스트는 특정 버전의 이미지를 고유하게 식별하며, 다이제스트 값을 변경하지 않는 한 쿠버네티스에 의해 절대로 변경되지 않는다. -{{< /note >}} - -{{< note >}} -운영 환경에서 컨테이너를 생성할 때 `:latest` 태그의 사용을 피하는 것이 좋은데, 이는 어떠한 버전의 이미지가 실행 중인지 추적하기가 어렵고, 적절히 롤백하기가 더 어려워지기 때문이다. -{{< /note >}} - -{{< note >}} -레지스트리가 안정적으로 동작하는 상황에서는, `imagePullPolicy: Always`로 설정되어 있더라도 기반 이미지 관리 도구의 캐싱 정책을 통해 이미지 풀(pull) 작업의 효율성을 높일 수 있다. 예를 들어, 도커를 사용하는 경우 이미지가 이미 존재한다면 풀(Pull) 시도는 빠르게 진행되는데, 이는 모든 이미지 레이어가 캐시되어 있으며 이미지 다운로드가 필요하지 않기 때문이다. -{{< /note >}} - ## kubectl 사용하기 - `kubectl apply -f <디렉터리>`를 사용한다. 이 명령어는 `<디렉터리>` 내부의 모든 `.yaml`, `.yml`, 그리고 `.json` 쿠버네티스 구성 파일을 찾아 `apply`에 전달한다. From 0c3dbcb2e898e83f425f465c21e887c3a0f647ca Mon Sep 17 00:00:00 2001 From: June Yi Date: Sun, 10 Oct 2021 21:08:11 +0900 Subject: [PATCH 017/228] [ko] Update outdated content of dev-1.22-ko.2 (Task M9) --- .../ko/docs/concepts/configuration/secret.md | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/content/ko/docs/concepts/configuration/secret.md b/content/ko/docs/concepts/configuration/secret.md index 330e89edac..8c0630c4b2 100644 --- a/content/ko/docs/concepts/configuration/secret.md +++ b/content/ko/docs/concepts/configuration/secret.md @@ -77,7 +77,7 @@ weight: 30 시크릿을 생성할 때, [`Secret`](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#secret-v1-core) 리소스의 `type` 필드를 사용하거나, (활용 가능하다면) `kubectl` 의 유사한 특정 커맨드라인 플래그를 사용하여 시크릿의 타입을 명시할 수 있다. -시크릿 타입은 시크릿 데이터의 프로그래믹 처리를 촉진시키기 위해 사용된다. +시크릿 타입은 여러 종류의 기밀 데이터를 프로그래밍 방식으로 용이하게 처리하기 위해 사용된다. 쿠버네티스는 일반적인 사용 시나리오를 위해 몇 가지 빌트인 타입을 제공한다. 이 타입은 쿠버네티스가 부과하여 수행되는 검증 및 제약에 @@ -212,7 +212,8 @@ data: kubectl create secret docker-registry secret-tiger-docker \ --docker-username=tiger \ --docker-password=pass113 \ - --docker-email=tiger@acme.com + --docker-email=tiger@acme.com \ + --docker-server=my-registry.example:5000 ``` 이 커맨드는 `kubernetes.io/dockerconfigjson` 타입의 시크릿을 생성한다. @@ -222,15 +223,21 @@ kubectl create secret docker-registry secret-tiger-docker \ ```json { - "auths": { - "https://index.docker.io/v1/": { - "username": "tiger", - "password": "pass113", - "email": "tiger@acme.com", - "auth": "dGlnZXI6cGFzczExMw==" - } - } + "apiVersion": "v1", + "data": { + ".dockerconfigjson": "eyJhdXRocyI6eyJteS1yZWdpc3RyeTo1MDAwIjp7InVzZXJuYW1lIjoidGlnZXIiLCJwYXNzd29yZCI6InBhc3MxMTMiLCJlbWFpbCI6InRpZ2VyQGFjbWUuY29tIiwiYXV0aCI6ImRHbG5aWEk2Y0dGemN6RXhNdz09In19fQ==" + }, + "kind": "Secret", + "metadata": { + "creationTimestamp": "2021-07-01T07:30:59Z", + "name": "secret-tiger-docker", + "namespace": "default", + "resourceVersion": "566718", + "uid": "e15c1d7b-9071-4100-8681-f3a7a2ce89ca" + }, + "type": "kubernetes.io/dockerconfigjson" } + ``` ### 기본 인증 시크릿 @@ -834,6 +841,9 @@ kubelet은 API 서버에서 시크릿을 가져오는 파드에 대한 파드가 포함된다. kubelet의 `--manifest-url` 플래그, `--config` 플래그 또는 kubectl의 REST API(이 방법들은 파드를 생성하는 일반적인 방법이 아님)로 생성된 파드는 포함하지 않는다. +{{< glossary_tooltip text="스태틱(static) 파드" term_id="static-pod" >}}의 `spec`은 컨피그맵 +또는 다른 API 오브젝트를 참조할 수 없다. + 시크릿은 optional(선택 사항)로 표시되지 않는 한 파드에서 환경 변수로 사용되기 전에 생성되어야 한다. 존재하지 않는 시크릿을 @@ -1252,3 +1262,4 @@ API 서버에서 kubelet으로의 통신은 SSL/TLS로 보호된다. - [`kubectl` 을 사용한 시크릿 관리](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)하는 방법 배우기 - [구성 파일을 사용한 시크릿 관리](/docs/tasks/configmap-secret/managing-secret-using-config-file/)하는 방법 배우기 - [kustomize를 사용한 시크릿 관리](/docs/tasks/configmap-secret/managing-secret-using-kustomize/)하는 방법 배우기 +- [API 레퍼런스](/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/)에서 `Secret`에 대해 읽기 From f5270d64c8b8da8df5b061d4c21266d8c9068f29 Mon Sep 17 00:00:00 2001 From: June Yi Date: Sun, 10 Oct 2021 21:15:39 +0900 Subject: [PATCH 018/228] [ko] Update outdated content in dev-1.22-ko.2 (Task M10) --- content/ko/docs/concepts/containers/container-environment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ko/docs/concepts/containers/container-environment.md b/content/ko/docs/concepts/containers/container-environment.md index 749eb6fbb8..18ed0aadd3 100644 --- a/content/ko/docs/concepts/containers/container-environment.md +++ b/content/ko/docs/concepts/containers/container-environment.md @@ -52,7 +52,7 @@ FOO_SERVICE_HOST=<서비스가 동작 중인 호스트> FOO_SERVICE_PORT=<서비스가 동작 중인 포트> ``` -서비스에 지정된 IP 주소가 있고 [DNS 애드온](https://releases.k8s.io/master/cluster/addons/dns/)이 활성화된 경우, DNS를 통해서 컨테이너가 서비스를 사용할 수 있다. +서비스에 지정된 IP 주소가 있고 [DNS 애드온](https://releases.k8s.io/{{< param "fullversion" >}}/cluster/addons/dns/)이 활성화된 경우, DNS를 통해서 컨테이너가 서비스를 사용할 수 있다. From 25837b559997f5f56c1d04fdc836898e69ab9e3f Mon Sep 17 00:00:00 2001 From: June Yi Date: Mon, 11 Oct 2021 10:42:18 +0900 Subject: [PATCH 019/228] [ko] Update outdated content in dev-1.22-ko.2 (Task M12) --- .../api-extension/apiserver-aggregation.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/content/ko/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md b/content/ko/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md index a2326c71dd..7658464ec0 100644 --- a/content/ko/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md +++ b/content/ko/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md @@ -1,5 +1,5 @@ --- -title: 애그리게이션 레이어(aggregation layer)로 쿠버네티스 API 확장하기 +title: 쿠버네티스 API 애그리게이션 레이어(aggregation layer) @@ -11,7 +11,7 @@ weight: 10 애그리게이션 레이어는 코어 쿠버네티스 API가 제공하는 기능 이외에 더 많은 기능을 제공할 수 있도록 추가 API를 더해 쿠버네티스를 확장할 수 있게 해준다. -추가 API는 [서비스-카탈로그](/ko/docs/concepts/extend-kubernetes/service-catalog/)와 같이 미리 만들어진 솔루션이거나 사용자가 직접 개발한 API일 수 있다. +추가 API는 [메트릭 서버](https://github.com/kubernetes-sigs/metrics-server)와 같이 미리 만들어진 솔루션이거나 사용자가 직접 개발한 API일 수 있다. 애그리게이션 레이어는 [사용자 정의 리소스](/ko/docs/concepts/extend-kubernetes/api-extension/custom-resources/)와는 다르며, 애그리게이션 레이어는 {{< glossary_tooltip term_id="kube-apiserver" text="kube-apiserver" >}} 가 새로운 종류의 오브젝트를 인식하도록 하는 방법이다. @@ -34,5 +34,6 @@ extention API server가 레이턴시 요구 사항을 달성할 수 없는 경 * 사용자의 환경에서 Aggregator를 동작시키려면, [애그리게이션 레이어를 설정한다](/docs/tasks/extend-kubernetes/configure-aggregation-layer/). * 다음에, [확장 API 서버를 구성해서](/ko/docs/tasks/extend-kubernetes/setup-extension-api-server/) 애그리게이션 레이어와 연계한다. -* 또한, 어떻게 [쿠버네티스 API를 커스텀 리소스 데피니션으로 확장하는지](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/)를 배워본다. -* [API 서비스](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#apiservice-v1-apiregistration-k8s-io)의 사양을 읽어본다. +* API 레퍼런스에서 [API 서비스](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#apiservice-v1-apiregistration-k8s-io)에 대해 읽어본다. + +대안으로, 어떻게 [쿠버네티스 API를 커스텀 리소스 데피니션으로 확장하는지](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/)를 배워본다. From b48071ad7aa0cddbeab2ed4131ea8a53edc857df Mon Sep 17 00:00:00 2001 From: June Yi Date: Mon, 11 Oct 2021 13:30:44 +0900 Subject: [PATCH 020/228] [ko] Update custom-resources.md refs #30000 --- .../api-extension/custom-resources.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/content/ko/docs/concepts/extend-kubernetes/api-extension/custom-resources.md b/content/ko/docs/concepts/extend-kubernetes/api-extension/custom-resources.md index 0357ac7619..e6e0203eb9 100644 --- a/content/ko/docs/concepts/extend-kubernetes/api-extension/custom-resources.md +++ b/content/ko/docs/concepts/extend-kubernetes/api-extension/custom-resources.md @@ -35,11 +35,10 @@ weight: 10 커스텀 리소스를 *커스텀 컨트롤러* 와 결합하면, 커스텀 리소스가 진정한 _선언적(declarative) API_ 를 제공하게 된다. -[선언적 API](/ko/docs/concepts/overview/kubernetes-api/)는 리소스의 의도한 상태를 -_선언_ 하거나 지정할 수 있게 해주며 쿠버네티스 오브젝트의 현재 상태를 의도한 상태와 -동기화 상태로 유지하려고 한다. 컨트롤러는 구조화된 데이터를 사용자가 -원하는 상태의 레코드로 해석하고 지속적으로 -이 상태를 유지한다. +쿠버네티스 [선언적 API](/ko/docs/concepts/overview/kubernetes-api/)는 +책임의 분리를 강제한다. 사용자는 리소스의 의도한 상태를 선언한다. +쿠버네티스 컨트롤러는 쿠버네티스 오브젝트의 현재 상태가 선언한 의도한 상태에 동기화 되도록 한다. +이는 서버에 무엇을 해야할지 *지시하는* 명령적인 API와는 대조된다. 클러스터 라이프사이클과 관계없이 실행 중인 클러스터에 커스텀 컨트롤러를 배포하고 업데이트할 수 있다. 커스텀 컨트롤러는 모든 종류의 리소스와 함께 작동할 수 있지만 @@ -167,7 +166,7 @@ CRD는 애그리게이트 API보다 생성하기가 쉽다. | CRD | 애그리게이트 API | | --------------------------- | -------------- | -| 프로그래밍이 필요하지 않다. 사용자는 CRD 컨트롤러에 대한 모든 언어를 선택할 수 있다. | Go로 프로그래밍하고 바이너리와 이미지를 빌드해야 한다. | +| 프로그래밍이 필요하지 않다. 사용자는 CRD 컨트롤러에 대한 모든 언어를 선택할 수 있다. | 프로그래밍하고 바이너리와 이미지를 빌드해야 한다. | | 실행할 추가 서비스가 없다. CR은 API 서버에서 처리한다. | 추가 서비스를 생성하면 실패할 수 있다. | | CRD가 생성된 후에는 지속적인 지원이 없다. 모든 버그 픽스는 일반적인 쿠버네티스 마스터 업그레이드의 일부로 선택된다. | 업스트림에서 버그 픽스를 주기적으로 선택하고 애그리게이트 API 서버를 다시 빌드하고 업데이트해야 할 수 있다. | | 여러 버전의 API를 처리할 필요가 없다. 예를 들어, 이 리소스에 대한 클라이언트를 제어할 때 API와 동기화하여 업그레이드할 수 있다. | 인터넷에 공유할 익스텐션을 개발할 때와 같이 여러 버전의 API를 처리해야 한다. | From f5981bc701da4150a11d6db574b0d25eda295c26 Mon Sep 17 00:00:00 2001 From: June Yi Date: Mon, 11 Oct 2021 18:08:14 +0900 Subject: [PATCH 021/228] [ko] Update scheduling-eviction refs #30000 task M19, M20 --- .../resource-bin-packing.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/content/ko/docs/concepts/scheduling-eviction/resource-bin-packing.md b/content/ko/docs/concepts/scheduling-eviction/resource-bin-packing.md index 1ac3b81262..c3dcf84727 100644 --- a/content/ko/docs/concepts/scheduling-eviction/resource-bin-packing.md +++ b/content/ko/docs/concepts/scheduling-eviction/resource-bin-packing.md @@ -93,9 +93,9 @@ shape: ``` yaml resources: - - name: CPU + - name: cpu weight: 1 - - name: Memory + - name: memory weight: 1 ``` @@ -105,9 +105,9 @@ resources: resources: - name: intel.com/foo weight: 5 - - name: CPU + - name: cpu weight: 3 - - name: Memory + - name: memory weight: 1 ``` @@ -124,16 +124,16 @@ resources: ``` intel.com/foo : 2 -Memory: 256MB -CPU: 2 +memory: 256MB +cpu: 2 ``` 리소스의 가중치는 다음과 같다. ``` intel.com/foo : 5 -Memory: 1 -CPU: 3 +memory: 1 +cpu: 3 ``` FunctionShapePoint {{0, 0}, {100, 10}} @@ -143,13 +143,13 @@ FunctionShapePoint {{0, 0}, {100, 10}} ``` Available: intel.com/foo: 4 - Memory: 1 GB - CPU: 8 + memory: 1 GB + cpu: 8 Used: intel.com/foo: 1 - Memory: 256MB - CPU: 1 + memory: 256MB + cpu: 1 ``` 노드 점수는 다음과 같다. @@ -159,16 +159,16 @@ intel.com/foo = resourceScoringFunction((2+1),4) = (100 - ((4-3)*100/4) = (100 - 25) = 75 # requested + used = 75% * available - = rawScoringFunction(75) - = 7 # floor(75/10) + = rawScoringFunction(75) + = 7 # floor(75/10) -Memory = resourceScoringFunction((256+256),1024) +memory = resourceScoringFunction((256+256),1024) = (100 -((1024-512)*100/1024)) = 50 # requested + used = 50% * available = rawScoringFunction(50) = 5 # floor(50/10) -CPU = resourceScoringFunction((2+1),8) +cpu = resourceScoringFunction((2+1),8) = (100 -((8-3)*100/8)) = 37.5 # requested + used = 37.5% * available = rawScoringFunction(37.5) @@ -183,12 +183,12 @@ NodeScore = (7 * 5) + (5 * 1) + (3 * 3) / (5 + 1 + 3) ``` Available: intel.com/foo: 8 - Memory: 1GB - CPU: 8 + memory: 1GB + cpu: 8 Used: intel.com/foo: 2 - Memory: 512MB - CPU: 6 + memory: 512MB + cpu: 6 ``` 노드 점수는 다음과 같다. @@ -207,7 +207,7 @@ Memory = resourceScoringFunction((256+512),1024) = rawScoringFunction(75) = 7 -CPU = resourceScoringFunction((2+6),8) +cpu = resourceScoringFunction((2+6),8) = (100 -((8-8)*100/8)) = 100 = rawScoringFunction(100) From 893b9827198322689ae7ac4de03a54bab605c8ce Mon Sep 17 00:00:00 2001 From: Juhee Kang Date: Sun, 10 Oct 2021 14:03:11 +0900 Subject: [PATCH 022/228] [ko] Translate docs/reference/glossary/sysctl.md in Korean --- content/ko/docs/reference/glossary/sysctl.md | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 content/ko/docs/reference/glossary/sysctl.md diff --git a/content/ko/docs/reference/glossary/sysctl.md b/content/ko/docs/reference/glossary/sysctl.md new file mode 100644 index 0000000000..bce4d26ba1 --- /dev/null +++ b/content/ko/docs/reference/glossary/sysctl.md @@ -0,0 +1,23 @@ +--- +title: sysctl +id: sysctl +date: 2019-02-12 +full_link: /docs/tasks/administer-cluster/sysctl-cluster/ +short_description: > + 유닉스 커널 파라미터를 가져오거나 설정하는 데 사용하는 인터페이스 + +aka: +tags: +- tool +--- + `sysctl`은 동작 중인 유닉스 커널의 속성을 읽거나 수정하는 데 사용하는 + (준)표준 인터페이스이다. + + + +유닉스 계열 시스템에서 `sysctl`은 관리자가 이러한 설정을 확인하고 수정하는데 사용하는 도구의 +이름이기도 하고, 해당 도구가 사용하는 시스템 콜이기도 +하다. + +{{< glossary_tooltip text="컨테이너" term_id="container" >}} 런타임과 +네트워크 플러그인은 특정 방식으로 설정된 `sysctl` 값에 의존성이 있을 수 있다. From 43508d68fc66794dea7ee86bf4ea01f25db5e0b3 Mon Sep 17 00:00:00 2001 From: June Yi Date: Mon, 11 Oct 2021 13:43:29 +0900 Subject: [PATCH 023/228] [ko] Update extend-kubernetes refs #30000 (Tasks: M14, M15, M16) note: M16 is not needed to be updated in Korean Co-authored-by: Juhee Kang --- content/ko/docs/concepts/extend-kubernetes/operator.md | 1 + content/ko/docs/concepts/extend-kubernetes/service-catalog.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/content/ko/docs/concepts/extend-kubernetes/operator.md b/content/ko/docs/concepts/extend-kubernetes/operator.md index 80ed86c2ec..d3ac7a4212 100644 --- a/content/ko/docs/concepts/extend-kubernetes/operator.md +++ b/content/ko/docs/concepts/extend-kubernetes/operator.md @@ -114,6 +114,7 @@ kubectl edit SampleDB/example-database # 일부 설정을 수동으로 변경하 * [Charmed Operator Framework](https://juju.is/) * [kubebuilder](https://book.kubebuilder.io/) 사용하기 +* [KubeOps](https://buehler.github.io/dotnet-operator-sdk/) (.NET 오퍼레이터 SDK) * [KUDO](https://kudo.dev/) (Kubernetes Universal Declarative Operator) * 웹훅(WebHook)과 함께 [Metacontroller](https://metacontroller.github.io/metacontroller/intro.html)를 사용하여 직접 구현하기 diff --git a/content/ko/docs/concepts/extend-kubernetes/service-catalog.md b/content/ko/docs/concepts/extend-kubernetes/service-catalog.md index cc387c2f02..8d1cb3ee05 100644 --- a/content/ko/docs/concepts/extend-kubernetes/service-catalog.md +++ b/content/ko/docs/concepts/extend-kubernetes/service-catalog.md @@ -32,7 +32,7 @@ weight: 40 서비스 카탈로그는 [오픈 서비스 브로커 API](https://github.com/openservicebrokerapi/servicebroker)를 사용하여 쿠버네티스 API 서버가 초기 프로비저닝을 협상하고 애플리케이션이 매니지드 서비스를 사용하는데 필요한 자격 증명을 검색하는 중개자 역할을 하는 서비스 브로커와 통신한다. -스토리지에 etcd를 사용하여 확장 API 서버와 컨트롤러로 구현된다. 또한 쿠버네티스 1.7 이상에서 제공하는 [애그리게이션 레이어(aggregation layer)](/ko/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/)를 사용하여 API를 제공한다. +이는 [CRD 기반](/ko/docs/concepts/extend-kubernetes/api-extension/custom-resources/#커스텀-리소스) 아키텍처를 사용해서 구현되었다.
From e616b0a519b1eb486dc0573780d4d6003d3f8878 Mon Sep 17 00:00:00 2001 From: lifeoncloud Date: Mon, 11 Oct 2021 21:29:33 +0900 Subject: [PATCH 024/228] Update 2021-08-04-kubernetes-release-1.22.md update date in Upcoming release webinar --- content/ko/blog/_posts/2021-08-04-kubernetes-release-1.22.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ko/blog/_posts/2021-08-04-kubernetes-release-1.22.md b/content/ko/blog/_posts/2021-08-04-kubernetes-release-1.22.md index d936d7c767..d6df46ac55 100644 --- a/content/ko/blog/_posts/2021-08-04-kubernetes-release-1.22.md +++ b/content/ko/blog/_posts/2021-08-04-kubernetes-release-1.22.md @@ -142,7 +142,7 @@ GA 버전과 중복된 사용 중단(deprecated)된 여러 베타 API가 1.22에 # 다가오는 릴리스 웨비나 -이번 릴리스에 대한 중요 기능뿐만 아니라 업그레이드 계획을 위해 필요한 사용 중지된 사항이나 제거에 대한 사항을 학습하고 싶다면, 2021년 9월 7일에 쿠버네티스 1.22 릴리스 팀 웨비나에 참여하세요. 더 자세한 정보와 등록에 대해서는 CNCF 온라인 프로그램 사이트의 [이벤트 페이지](https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cncf-live-webinar-kubernetes-122-release/)를 확인하세요. +이번 릴리스에 대한 중요 기능뿐만 아니라 업그레이드 계획을 위해 필요한 사용 중지된 사항이나 제거에 대한 사항을 학습하고 싶다면, 2021년 10월 5일에 쿠버네티스 1.22 릴리스 팀 웨비나에 참여하세요. 더 자세한 정보와 등록에 대해서는 CNCF 온라인 프로그램 사이트의 [이벤트 페이지](https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cncf-live-webinar-kubernetes-122-release/)를 확인하세요. # 참여하기 From 0ce669e40d5a22e2bd38a971c3b65eaebacfae2a Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Wed, 13 Oct 2021 00:10:06 +0100 Subject: [PATCH 025/228] =?UTF-8?q?Revise=20=E2=80=9CPull=20an=20Image=20f?= =?UTF-8?q?rom=20a=20Private=20Registry=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - link to new-style API reference - call a manifest a manifest - use tooltips where appropriate - other general tidying --- .../pull-image-private-registry.md | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md b/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md index 0886871f9c..881b782208 100644 --- a/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md +++ b/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md @@ -6,27 +6,33 @@ weight: 100 -This page shows how to create a Pod that uses a Secret to pull an image from a -private Docker registry or repository. +This page shows how to create a Pod that uses a +{{< glossary_tooltip text="Secret" term_id="secret" >}} to pull an image from a +private container image registry or repository. + ## {{% heading "prerequisites" %}} -* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} +* {{< include "task-tutorial-prereqs.md" >}} -* To do this exercise, you need a -[Docker ID](https://docs.docker.com/docker-id/) and password. +* To do this exercise, you need the `docker` command line tool, and a + [Docker ID](https://docs.docker.com/docker-id/) for which you know the password. -## Log in to Docker +## Log in to Docker Hub -On your laptop, you must authenticate with a registry in order to pull a private image: +On your laptop, you must authenticate with a registry in order to pull a private image. + +Use the `docker` tool to log in to Docker Hub. See the _log in_ section of +[Docker ID accounts](https://docs.docker.com/docker-id/#log-in) for more information. ```shell docker login ``` -When prompted, enter your Docker username and password. +When prompted, enter your Docker ID, and then the credential you want to use (access token, +or the password for your Docker ID). The login process creates or updates a `config.json` file that holds an authorization token. @@ -171,14 +177,14 @@ You have successfully set your Docker credentials as a Secret called `regcred` i ## Create a Pod that uses your Secret -Here is a configuration file for a Pod that needs access to your Docker credentials in `regcred`: +Here is a manifest for an example Pod that needs access to your Docker credentials in `regcred`: {{< codenew file="pods/private-reg-pod.yaml" >}} -Download the above file: +Download the above file onto your computer: ```shell -wget -O my-private-reg-pod.yaml https://k8s.io/examples/pods/private-reg-pod.yaml +curl -L -O my-private-reg-pod.yaml https://k8s.io/examples/pods/private-reg-pod.yaml ``` In file `my-private-reg-pod.yaml`, replace `` with the path to an image in a private registry such as: @@ -200,10 +206,10 @@ kubectl get pod private-reg ## {{% heading "whatsnext" %}} -* Learn more about [Secrets](/docs/concepts/configuration/secret/). +* Learn more about [Secrets](/docs/concepts/configuration/secret/) + * or read the API reference for {{< api-reference page="config-and-storage-resources/secret-v1" >}} * Learn more about [using a private registry](/docs/concepts/containers/images/#using-a-private-registry). * Learn more about [adding image pull secrets to a service account](/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account). * See [kubectl create secret docker-registry](/docs/reference/generated/kubectl/kubectl-commands/#-em-secret-docker-registry-em-). -* See [Secret](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#secret-v1-core). -* See the `imagePullSecrets` field of [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core). +* See the `imagePullSecrets` field within the [container definitions](/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers) of a Pod From 8230d2518009bf3cfa8a476596f60f7f4b380afb Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Wed, 13 Oct 2021 00:10:56 +0100 Subject: [PATCH 026/228] Mark Docker as third-party software As per the content guide, Docker is (essential) third party software. Alternatives exist but Docker is certainly the most common tool used for this kind of task. Anyway, mark that it's third party. --- .../tasks/configure-pod-container/pull-image-private-registry.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md b/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md index 881b782208..57df76a424 100644 --- a/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md +++ b/content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md @@ -10,6 +10,7 @@ This page shows how to create a Pod that uses a {{< glossary_tooltip text="Secret" term_id="secret" >}} to pull an image from a private container image registry or repository. +{{% thirdparty-content single="true" %}} ## {{% heading "prerequisites" %}} From 4a57e58ab4b61ca4276a03fbbc971603cad66880 Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Wed, 13 Oct 2021 01:10:58 +0100 Subject: [PATCH 027/228] Use Docsy alert classes Update the Kubernetes overrides from the Docsy theme to diverge less, specifically in the areas of callouts (alerts) and pageinfo blocks. --- assets/scss/_custom.scss | 35 ++++++++++++++--------- layouts/partials/deprecation-warning.html | 2 +- layouts/shortcodes/caution.html | 6 ++-- layouts/shortcodes/note.html | 6 ++-- layouts/shortcodes/warning.html | 7 +++-- 5 files changed, 32 insertions(+), 24 deletions(-) diff --git a/assets/scss/_custom.scss b/assets/scss/_custom.scss index 20a36b6175..03701db994 100644 --- a/assets/scss/_custom.scss +++ b/assets/scss/_custom.scss @@ -313,33 +313,40 @@ main { // blockquotes and callouts -.td-content, body { - blockquote.callout { +body { + .alert { + // Override Docsy styles padding: 0.4rem 0.4rem 0.4rem 1rem; - border: 1px solid #eee; - border-left-width: 0.5em; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + border-right: 1px solid #eee; + border-radius: 0.25em; + border-left-width: 0.5em; // fallback in case calc() is missing background: #fff; color: #000; margin-top: 0.5em; margin-bottom: 0.5em; } - blockquote.callout { - border-radius: calc(1em/3); + // Set minimum width and radius for alert color + .alert { + border-left-width: calc(max(0.5em, 4px)); + border-top-left-radius: calc(max(0.5em, 4px)); + border-bottom-left-radius: calc(max(0.5em, 4px)); } - .callout.caution { + .alert.callout.caution { border-left-color: #f0ad4e; } - - .callout.note { + .alert.callout.note { border-left-color: #428bca; } - - .callout.warning { + .alert.callout.warning { border-left-color: #d9534f; } + .alert.third-party-content { + border-left-color: #444; + } - - h1:first-of-type + blockquote.callout { + h1:first-of-type + .alert.callout { margin-top: 1.5em; } } @@ -367,7 +374,7 @@ main { background: #f8f9cb; } -.deprecation-warning { +.deprecation-warning, .pageinfo.deprecation-warning { padding: 20px; margin: 20px 0; background-color: #faf5b6; diff --git a/layouts/partials/deprecation-warning.html b/layouts/partials/deprecation-warning.html index 6b5bc1f2e2..14261d73dd 100644 --- a/layouts/partials/deprecation-warning.html +++ b/layouts/partials/deprecation-warning.html @@ -1,6 +1,6 @@ {{ if (.Site.Param "deprecated") }}
-
+

{{ T "deprecation_title" }} {{ .Param "version" }}

diff --git a/layouts/shortcodes/caution.html b/layouts/shortcodes/caution.html index 82563d8c2c..6df243b7c0 100644 --- a/layouts/shortcodes/caution.html +++ b/layouts/shortcodes/caution.html @@ -1,3 +1,3 @@ -
-
{{ T "caution" }} {{ trim .Inner " \n" | markdownify }}
-
+ diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html index eba93f8b7e..8362b1f33f 100644 --- a/layouts/shortcodes/note.html +++ b/layouts/shortcodes/note.html @@ -1,3 +1,3 @@ -
-
{{ T "note" }} {{ trim .Inner " \n" | markdownify }}
-
\ No newline at end of file + \ No newline at end of file diff --git a/layouts/shortcodes/warning.html b/layouts/shortcodes/warning.html index a6a5f67abd..ec4639bd16 100644 --- a/layouts/shortcodes/warning.html +++ b/layouts/shortcodes/warning.html @@ -1,3 +1,4 @@ -
-
{{ T "warning" }} {{ trim .Inner " \n" | markdownify }}
-
+ + From cccf7b21028f24c82a9d41f6d2658b91aec2efc4 Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Wed, 13 Oct 2021 01:25:39 +0100 Subject: [PATCH 028/228] Tweak advice about kubectl skew This change helps make the example apply more relevantly to older docs releases. --- content/en/docs/tasks/tools/install-kubectl-linux.md | 4 ++-- content/en/docs/tasks/tools/install-kubectl-macos.md | 4 ++-- content/en/docs/tasks/tools/install-kubectl-windows.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/docs/tasks/tools/install-kubectl-linux.md b/content/en/docs/tasks/tools/install-kubectl-linux.md index efb203f8b9..4539ed8baf 100644 --- a/content/en/docs/tasks/tools/install-kubectl-linux.md +++ b/content/en/docs/tasks/tools/install-kubectl-linux.md @@ -12,8 +12,8 @@ card: ## {{% heading "prerequisites" %}} -You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew latestVersion >}} client can communicate with v{{< skew prevMinorVersion >}}, v{{< skew latestVersion >}}, and v{{< skew nextMinorVersion >}} control planes. -Using the latest version of kubectl helps avoid unforeseen issues. +You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew currentVersion >}} client can communicate with v{{< skew currentVersionAddMinor -1 >}}, v{{< skew currentVersionAddMinor 0 >}}, and v{{< skew currentVersionAddMinor 1 >}} control planes. +Using the latest compatible version of kubectl helps avoid unforeseen issues. ## Install kubectl on Linux diff --git a/content/en/docs/tasks/tools/install-kubectl-macos.md b/content/en/docs/tasks/tools/install-kubectl-macos.md index b46ab03640..d1ae0acddf 100644 --- a/content/en/docs/tasks/tools/install-kubectl-macos.md +++ b/content/en/docs/tasks/tools/install-kubectl-macos.md @@ -12,8 +12,8 @@ card: ## {{% heading "prerequisites" %}} -You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew latestVersion >}} client can communicate with v{{< skew prevMinorVersion >}}, v{{< skew latestVersion >}}, and v{{< skew nextMinorVersion >}} control planes. -Using the latest version of kubectl helps avoid unforeseen issues. +You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew currentVersion >}} client can communicate with v{{< skew currentVersionAddMinor -1 >}}, v{{< skew currentVersionAddMinor 0 >}}, and v{{< skew currentVersionAddMinor 1 >}} control planes. +Using the latest compatible version of kubectl helps avoid unforeseen issues. ## Install kubectl on macOS diff --git a/content/en/docs/tasks/tools/install-kubectl-windows.md b/content/en/docs/tasks/tools/install-kubectl-windows.md index 8059fa7a3a..b422318326 100644 --- a/content/en/docs/tasks/tools/install-kubectl-windows.md +++ b/content/en/docs/tasks/tools/install-kubectl-windows.md @@ -12,8 +12,8 @@ card: ## {{% heading "prerequisites" %}} -You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew latestVersion >}} client can communicate with v{{< skew prevMinorVersion >}}, v{{< skew latestVersion >}}, and v{{< skew nextMinorVersion >}} control planes. -Using the latest version of kubectl helps avoid unforeseen issues. +You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew currentVersion >}} client can communicate with v{{< skew currentVersionAddMinor -1 >}}, v{{< skew currentVersionAddMinor 0 >}}, and v{{< skew currentVersionAddMinor 1 >}} control planes. +Using the latest compatible version of kubectl helps avoid unforeseen issues. ## Install kubectl on Windows From 1e436f45879e0d6b68c9562f8241edcdb2cd63b0 Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Wed, 13 Oct 2021 22:47:29 +0100 Subject: [PATCH 029/228] Revise page header styles - more compact headers when announcements are showing - when no announcement showing, top level docs sections (eg Concepts, Tasks, Reference) have a heading in the top nav - when announcement is showing, rely on the breadcrumb trail plus page introduction text for each top level section - switch from plain black docs header to match other sections --- assets/scss/_base.scss | 20 +-- assets/scss/_custom.scss | 142 +++++++++++-------- assets/scss/_size.scss | 8 ++ layouts/_default/baseof.html | 11 +- layouts/_default/search.html | 16 +-- layouts/blog/baseof.html | 3 + layouts/docs/baseof.html | 8 +- layouts/docs/docsportal_home.html | 12 +- layouts/docs/list.html | 56 ++++++-- layouts/docs/single.html | 8 ++ layouts/partials/announcement.html | 10 +- layouts/partials/docs/top-section-page.html | 1 + layouts/partials/frontpage-announcement.html | 34 ----- layouts/partials/navbar.html | 2 +- 14 files changed, 182 insertions(+), 149 deletions(-) create mode 100644 layouts/partials/docs/top-section-page.html delete mode 100644 layouts/partials/frontpage-announcement.html diff --git a/assets/scss/_base.scss b/assets/scss/_base.scss index 4113b49bee..97ce27fe28 100644 --- a/assets/scss/_base.scss +++ b/assets/scss/_base.scss @@ -810,11 +810,10 @@ section#cncf { } } -.td-search { - header > .header-filler { - height: $hero-padding-top; - background-color: black; - } +// Header filler size adjustment + +.header-hero.filler { + height: $hero-padding-top; } // Docs specific @@ -859,17 +858,6 @@ section#cncf { /* DOCUMENTATION */ -body.td-documentation { - header > .header-filler { - height: $hero-padding-top; - background-color: black; - } - /* Special case for if an announcement is active */ - header section#announcement ~ .header-filler { - display: none; - } -} - // nav-tabs and tab-content .nav-tabs { border-bottom: none !important; diff --git a/assets/scss/_custom.scss b/assets/scss/_custom.scss index 20a36b6175..fe870bb6ba 100644 --- a/assets/scss/_custom.scss +++ b/assets/scss/_custom.scss @@ -26,6 +26,10 @@ $announcement-size-adjustment: 8px; } } +.header-hero #quickstartButton.button { + margin-top: 1em; +} + section { .main-section { @media only screen and (min-width: 1024px) { @@ -34,8 +38,14 @@ section { } } -.td-outer { - padding: 0 !important; +body { + display: grid; + grid-column-template: auto; + + header + .td-outer { + min-height: 50vh; + height: auto; + } } @@ -548,34 +558,6 @@ main.content { } } -/* ANNOUNCEMENTS */ -section#fp-announcement ~ .header-hero { - padding: $announcement-size-adjustment 0; - - > div { - margin-top: $announcement-size-adjustment; - margin-bottom: $announcement-size-adjustment; - } - - h1, h2, h3, h4, h5 { - margin: $announcement-size-adjustment 0; - } -} - -section#announcement ~ .header-hero { - padding: #{$announcement-size-adjustment / 2} 0; - - > div { - margin-top: #{$announcement-size-adjustment / 2}; - margin-bottom: #{$announcement-size-adjustment / 2}; - padding-bottom: #{$announcement-size-adjustment / 2}; - } - - h1, h2, h3, h4, h5 { - margin: #{$announcement-size-adjustment / 2} 0; - } -} - /* DOCUMENTATION */ /* Don't show lead text */ @@ -601,12 +583,12 @@ body.td-documentation { @media print { /* Do not print announcements */ - #announcement, section#announcement, #fp-announcement, section#fp-announcement { + #announcement { display: none; } } -#announcement, #fp-announcement { +#announcement { > * { color: inherit; background: inherit; @@ -623,42 +605,90 @@ body.td-documentation { } } -#announcement { - padding-top: 105px; - padding-bottom: 25px; -} - .header-hero { padding-top: 40px; } -/* Extra announcement height only for landscape viewports */ -@media (min-aspect-ratio: 8/9) { - #fp-announcement { - min-height: 25vh; - } -} - -#fp-announcement aside { - padding-top: 115px; - padding-bottom: 25px; -} - -.announcement { - .content { +#announcement { + .announcement-main { + margin-left: auto; + margin-right: auto; margin-bottom: 0px; + + // for padding-top see _size.scss + padding-bottom: calc(max(2em, 2rem)); + + max-width: calc(min(1200px - 8em, 80vw)); } - > p { - .gridPage #announcement .content p, - .announcement > h4, - .announcement > h3 { - color: #ffffff; + /* always white */ + h1, h2, h3, h4, h5, h6, p * { + color: #ffffff; + background: transparent; + + img.event-logo { + display: inline-block; + max-height: calc(min(80px, 8em)); + max-width: calc(min(240px, 33vw)); + float: right; } } } +#announcement + .header-hero { + padding-top: 2em; +} + +// Extra padding for anything except wide viewports +@media (min-width: 992px) { + #announcement aside { // more specific + .announcement-main { + padding-top: calc(max(8em, 8rem)); + } + } +} + +@media (max-width: 768px) { + #announcement { + padding-top: 4rem; + padding-bottom: 4rem; + .announcement-main, aside .announcement-main { + padding-top: calc(min(2rem,2em)); + } + } +} + +@media (max-width: 480px) { + #announcement { + padding-bottom: 0.5em; + } + #announcement aside { + h1, h2, h3, h4, h5, h6 { + img.event-logo { + margin-left: auto; + margin-right: auto; + margin-bottom: 0.75em; + display: block; + max-height: initial; + max-width: calc(min(calc(100vw - 2em), 240px)); + float: initial; + } + } + } +} + +#announcement + .header-hero.filler { + display: none; +} + +@media (min-width: 768px) { + #announcement + .header-hero { + display: none; + } +} + + // Match Docsy-imposed max width on text body @media (min-width: 1200px) { body.td-blog main .td-content > figure { diff --git a/assets/scss/_size.scss b/assets/scss/_size.scss index 9f0b7f655f..14d56201c3 100644 --- a/assets/scss/_size.scss +++ b/assets/scss/_size.scss @@ -18,3 +18,11 @@ section, line-height: $vendor-strip-height; font-size: $vendor-strip-font-size; } + +#announcement { + min-height: $hero-padding-top; + + .announcement-main { + padding-top: calc(max(8em, 8rem, #{$hero-padding-top} / 3)); + } +} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 612bddbb2c..456fed5e05 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -6,26 +6,21 @@
{{ partial "navbar.html" . }} -
- {{ block "announcement" . }} - {{ if .IsHome }} - {{ partial "frontpage-announcement.html" . }} - {{ else }} + {{ block "announcement" . }} {{ partial "announcement.html" . }} {{ end }} - {{ end }} {{ block "hero" . }}

{{ block "hero-title" . }}{{ .Params.bigheader | default .Title }}{{ end }}

-
{{ .Params.abstract }}
{{ block "hero-more" . }}{{ end }}
{{ block "post-hero" . }} + {{ block "deprecated" . }} {{ if or .IsHome ( eq .Params.cid "partners" ) ( eq .Params.cid "community" ) }} {{ partial "deprecation-warning.html" . }} @@ -37,8 +32,8 @@
{{ block "main" . }}{{ end }}
- {{ partial "footer.html" . }}
+ {{ partialCached "footer.html" . }} {{ partialCached "scripts.html" . }} \ No newline at end of file diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 286e476de1..70f14c28d9 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -6,15 +6,15 @@
{{ partial "navbar.html" . }} -
-
- {{ block "announcement" . }} - {{ if .IsHome }} - {{ partial "frontpage-announcement.html" . }} - {{ else }} + {{ block "announcement" . }} {{ partial "announcement.html" . }} {{ end }} - {{ end }} + {{ block "hero" . }} +
+
+ {{ block "hero-more" . }}{{ end }} + {{ end }} +
@@ -48,8 +48,8 @@
- {{ partial "footer.html" . }} + {{ partial "footer.html" . }} {{ partialCached "scripts.html" . }} diff --git a/layouts/blog/baseof.html b/layouts/blog/baseof.html index d801da9d8a..4163c5b474 100644 --- a/layouts/blog/baseof.html +++ b/layouts/blog/baseof.html @@ -12,6 +12,7 @@
{{ partial "navbar.html" . }} {{ partial "announcement.html" . }} + {{ block "hero" . }}

{{ $sectionHeading := .Site.GetPage "section" .Section }} @@ -20,6 +21,8 @@ {{ end }}

+ {{ block "hero-more" . }}{{ end }} + {{ end }}
diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 7dae9a6e90..846073bcf1 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -8,7 +8,11 @@
{{ partial "navbar.html" . }} {{ partial "announcement.html" . }} -
+ {{ block "hero" . }} +
+
+ {{ block "hero-more" . }}{{ end }} + {{ end }}
@@ -41,8 +45,8 @@
- {{ partial "footer.html" . }}
+ {{ partial "footer.html" . }} {{ partial "scripts.html" . }} diff --git a/layouts/docs/docsportal_home.html b/layouts/docs/docsportal_home.html index 899e648a68..330197ea1c 100644 --- a/layouts/docs/docsportal_home.html +++ b/layouts/docs/docsportal_home.html @@ -1,7 +1,4 @@ {{ define "main" }} - {{ if not .Params.notitle }} -

{{ .Title }}

- {{ end }} {{ template "docs-portal-content" . }} {{ end }} @@ -19,4 +16,11 @@ -{{ end }} \ No newline at end of file +{{ end }} +{{ define "hero" }} +
+ {{ if not .Params.notitle }} +

{{ .Title }}

+ {{ end }} +
+{{ end }} diff --git a/layouts/docs/list.html b/layouts/docs/list.html index 81403b5396..fc02b249af 100644 --- a/layouts/docs/list.html +++ b/layouts/docs/list.html @@ -1,17 +1,43 @@ {{ define "main" }} -
- {{ $hasContent := false }} - {{ with .File }} - {{ if ne .Filename "" }} - {{ $hasContent = (ge (len $.RawContent) 100) }} - {{ end }} - {{ end }} - {{ if $hasContent }} - {{ partial "docs/content-page" (dict "ctx" $ "page" $ ) }} - {{ else }} -

{{ .Title }}

- {{ with .Params.description }}
{{ . | markdownify }}
{{ end }} - {{ end }} - {{ partial "section-index.html" . }} -
+{{- $child_of_first_section := false -}} +{{- with .Parent -}} +{{- if eq .CurrentSection .FirstSection -}} +{{- $child_of_first_section = true -}} +{{- end -}} +{{- end -}} +
+ {{ $hasContent := false }} + {{ with .File }} + {{ if ne .Filename "" }} + {{ $hasContent = (ge (len $.RawContent) 100) }} + {{ end }} + {{ end }} + {{ if $hasContent }} + {{- if $child_of_first_section -}} + {{ partial "docs/top-section-page" (dict "ctx" $ "page" $ ) }} + {{- else -}} + {{ partial "docs/content-page" (dict "ctx" $ "page" $ ) }} + {{- end -}} + {{ else }} +

{{ .Title }}

+ {{ with .Params.description }}
{{ . | markdownify }}
{{ end }} + {{ end }} + {{ partial "section-index.html" . }} +
+{{ end }} +{{ define "hero" }} +{{- $child_of_first_section := false -}} +{{- with .Parent -}} +{{- if eq .CurrentSection .FirstSection -}} +{{- $child_of_first_section = true -}} +{{- end -}} +{{- end -}} +{{- if $child_of_first_section -}} +
+

{{ .Title }}

+
+{{- else -}} +
+
+{{- end -}} {{ end }} diff --git a/layouts/docs/single.html b/layouts/docs/single.html index dec5eb46b6..935b7fd051 100644 --- a/layouts/docs/single.html +++ b/layouts/docs/single.html @@ -1,4 +1,12 @@ {{ define "main" }}
{{ partial "docs/content-page" (dict "ctx" . "page" .) }} +
+{{ end }} +{{ define "hero-more" }} +{{ if .IsHome }} +{{ with site.GetPage "section" "docs/tutorials/kubernetes-basics" }} +{{ .LinkTitle }} +{{ end }} +{{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/announcement.html b/layouts/partials/announcement.html index b1d68292db..bff71bfe4c 100644 --- a/layouts/partials/announcement.html +++ b/layouts/partials/announcement.html @@ -15,18 +15,18 @@ {{- if or (eq .endTime nil ) (gt ( time .endTime ) now ) -}} {{- if not $announcementShown -}} {{- $announcementShown = true -}} -
+
-
+ {{- end -}} {{- end -}} {{- end -}} diff --git a/layouts/partials/docs/top-section-page.html b/layouts/partials/docs/top-section-page.html new file mode 100644 index 0000000000..69834b3c53 --- /dev/null +++ b/layouts/partials/docs/top-section-page.html @@ -0,0 +1 @@ +{{ .page.Content }} diff --git a/layouts/partials/frontpage-announcement.html b/layouts/partials/frontpage-announcement.html deleted file mode 100644 index e70a387301..0000000000 --- a/layouts/partials/frontpage-announcement.html +++ /dev/null @@ -1,34 +0,0 @@ -{{ $dateRegExp := "^[0-9]{4}-1[0-2]|0[1-9]-(?:3[01]|0[1-9]|[12][0-9])T(?:2[0-3]|[01][0-9]):(?:[0-5][0-9]):(?:60|[0-5][0-9])$" }} -{{ $announcementShown := false }} -{{ range $.Site.Data.announcements }} - {{ range .announcements }} - {{ if or ( eq .endTime nil ) ( eq .message nil ) }} - {{ errorf "Invalid announcement: %#v" . }} - {{ end }} - {{ if and (ne .startTime nil ) (lt ( len ( findRE $dateRegExp .startTime ) ) 1 ) }} - {{ errorf "Invalid announcement start time: %#v" .startTime }} - {{ end }} - {{ if lt ( len ( findRE $dateRegExp .endTime ) ) 1 }} - {{ errorf "Invalid announcement end time: %#v" .endTime }} - {{ end }} - {{ if or (eq .startTime nil ) (lt ( time .startTime ) now ) }} - {{- if or (eq .endTime nil ) (gt ( time .endTime ) now ) -}} - {{- if not $announcementShown -}} - {{- $announcementShown = true -}} -
- -
- {{- end -}} - {{- end -}} - {{- end -}} - {{ end }} -{{ end }} \ No newline at end of file diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 63726a0f7e..ed269dc6b0 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,5 +1,5 @@ {{ $cover := .HasShortcode "blocks/cover" }} -