From 6378609cd77328be74e9e377ebf50d72a66a8564 Mon Sep 17 00:00:00 2001 From: Jihoon Seo Date: Thu, 24 Feb 2022 14:24:58 +0900 Subject: [PATCH] [ko] Update outdated files in dev-1.23-ko.2 M74-85 --- .../tasks/tls/managing-tls-in-a-cluster.md | 157 +++++++++++++++--- .../optional-kubectl-configs-bash-linux.md | 21 ++- .../included/optional-kubectl-configs-fish.md | 15 ++ .../docs/tasks/tools/install-kubectl-linux.md | 9 +- .../docs/tasks/tools/install-kubectl-macos.md | 3 +- .../tasks/tools/install-kubectl-windows.md | 4 +- content/ko/docs/tutorials/_index.md | 9 +- content/ko/docs/tutorials/clusters/_index.md | 5 - .../create-cluster/_index.md | 2 + .../ko/examples/application/job/cronjob.yaml | 2 +- .../examples/pods/storage/pv-duplicate.yaml | 6 +- .../service/networking/minimal-ingress.yaml | 1 + .../examples/tls/server-signing-config.json | 15 ++ .../includes/default-storage-class-prereqs.md | 8 +- content/ko/releases/version-skew-policy.md | 4 +- 15 files changed, 195 insertions(+), 66 deletions(-) create mode 100644 content/ko/docs/tasks/tools/included/optional-kubectl-configs-fish.md delete mode 100644 content/ko/docs/tutorials/clusters/_index.md create mode 100644 content/ko/examples/tls/server-signing-config.json diff --git a/content/ko/docs/tasks/tls/managing-tls-in-a-cluster.md b/content/ko/docs/tasks/tls/managing-tls-in-a-cluster.md index 0522a58993..3d8c4d5942 100644 --- a/content/ko/docs/tasks/tls/managing-tls-in-a-cluster.md +++ b/content/ko/docs/tasks/tls/managing-tls-in-a-cluster.md @@ -76,16 +76,11 @@ cat < Annotations: -CreationTimestamp: Tue, 21 Mar 2017 07:03:51 -0700 +CreationTimestamp: Tue, 01 Feb 2022 11:49:15 -0500 Requesting User: yourname@example.com +Signer: example.com/serving Status: Pending Subject: - Common Name: my-svc.my-namespace.svc.cluster.local + Common Name: my-pod.my-namespace.pod.cluster.local Serial Number: Subject Alternative Names: - DNS Names: my-svc.my-namespace.svc.cluster.local + DNS Names: my-pod.my-namespace.pod.cluster.local + my-svc.my-namespace.svc.cluster.local IP Addresses: 192.0.2.24 10.0.34.2 Events: @@ -175,30 +172,136 @@ kubectl certificate approve my-svc.my-namespace certificatesigningrequest.certificates.k8s.io/my-svc.my-namespace approved ``` - -## 인증서 다운로드 및 사용 - -CSR이 서명되고 승인되면 다음이 표시된다. +출력은 다음과 같을 것이다. ```shell kubectl get csr ``` ```none -NAME AGE REQUESTOR CONDITION -my-svc.my-namespace 10m yourname@example.com Approved,Issued +NAME AGE SIGNERNAME REQUESTOR REQUESTEDDURATION CONDITION +my-svc.my-namespace 10m example.com/serving yourname@example.com Approved ``` -다음을 실행하여 발급된 인증서를 다운로드하고 `server.crt` 파일에 -저장할 수 있다. +이는 즉 인증서 요청이 승인되었으며 +요청받은 서명자의 서명을 기다리고 있음을 나타낸다. + +## 인증서 서명 요청에 서명하기 + +다음으로, 인증서 서명자로서, 인증서를 발급하고, 이를 API에 업로드할 것이다. + +서명자는 일반적으로 인증서 서명 요청 API를 조회하여 오브젝트의 `signerName`을 확인하고, +요청이 승인되었는지 체크하고, 해당 요청에 대해 인증서에 서명하고, +발급된 인증서로 API 오브젝트 상태를 업데이트한다. + +### 인증 기관 생성하기 + +먼저: 다음을 실행하여 서명 인증서를 생성한다. + +```shell +cat <}} + +`server-signing-config.json` 서명 구성 파일, 인증 기관 키 파일 및 인증서를 사용하여 +인증서 요청에 서명한다. + +```shell +kubectl get csr my-svc.my-namespace -o jsonpath='{.spec.request}' | \ + base64 --decode | \ + cfssl sign -ca ca.pem -ca-key ca-key.pem -config server-signing-config.json - | \ + cfssljson -bare ca-signed-server +``` + +출력은 다음과 같을 것이다. + +``` +2022/02/01 11:52:26 [INFO] signed certificate with serial number 576048928624926584381415936700914530534472870337 +``` + +이제 서명된 제공(serving) 인증서 파일 `ca-signed-server.pem`이 생성되었다. + +### 서명된 인증서 업로드하기 + +마지막으로, 서명된 인증서를 API 오브젝트의 상태에 기재한다. + +```shell +kubectl get csr my-svc.my-namespace -o json | \ + jq '.status.certificate = "'$(base64 ca-signed-server.pem | tr -d '\n')'"' | \ + kubectl replace --raw /apis/certificates.k8s.io/v1/certificatesigningrequests/my-svc.my-namespace/status -f - +``` + +{{< note >}} +위의 명령에서 `.status.certificate` 필드에 base64로 인코딩된 내용을 채우기 위해 [jq](https://stedolan.github.io/jq/) 명령줄 도구를 사용하였다. +`jq`가 없다면, JSON 출력을 파일에 저장하고, 해당 필드를 수동으로 채우고, 그 결과 파일을 업로드할 수도 있다. +{{< /note >}} + +인증서 서명 요청이 승인되고 서명된 인증서가 업로드되면 다음과 같은 출력을 볼 수 있을 것이다. + +```shell +kubectl get csr +``` + +```none +NAME AGE SIGNERNAME REQUESTOR REQUESTEDDURATION CONDITION +my-svc.my-namespace 20m example.com/serving yourname@example.com Approved,Issued +``` + +## 인증서 다운로드 및 사용 + +이제, 요청하는 사용자로서, 다음 명령을 실행하여 +발급된 인증서를 다운로드하고 `server.crt` 파일에 저장할 수 있다. ```shell kubectl get csr my-svc.my-namespace -o jsonpath='{.status.certificate}' \ | base64 --decode > server.crt ``` -이제 `server.crt` 및 `server-key.pem`을 키페어(keypair)로 사용하여 -HTTPS 서버를 시작할 수 있다. +이제 `server.crt` 및 `server-key.pem`의 내용으로 시크릿을 생성하고 파드에 마운트하여 +HTTPS 서버를 시작하는 데 필요한 키페어로 사용할 수 있다. + +```shell +kubectl create secret tls server --cert server.crt --key server-key.pem +``` + +```none +secret/server created +``` + +마지막으로, `ca.pem`의 내용으로 컨피그맵을 생성하여 +제공(serving) 인증서 검증에 필요한 신뢰 루트로 사용할 수 있다. + +```shell +kubectl create configmap example-serving-ca --from-file ca.crt=ca.pem +``` + +```none +configmap/example-serving-ca created +``` ## 인증서 서명 요청 승인 diff --git a/content/ko/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md b/content/ko/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md index b9597857bb..e7ce12f559 100644 --- a/content/ko/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md +++ b/content/ko/docs/tasks/tools/included/optional-kubectl-configs-bash-linux.md @@ -26,19 +26,18 @@ source /usr/share/bash-completion/bash_completion ### kubectl 자동 완성 활성화 +#### Bash + 이제 kubectl 자동 완성 스크립트가 모든 셸 세션에서 제공되도록 해야 한다. 이를 수행할 수 있는 두 가지 방법이 있다. -- `~/.bashrc` 파일에서 자동 완성 스크립트를 소싱한다. - - ```bash - echo 'source <(kubectl completion bash)' >>~/.bashrc - ``` - -- 자동 완성 스크립트를 `/etc/bash_completion.d` 디렉터리에 추가한다. - - ```bash - kubectl completion bash >/etc/bash_completion.d/kubectl - ``` +{{< tabs name="kubectl_bash_autocompletion" >}} +{{{< tab name="현재 사용자에만 적용" codelang="bash" >}} +echo 'source <(kubectl completion bash)' >>~/.bashrc +{{< /tab >}} +{{< tab name="시스템 전체에 적용" codelang="bash" >}} +kubectl completion bash | sudo tee /etc/bash_completion.d/kubectl > /dev/null +{{< /tab >}}} +{{< /tabs >}} kubectl에 대한 앨리어스(alias)가 있는 경우, 해당 앨리어스로 작업하도록 셸 자동 완성을 확장할 수 있다. diff --git a/content/ko/docs/tasks/tools/included/optional-kubectl-configs-fish.md b/content/ko/docs/tasks/tools/included/optional-kubectl-configs-fish.md new file mode 100644 index 0000000000..bfdb53bec0 --- /dev/null +++ b/content/ko/docs/tasks/tools/included/optional-kubectl-configs-fish.md @@ -0,0 +1,15 @@ +--- +title: "fish auto-completion" +description: "fish 자동 완성을 활성화하기 위한 선택적 구성" +headless: true +--- + +Fish용 kubectl 자동 완성 스크립트는 `kubectl completion fish` 명령으로 생성할 수 있다. 셸에서 자동 완성 스크립트를 소싱하면 kubectl 자동 완성 기능이 활성화된다. + +모든 셸 세션에서 사용하려면, `~/.config/fish/config.fish` 파일에 다음을 추가한다. + +```shell +kubectl completion fish | source +``` + +셸을 다시 로드하면, kubectl 자동 완성 기능이 작동할 것이다. diff --git a/content/ko/docs/tasks/tools/install-kubectl-linux.md b/content/ko/docs/tasks/tools/install-kubectl-linux.md index 08887c1063..06193399ba 100644 --- a/content/ko/docs/tasks/tools/install-kubectl-linux.md +++ b/content/ko/docs/tasks/tools/install-kubectl-linux.md @@ -52,7 +52,7 @@ card: kubectl 바이너리를 체크섬 파일을 통해 검증한다. ```bash - echo "$(}} @@ -178,10 +178,11 @@ kubectl version --client kubectl은 Bash, Zsh, Fish, 및 PowerShell에 대한 자동 완성 지원을 제공하므로 입력을 위한 타이핑을 많이 절약할 수 있다. -다음은 Bash 및 Zsh에 대한 자동 완성을 설정하는 절차이다. +다음은 Bash, Fish, 및 Zsh에 대한 자동 완성을 설정하는 절차이다. {{< tabs name="kubectl_autocompletion" >}} {{< tab name="Bash" include="included/optional-kubectl-configs-bash-linux.md" />}} +{{< tab name="Fish" include="included/optional-kubectl-configs-fish.md" />}} {{< tab name="Zsh" include="included/optional-kubectl-configs-zsh.md" />}} {{< /tabs >}} @@ -192,7 +193,7 @@ kubectl은 Bash, Zsh, Fish, 및 PowerShell에 대한 자동 완성 지원을 제 1. 다음 명령으로 최신 릴리스를 다운로드한다. ```bash - curl -LO https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert" ``` 1. 바이너리를 검증한다. (선택 사항) diff --git a/content/ko/docs/tasks/tools/install-kubectl-macos.md b/content/ko/docs/tasks/tools/install-kubectl-macos.md index 59e648dc1b..746bc1059f 100644 --- a/content/ko/docs/tasks/tools/install-kubectl-macos.md +++ b/content/ko/docs/tasks/tools/install-kubectl-macos.md @@ -161,10 +161,11 @@ macOS에서 [Macports](https://macports.org/) 패키지 관리자를 사용하 kubectl은 Bash, Zsh, Fish, 및 PowerShell에 대한 자동 완성 지원을 제공하므로 입력을 위한 타이핑을 많이 절약할 수 있다. -다음은 Bash 및 Zsh에 대한 자동 완성을 설정하는 절차이다. +다음은 Bash, Fish, 및 Zsh에 대한 자동 완성을 설정하는 절차이다. {{< tabs name="kubectl_autocompletion" >}} {{< tab name="Bash" include="included/optional-kubectl-configs-bash-mac.md" />}} +{{< tab name="Fish" include="included/optional-kubectl-configs-fish.md" />}} {{< tab name="Zsh" include="included/optional-kubectl-configs-zsh.md" />}} {{< /tabs >}} diff --git a/content/ko/docs/tasks/tools/install-kubectl-windows.md b/content/ko/docs/tasks/tools/install-kubectl-windows.md index 205849e9f2..ada7861e5d 100644 --- a/content/ko/docs/tasks/tools/install-kubectl-windows.md +++ b/content/ko/docs/tasks/tools/install-kubectl-windows.md @@ -59,7 +59,7 @@ card: $($(CertUtil -hashfile .\kubectl.exe SHA256)[1] -replace " ", "") -eq $(type .\kubectl.exe.sha256) ``` -1. `PATH`로 설정된 디렉터리 중 하나에 kubectl 바이너리를 추가한다. +1. kubectl 바이너리가 있는 폴더를 `PATH` 환경 변수의 앞부분 또는 뒷부분에 추가 1. `kubectl` 의 버전이 다운로드한 버전과 같은지 확인한다. @@ -172,7 +172,7 @@ kubectl은 Bash, Zsh, Fish, 및 PowerShell에 대한 자동 완성 지원을 제 $($(CertUtil -hashfile .\kubectl-convert.exe SHA256)[1] -replace " ", "") -eq $(type .\kubectl-convert.exe.sha256) ``` -1. `PATH`로 설정된 디렉터리 중 하나에 kubectl-convert 바이너리를 추가한다. +1. kubectl 바이너리가 있는 폴더를 `PATH` 환경 변수의 앞부분 또는 뒷부분에 추가 1. 플러그인이 정상적으로 설치되었는지 확인한다. diff --git a/content/ko/docs/tutorials/_index.md b/content/ko/docs/tutorials/_index.md index fd3c8a7b45..c929b54196 100644 --- a/content/ko/docs/tutorials/_index.md +++ b/content/ko/docs/tutorials/_index.md @@ -47,12 +47,6 @@ content_type: concept * [분산 시스템 코디네이터 ZooKeeper 실행하기](/ko/docs/tutorials/stateful-application/zookeeper/) -## 클러스터 - -* [AppArmor](/ko/docs/tutorials/clusters/apparmor/) - -* [seccomp](/docs/tutorials/clusters/seccomp/) - ## 서비스 * [소스 IP 주소 이용하기](/ko/docs/tutorials/services/source-ip/) @@ -61,7 +55,8 @@ content_type: concept * [파드 보안 표준을 클러스터 수준으로 적용하기](/docs/tutorials/security/cluster-level-pss/) * [파드 보안 표준을 네임스페이스 수준으로 적용하기](/docs/tutorials/security/ns-level-pss/) - +* [AppArmor](/ko/docs/tutorials/security/apparmor/) +* [seccomp](/docs/tutorials/security/seccomp/) ## {{% heading "whatsnext" %}} 튜토리얼을 작성하고 싶다면, 튜토리얼 페이지 유형에 대한 정보가 있는 diff --git a/content/ko/docs/tutorials/clusters/_index.md b/content/ko/docs/tutorials/clusters/_index.md deleted file mode 100644 index 70df366b86..0000000000 --- a/content/ko/docs/tutorials/clusters/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "클러스터" -weight: 60 ---- - diff --git a/content/ko/docs/tutorials/kubernetes-basics/create-cluster/_index.md b/content/ko/docs/tutorials/kubernetes-basics/create-cluster/_index.md index 3f5c525b0b..9428c38770 100644 --- a/content/ko/docs/tutorials/kubernetes-basics/create-cluster/_index.md +++ b/content/ko/docs/tutorials/kubernetes-basics/create-cluster/_index.md @@ -2,3 +2,5 @@ title: 클러스터 생성하기 weight: 10 --- + +쿠버네티스 {{< glossary_tooltip text="클러스터" term_id="cluster" length="all" >}}에 대한 내용을 확인하고 Minikube를 사용하여 간단한 클러스터를 생성해 본다. diff --git a/content/ko/examples/application/job/cronjob.yaml b/content/ko/examples/application/job/cronjob.yaml index da905a9048..9f06ca7bd6 100644 --- a/content/ko/examples/application/job/cronjob.yaml +++ b/content/ko/examples/application/job/cronjob.yaml @@ -3,7 +3,7 @@ kind: CronJob metadata: name: hello spec: - schedule: "*/1 * * * *" + schedule: "* * * * *" jobTemplate: spec: template: diff --git a/content/ko/examples/pods/storage/pv-duplicate.yaml b/content/ko/examples/pods/storage/pv-duplicate.yaml index 15a48acbed..e5a0e6ff69 100644 --- a/content/ko/examples/pods/storage/pv-duplicate.yaml +++ b/content/ko/examples/pods/storage/pv-duplicate.yaml @@ -8,13 +8,15 @@ spec: - name: test image: nginx volumeMounts: - - name: site-data + # a mount for site-data + - name: config mountPath: /usr/share/nginx/html subPath: html + # another mount for nginx config - name: config mountPath: /etc/nginx/nginx.conf subPath: nginx.conf volumes: - name: config persistentVolumeClaim: - claimName: test-nfs-claim \ No newline at end of file + claimName: test-nfs-claim diff --git a/content/ko/examples/service/networking/minimal-ingress.yaml b/content/ko/examples/service/networking/minimal-ingress.yaml index 76640b9447..55a5837510 100644 --- a/content/ko/examples/service/networking/minimal-ingress.yaml +++ b/content/ko/examples/service/networking/minimal-ingress.yaml @@ -5,6 +5,7 @@ metadata: annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: + ingressClassName: nginx-example rules: - http: paths: diff --git a/content/ko/examples/tls/server-signing-config.json b/content/ko/examples/tls/server-signing-config.json new file mode 100644 index 0000000000..86860d7369 --- /dev/null +++ b/content/ko/examples/tls/server-signing-config.json @@ -0,0 +1,15 @@ +{ + "signing": { + "default": { + "usages": [ + "digital signature", + "key encipherment", + "server auth" + ], + "expiry": "876000h", + "ca_constraint": { + "is_ca": false + } + } + } +} \ No newline at end of file diff --git a/content/ko/includes/default-storage-class-prereqs.md b/content/ko/includes/default-storage-class-prereqs.md index 217ac92922..32731d1d2d 100644 --- a/content/ko/includes/default-storage-class-prereqs.md +++ b/content/ko/includes/default-storage-class-prereqs.md @@ -1,5 +1,5 @@ -여기에서 사용된 [퍼시스턴트볼륨클레임](/docs/user-guide/persistent-volumes/#persistentvolumeclaims)을 만족하기 위하여, -기본 [스토리지클래스](/ko/docs/concepts/storage/storage-classes/)나 -[정적으로(statically) 프로비저닝 된 퍼시스턴트볼륨](/docs/user-guide/persistent-volumes/#provisioning)을 -갖는 퍼시스턴트 볼륨 프로비저너가 +여기에서 사용된 [퍼시스턴트볼륨클레임](/ko/docs/concepts/storage/persistent-volumes/#퍼시스턴트볼륨클레임)을 만족하기 위하여, +기본 [스토리지클래스](/ko/docs/concepts/storage/storage-classes/)가 설정되어 있는 상태의 +[동적 퍼시스턴트볼륨 프로비저너](/ko/docs/concepts/storage/dynamic-provisioning/), 또는 +[정적으로(statically) 프로비저닝된 퍼시스턴트볼륨](/ko/docs/concepts/storage/persistent-volumes/#정적-프로비저닝)이 필요하다. diff --git a/content/ko/releases/version-skew-policy.md b/content/ko/releases/version-skew-policy.md index dba98dcdf8..ef68b0b341 100644 --- a/content/ko/releases/version-skew-policy.md +++ b/content/ko/releases/version-skew-policy.md @@ -28,9 +28,9 @@ description: > 보안 수정사항을 포함한 해당 수정사항은 심각도와 타당성에 따라 세 개의 릴리스 브랜치로 백포트(backport) 될 수 있다. 패치 릴리스는 각 브랜치별로 [정기적인 주기](https://git.k8s.io/sig-release/releases/patch-releases.md#cadence)로 제공하며, 필요한 경우 추가 긴급 릴리스도 추가한다. -[릴리스 관리자](https://git.k8s.io/sig-release/release-managers.md) 그룹이 이러한 결정 권한을 가진다. +[릴리스 관리자](/releases/release-managers/) 그룹이 이러한 결정 권한을 가진다. -자세한 내용은 쿠버네티스 [패치 릴리스](https://git.k8s.io/sig-release/releases/patch-releases.md) 페이지를 참조한다. +자세한 내용은 쿠버네티스 [패치 릴리스](/releases/patch-releases/) 페이지를 참조한다. ## 지원되는 버전 차이