CKA

Namespace

백셀건전지 2021. 9. 1. 00:01
  • namespace는 k8s 내 가상의 리소스 격리 공간
  • namspace 옵션 주지 않으면 default namespace에 생성됨.
  • kube-system과 kube-public은 k8s에서 자동으로 생성해줌.
  • 외부 ns의 service 도메인은 app.namespace.svc.cluster.local로 호출해야 함.
    • 서비스가 생성될 때 이와 같은 DNS Entry가 생성됨.
    • cluster.local : default domain name of the k8s cluster
    • svc. : subdomain 
  • 리소스의 definition의 metadata.namespace에 추가하면 해당 NS 에 생성됨.
  • kubectl config set-context $(kubectl config current-context) --namespace=dev
    • 기본 ns가 dev로 변경됨.
  • Resource Quota
    • NS별 리소스 제한
    • pod 개수나 CPU/Memory Request/Limit 제한을 설정할 수 있음.

'CKA' 카테고리의 다른 글

Imperative commands  (0) 2021.09.02
Services  (0) 2021.09.02
Deployments  (0) 2021.08.31
Kube-proxy  (0) 2021.08.30
Kubelet  (0) 2021.08.30