k8s_course

(★ 18)

180-The Kubernetes Odyssey: A Multi-Track Journey from Zero to Production Hero Course - Lesson Generation Prompt

파일 탐색기

  • README.md

# CDN으로 사용하기

jsDelivr

jsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.

명령어 용어집

이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.

🔍

docker logs

설명 보기 ▼

This command is an alias of `docker container logs`.

tldr docker container logs

View documentation for the original command:

🔍

kind

설명 보기 ▼

Docker 컨테이너 "노드"를 사용하여 로컬 Kubernetes 클러스터를 실행.
Kubernetes 자체 테스트를 위해 설계되었으나, 로컬 개발이나 지속적 통합에도 사용 가능.
더 많은 정보: <https://github.com/kubernetes-sigs/kind>.

kind create cluster --name {{cluster_name}}

로컬 Kubernetes 클러스터 생성:

kind delete clusters {{cluster_name}}

하나 이상의 클러스터 삭제:

kind get {{clusters|nodes|kubeconfig}}

클러스터, 노드 또는 kubeconfig에 대한 세부 정보 가져오기:

🔍

kubeadm

설명 보기 ▼

Kubernetes 클러스터를 생성하고 관리하기 위한 명령줄 인터페이스.
더 많은 정보: <https://kubernetes.io/docs/reference/setup-tools/kubeadm/>.

kubeadm init

Kubernetes 마스터 노드 생성:

kubeadm join --token {{token}}

Kubernetes 워커 노드를 부트스트랩하고 클러스터에 가입:

kubeadm token create --ttl {{12h0m0s}}

TTL이 12시간인 새로운 부트스트랩 토큰 생성:

🔍

kubectl describe

설명 보기 ▼

Show details of Kubernetes resources.

kubectl describe {{[po|pods]}} {{[-n|--namespace]}} {{namespace}}

Show details of pods in a namespace:

kubectl describe {{[no|nodes]}} {{[-n|--namespace]}} {{namespace}}

Show details of nodes in a namespace:

kubectl describe {{[po|pods]}} {{pod_name}} {{[-n|--namespace]}} {{namespace}}

Show the details of a specific pod in a namespace:

🔍

kubectl logs

설명 보기 ▼

Show logs for containers in a pod.

kubectl logs {{pod_name}}

Show logs for a single-container pod:

kubectl logs {{[-c|--container]}} {{container_name}} {{pod_name}}

Show logs for a specified container in a pod:

kubectl logs --all-containers={{true}} {{pod_name}}

Show logs for all containers in a pod:

🔍

kubectl port-forward

설명 보기 ▼

Forward one or more local ports to a pod.

kubectl port-forward {{[po|pods]}}/{{pod_name}} 5000 6000

Forward local ports 5000 and 6000 to the pod ports 5000 and 6000:

kubectl port-forward {{[po|pods]}}/{{pod_name}} :5000

Forward a random local port to the pod port 5000:

kubectl port-forward {{[deploy|deployment]}}/{{deployment_name}} 5000 6000

Forward local ports 5000 and 6000 to the deployment ports 5000 and 6000:

🔍

kubectl

설명 보기 ▼

Kubernetes 클러스터에서 명령을 실행하기 위한 명령줄 인터페이스.
`run`과 같은 일부 하위 명령에는 자체 사용 설명서가 있습니다.
더 많은 정보: <https://kubernetes.io/docs/reference/kubectl/>.

kubectl get {{pods|service|deployment|ingress|...}} {{[-o|--output]}} wide

리소스에 대한 정보를 자세히 나열:

kubectl label pods {{name}} unhealthy=true

지정된 포드에 'unhealthy' 레이블과 'true' 값을 추가:

kubectl get all

다양한 유형의 모든 리소스 나열:

🔍

trivy

설명 보기 ▼

컨테이너 이미지, 파일 시스템 및 Git 저장소의 취약점과 구성 문제를 스캔하는 도구.
더 많은 정보: <https://trivy.dev/docs/latest/guide/references/configuration/cli/trivy/>.

trivy image {{image:tag}}

Docker 이미지를 취약점 및 노출된 비밀 키에 대해 스캔:

trivy image {{[-s|--severity]}} {{HIGH,CRITICAL}} {{alpine:3.15}}

심각도에 따라 출력 결과를 필터링하여 Docker 이미지 스캔:

trivy image --ignore-unfixed {{alpine:3.15}}

수정되지 않거나 패치되지 않은 취약점을 무시하고 Docker 이미지 스캔:

// repository documentation