- Created by Sansae, last modified on Mar 06, 2024
목차
Namespce 개요
- 단일 클러스터 내에서의 리소스 그룹 격리 메커니즘
https://stacksimplify.com/azure-aks/azure-kubernetes-service-namespaces-imperative/
Initial Namespaces
- default (defalut)
- namespce를 생성하지 않고도 새 클러스터를 사용 할 수 있다.
- kube-node-lease
- 네임스페이스는 Kubernetes 클러스터의 노드 간 통신을 위한 정보를 유지 관리하는 데 사용됩니다.
- 클러스터가 자동으로 관리하며, 사용자가 직접 수정하거나 변경할 필요는 없습니다.
- kube-public
- 이 네임스페이스에 저장된 리소스는 모든 사용자가 조회할 수 있습니다. 일반적으로 클러스터 정보를 공유하거나 일부 시스템 구성 정보를 저장하는 데 사용됩니다.
- 사용자가 직접 수정할 필요 없으며, 클러스터 관리자가 관리 합니다.
- kube-system
- kubernetes시스템에서 생성한 오프젝트
sansae@sansaeAir15m2 k8s-lab-workspace % k get ns NAME STATUS AGE aks-command Active 45h calico-system Active 2d1h default Active 2d1h kube-node-lease Active 2d1h kube-public Active 2d1h kube-system Active 2d1h tigera-operator Active 2d1h
kube-system Expand source
sansae@sansaeAir15m2 k8s-lab-workspace % k get all -n kube-system NAME READY STATUS RESTARTS AGE pod/ama-logs-j7qth 3/3 Running 0 3h10m pod/ama-logs-rs-5ff7974589-dm4bb 2/2 Running 0 3h10m pod/ama-metrics-5c788bc657-6vbhm 2/2 Running 1 (3h7m ago) 3h10m pod/ama-metrics-ksm-645c45cb94-4wh8m 1/1 Running 2 (3h9m ago) 3h10m pod/ama-metrics-node-wwhf9 2/2 Running 1 (3h8m ago) 3h10m pod/cloud-node-manager-jnjmr 1/1 Running 0 3h10m pod/coredns-789789675-8vrmw 1/1 Running 0 3h10m pod/coredns-789789675-prdpm 1/1 Running 0 3h8m pod/coredns-autoscaler-649b947bbd-bhblb 1/1 Running 0 3h10m pod/csi-azuredisk-node-vnkwq 3/3 Running 0 3h10m pod/csi-azurefile-node-t8694 3/3 Running 0 3h10m pod/konnectivity-agent-f9b696ddb-76cqd 1/1 Running 0 3h10m pod/konnectivity-agent-f9b696ddb-l444h 1/1 Running 0 3h8m pod/kube-proxy-v58v6 1/1 Running 0 3h10m pod/metrics-server-5fffcb8954-pw8qp 2/2 Running 0 3h5m pod/metrics-server-5fffcb8954-r2p85 2/2 Running 0 3h5m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/ama-metrics-ksm ClusterIP 10.0.177.113 <none> 8080/TCP 2d1h service/kube-dns ClusterIP 10.0.0.10 <none> 53/UDP,53/TCP 2d1h service/metrics-server ClusterIP 10.0.135.169 <none> 443/TCP 2d1h NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE daemonset.apps/ama-logs 1 1 1 1 1 <none> 2d1h daemonset.apps/ama-logs-windows 0 0 0 0 0 <none> 2d1h daemonset.apps/ama-metrics-node 1 1 1 1 1 <none> 2d1h daemonset.apps/ama-metrics-win-node 0 0 0 0 0 <none> 2d1h daemonset.apps/cloud-node-manager 1 1 1 1 1 <none> 2d1h daemonset.apps/cloud-node-manager-windows 0 0 0 0 0 <none> 2d1h daemonset.apps/csi-azuredisk-node 1 1 1 1 1 <none> 2d1h daemonset.apps/csi-azuredisk-node-win 0 0 0 0 0 <none> 2d1h daemonset.apps/csi-azurefile-node 1 1 1 1 1 <none> 2d1h daemonset.apps/csi-azurefile-node-win 0 0 0 0 0 <none> 2d1h daemonset.apps/kube-proxy 1 1 1 1 1 <none> 2d1h NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/ama-logs-rs 1/1 1 1 2d1h deployment.apps/ama-metrics 1/1 1 1 2d1h deployment.apps/ama-metrics-ksm 1/1 1 1 2d1h deployment.apps/coredns 2/2 2 2 2d1h deployment.apps/coredns-autoscaler 1/1 1 1 2d1h deployment.apps/konnectivity-agent 2/2 2 2 2d1h deployment.apps/metrics-server 2/2 2 2 2d1h NAME DESIRED CURRENT READY AGE replicaset.apps/ama-logs-rs-5ff7974589 1 1 1 2d1h replicaset.apps/ama-metrics-5c788bc657 1 1 1 2d1h replicaset.apps/ama-metrics-ksm-645c45cb94 1 1 1 2d1h replicaset.apps/coredns-789789675 2 2 2 2d1h replicaset.apps/coredns-autoscaler-649b947bbd 1 1 1 2d1h replicaset.apps/konnectivity-agent-79b5c44dc5 0 0 0 2d1h replicaset.apps/konnectivity-agent-f9b696ddb 2 2 2 2d replicaset.apps/metrics-server-5bd48455f4 0 0 0 2d1h replicaset.apps/metrics-server-5fffcb8954 2 2 2 37h replicaset.apps/metrics-server-84d99f9b8 0 0 0 3h12m sansae@sansaeAir15m2 k8s-lab-workspace %
Namespace Manifest
https://dev-k8sref-io.web.app/docs/cluster/namespace-v1/
apiVersion: v1
kind: Namespace
- metadata (ObjectMeta)
- name
- spec (NamespaceSpec)
- status (NamespaceStatus)
namespace.yaml
apiVersion: v1 kind: Namespace metadata: name: applications
Namespace 실습
sansae@sansaeAir15m2 k8s-lab-workspace % k apply -f namespace.yaml namespace/applications created sansae@sansaeAir15m2 k8s-lab-workspace % k get ns NAME STATUS AGE aks-command Active 45h applications Active 3s calico-system Active 2d1h default Active 2d1h kube-node-lease Active 2d1h kube-public Active 2d1h kube-system Active 2d1h tigera-operator Active 2d1h sansae@sansaeAir15m2 k8s-lab-workspace % k run busybox --image=busybox -n applications pod/busybox created sansae@sansaeAir15m2 k8s-lab-workspace % k get all -n applications NAME READY STATUS RESTARTS AGE busybox 0/1 CrashLoopBackOff 1 (2s ago) 9s sansae@sansaeAir15m2 k8s-lab-workspace %
- No labels
Add Comment