Amazon EKS 기타 기술 참고 사항

(참고) 아래 사항은 기록을 위해 남겨두는 것으로 정확하지 않을 수 있습니다.

  1. 컨테이너화의 역사

  1. Kubernetes CNI Design Goals

  2. Worker Node의 CNI 플러그인 확인

sudo su -
cat /etc/cni/net.d/10-aws.conflist
  1. EKS 노드에서 VPC CNI 정보 및 메트릭 확인

sudo ip -c route
watch -d "ip link | egrep 'eth|eni'; echo; echo "[ROUTE TABLE]"; route -n | grep eni"
  1. VPC CNI 바이너리 위치

  2. CNI Plugin Daemon에 Ephemeral Container로 Debug 접속

kubectl debug -n kube-system -it aws-node-dm8hb --image=busybox:1.28 --target=aws-node
  1. EKS 노드에서 VPC CNI 정보 및 메트릭 확인

curl http://localhost:61678/metrics
  1. 노드 네트워크 인터페이스 확인

aws ec2 describe-network-interfaces --network-interface-ids eni-00257add37b4ec5db
  1. 현재 IPAMD가 할당한 포드별 IP 정보

sudo vi /var/run/aws-node/ipam.json
  1. EC2 인스턴스 별 ENI 및 IP 수 확인

aws ec2 describe-instance-types --filters Name=instance-type,Values=t3.* \
--query "InstanceTypes[].{Type: InstanceType, MaxENI: NetworkInfo.MaximumNetworkInterfaces, IPv4addr: NetworkInfo.Ipv4AddressesPerInterface}" \
--output table
  1. CRI에서 설정된 Pod의 메모리 Cgroup의 예시

  • Istio Envoy Proxy injected into Game2048

  1. Pod의 Cgroup 확인

  • You can also find the cgroups of the container by logging into the container and viewing /proc/self/cgroup file. (This may not work in recent versions of kubernetes if cgroup namespace is enabled)

  • Node의 “/sys/fs/cgroup” 폴더에서 위 Pod 랜덤 이름으로 검색해 봄

      cd /sys/fs/cgroup
      find . -name *poda2d35e95*

  • CPU Cgroup을 한번 살펴본다. (노드 혹은 Pod에서 가능)

    cd ./cpu,cpuacct/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-poda2d35e95_7819_44d2_8935_52bddad23f84.slice
    
    ls -al
    
    cat cpu.shares
    
    cd cri-containerd-51b03afe3d8077586c38f4d08d6bc5344ebe174fc329c0335c346b18fca573a1.scope
    
    cat cpu.shares

  1. CRI Containerd에서 컨테이너 확인

sudo ctr --namespace k8s.io containers ls

Last updated