KILLERCODA - CKAD - Kubectl Contexts 오답노트

hyereen·2025년 1월 31일

Kubernetes

목록 보기
38/53

1
A kubectl context contains connection information to a Kubernetes cluster. Different kubectl contexts can connect to different Kubernetes clusters, or to the same cluster but using different users or different default namespaces.
List all available kubectl contexts and write the output to /root/contexts .

정답

k config get-contexts
k config get-contexts > /root/contexts

2
Switch to context purple and list all Pods.

정답

k config use-context purple
k get pod

풀이

  • set-context는 context를 설정하거나 변경하는 데 사용
  • use-context는 특정 context를 활성화하여 현재 사용 중인 context로 설정하는 데 사용

0개의 댓글