[ko] Update outdated files in dev-1.23-ko.2 M74-85
parent
282d9b56d1
commit
6378609cd7
|
@ -76,16 +76,11 @@ cat <<EOF | cfssl genkey - | cfssljson -bare server
|
|||
"192.0.2.24",
|
||||
"10.0.34.2"
|
||||
],
|
||||
"CN": "system:node:my-pod.my-namespace.pod.cluster.local",
|
||||
"CN": "my-pod.my-namespace.pod.cluster.local",
|
||||
"key": {
|
||||
"algo": "ecdsa",
|
||||
"size": 256
|
||||
},
|
||||
"names": [
|
||||
{
|
||||
"O": "system:nodes"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
@ -93,13 +88,13 @@ EOF
|
|||
여기서 `192.0.2.24`는 서비스의 클러스터 IP,
|
||||
`my-svc.my-namespace.svc.cluster.local`은 서비스의 DNS 이름,
|
||||
`10.0.34.2`는 파드의 IP,`my-pod.my-namespace.pod.cluster.local`은
|
||||
파드의 DNS 이름이다. 다음 출력이 표시되어야 한다.
|
||||
파드의 DNS 이름이다. 다음과 비슷한 출력이 표시되어야 한다.
|
||||
|
||||
```
|
||||
2017/03/21 06:48:17 [INFO] generate received request
|
||||
2017/03/21 06:48:17 [INFO] received CSR
|
||||
2017/03/21 06:48:17 [INFO] generating key: ecdsa-256
|
||||
2017/03/21 06:48:17 [INFO] encoded CSR
|
||||
2022/02/01 11:45:32 [INFO] generate received request
|
||||
2022/02/01 11:45:32 [INFO] received CSR
|
||||
2022/02/01 11:45:32 [INFO] generating key: ecdsa-256
|
||||
2022/02/01 11:45:32 [INFO] encoded CSR
|
||||
```
|
||||
|
||||
이 명령은 두 개의 파일을 생성한다. PEM으로
|
||||
|
@ -120,7 +115,7 @@ metadata:
|
|||
name: my-svc.my-namespace
|
||||
spec:
|
||||
request: $(cat server.csr | base64 | tr -d '\n')
|
||||
signerName: kubernetes.io/kubelet-serving
|
||||
signerName: example.com/serving
|
||||
usages:
|
||||
- digital signature
|
||||
- key encipherment
|
||||
|
@ -130,7 +125,7 @@ EOF
|
|||
|
||||
1단계에서 만든 `server.csr` 파일은 base64로 인코딩되고
|
||||
`.spec.request` 필드에 숨겨져 있다.
|
||||
또한 `kubernetes.io/kubelet-serving` 서명자가 서명한
|
||||
또한 예시 `example.com/serving` 서명자가 서명한
|
||||
"digitalSignature", "keyEnciperment" 및 "serverAuth" 키 사용(keyUsage)이 있는 인증서를 요청한다.
|
||||
특정 `signerName`을 요청해야 한다.
|
||||
자세한 내용은 [지원되는 서명자 이름](/docs/reference/access-authn-authz/certificate-signing-requests/#signers)
|
||||
|
@ -147,14 +142,16 @@ kubectl describe csr my-svc.my-namespace
|
|||
Name: my-svc.my-namespace
|
||||
Labels: <none>
|
||||
Annotations: <none>
|
||||
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: <none>
|
||||
|
@ -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 <none> Approved
|
||||
```
|
||||
|
||||
다음을 실행하여 발급된 인증서를 다운로드하고 `server.crt` 파일에
|
||||
저장할 수 있다.
|
||||
이는 즉 인증서 요청이 승인되었으며
|
||||
요청받은 서명자의 서명을 기다리고 있음을 나타낸다.
|
||||
|
||||
## 인증서 서명 요청에 서명하기
|
||||
|
||||
다음으로, 인증서 서명자로서, 인증서를 발급하고, 이를 API에 업로드할 것이다.
|
||||
|
||||
서명자는 일반적으로 인증서 서명 요청 API를 조회하여 오브젝트의 `signerName`을 확인하고,
|
||||
요청이 승인되었는지 체크하고, 해당 요청에 대해 인증서에 서명하고,
|
||||
발급된 인증서로 API 오브젝트 상태를 업데이트한다.
|
||||
|
||||
### 인증 기관 생성하기
|
||||
|
||||
먼저: 다음을 실행하여 서명 인증서를 생성한다.
|
||||
|
||||
```shell
|
||||
cat <<EOF | cfssl gencert -initca - | cfssljson -bare ca
|
||||
{
|
||||
"CN": "My Example Signer",
|
||||
"key": {
|
||||
"algo": "rsa",
|
||||
"size": 2048
|
||||
}
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
출력은 다음과 같을 것이다.
|
||||
|
||||
```none
|
||||
2022/02/01 11:50:39 [INFO] generating a new CA key and certificate from CSR
|
||||
2022/02/01 11:50:39 [INFO] generate received request
|
||||
2022/02/01 11:50:39 [INFO] received CSR
|
||||
2022/02/01 11:50:39 [INFO] generating key: rsa-2048
|
||||
2022/02/01 11:50:39 [INFO] encoded CSR
|
||||
2022/02/01 11:50:39 [INFO] signed certificate with serial number 263983151013686720899716354349605500797834580472
|
||||
```
|
||||
|
||||
이제 인증 기관 키 파일(`ca-key.pem`)과 인증서(`ca.pem`)가 생성되었다.
|
||||
|
||||
### 인증서 발급하기
|
||||
|
||||
{{< codenew file="tls/server-signing-config.json" >}}
|
||||
|
||||
`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 <none> 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
|
||||
```
|
||||
|
||||
## 인증서 서명 요청 승인
|
||||
|
||||
|
|
|
@ -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)가 있는 경우, 해당 앨리어스로 작업하도록 셸 자동 완성을 확장할 수 있다.
|
||||
|
||||
|
|
|
@ -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 자동 완성 기능이 작동할 것이다.
|
|
@ -52,7 +52,7 @@ card:
|
|||
kubectl 바이너리를 체크섬 파일을 통해 검증한다.
|
||||
|
||||
```bash
|
||||
echo "$(<kubectl.sha256) kubectl" | sha256sum --check
|
||||
echo "$(<kubectl.sha256) kubectl" | sha256sum --check
|
||||
```
|
||||
|
||||
검증이 성공한다면, 출력은 다음과 같다.
|
||||
|
@ -85,7 +85,7 @@ card:
|
|||
chmod +x kubectl
|
||||
mkdir -p ~/.local/bin/kubectl
|
||||
mv ./kubectl ~/.local/bin/kubectl
|
||||
# 그리고 ~/.local/bin/kubectl을 $PATH에 추가
|
||||
# 그리고 ~/.local/bin 을 $PATH의 앞부분 또는 뒷부분에 추가
|
||||
```
|
||||
|
||||
{{< /note >}}
|
||||
|
@ -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. 바이너리를 검증한다. (선택 사항)
|
||||
|
|
|
@ -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 >}}
|
||||
|
||||
|
|
|
@ -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. 플러그인이 정상적으로 설치되었는지 확인한다.
|
||||
|
||||
|
|
|
@ -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" %}}
|
||||
|
||||
튜토리얼을 작성하고 싶다면, 튜토리얼 페이지 유형에 대한 정보가 있는
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "클러스터"
|
||||
weight: 60
|
||||
---
|
||||
|
|
@ -2,3 +2,5 @@
|
|||
title: 클러스터 생성하기
|
||||
weight: 10
|
||||
---
|
||||
|
||||
쿠버네티스 {{< glossary_tooltip text="클러스터" term_id="cluster" length="all" >}}에 대한 내용을 확인하고 Minikube를 사용하여 간단한 클러스터를 생성해 본다.
|
||||
|
|
|
@ -3,7 +3,7 @@ kind: CronJob
|
|||
metadata:
|
||||
name: hello
|
||||
spec:
|
||||
schedule: "*/1 * * * *"
|
||||
schedule: "* * * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
|
|
|
@ -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
|
||||
claimName: test-nfs-claim
|
||||
|
|
|
@ -5,6 +5,7 @@ metadata:
|
|||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
spec:
|
||||
ingressClassName: nginx-example
|
||||
rules:
|
||||
- http:
|
||||
paths:
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"signing": {
|
||||
"default": {
|
||||
"usages": [
|
||||
"digital signature",
|
||||
"key encipherment",
|
||||
"server auth"
|
||||
],
|
||||
"expiry": "876000h",
|
||||
"ca_constraint": {
|
||||
"is_ca": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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/#정적-프로비저닝)이
|
||||
필요하다.
|
||||
|
|
|
@ -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/) 페이지를 참조한다.
|
||||
|
||||
## 지원되는 버전 차이
|
||||
|
||||
|
|
Loading…
Reference in New Issue