K8S Networking - Basics (0)

Jay Park·2022년 1월 5일
0
post-thumbnail

K8S Networking을 이해하는데 필요한 용어들과 배경지식들을 정리하고자 한다.

namespace

They provide processes with their own system view, thus isolating independent processes from each other. In other words, namespaces define the set of resources that a process can use (You cannot interact with something that you cannot see). At a high level, they allow fine-grain partitioning of global operating system resources such as mounting points, network stack and inter-process communication utilities.

  • PID namespace: isolation of the system process tree;
  • NET namespace: isolation of the host network stack;
  • MNT namespace: isolation of host filesystem mount points;
  • UTS namespace: isolation of hostname;
  • IPC namespace: isolation for interprocess communication utilities (shared segments, semaphores);
  • USER namespace: isolation of system users IDs;
    CGROUP namespace: isolation of the virtual cgroup filesystem of the host.

The namespaces are per-process attributes. Each process can perceive at most one namespace. In other words, at any given moment, any process P belongs to exactly one instance of each namespace.


☞ 참고자료

veth

  • veth는 virtual ethernet device 의미하며 보통 pair로 정의된다. (veth pair)

  • veth pair는 네트워크 네임스페이스들을 터널로서 연결

    The veth devices are virtual Ethernet devices. They can act as tunnels between network namespaces to create a bridge to a physical network device in another namespace, but can also be used as standalone network devices.

  • 도커 컨테이너가 생성될 때마다 도커 엔진이 자동으로 veth*** 인터페이스를 생성한 후 각 컨테이너의 eth와의 터널을 만든다.

*그림 출처 - Digging into Linux namespaces

☞ 참고자료


VLAN

  • LAN - 동일한 IP 대역과 동일한 Subnet Mask를 통해서 ARP Broadcast가 미치는 범위

  • HubSwitch

    • 다수의 PC를 하나의 네트웍으로 묶어주는 장치
    • Hub 는 물려있는 PC의 MAC 주소를 저장/관리하지 않기 때문에 모든 포트에 패킷 전송 --> 충돌로 인한 성능 저하 (Switching Hub는 이를 개선한 장비)
    • Switch는 MAC 주소를 기억하기 때문에 목적지 포트에만 패킷 전송
  • ARP는 네트웍에 물려있는 장비 수가 많아질수록 비효율적

  • VLAN - Layer 2 계층 네트웍을 Broadcast Domain으로 나눔.

    • ARP Broadcast가 서로 간섭하지 않는 여러 개의 논리적인 LAN 구성
  • VLAN 그룹 할당 방식

    • PORT VLAN - 스위치의 포트마다 VLAN ID를 부여
    • Tagged VLAN - VLAN 태그를 이더넷 프레임에 삽입하여 각 VLAN 그룹을 식별
    • MAC VLAN

☞ 참고자료

Underlay vs. Overlay

  • 가상화가 이루어지는 부분이 Overlay
  • 스위치와 라우터가 있는 부분이 Underlay

☞ 참고자료

VXLAN

☞ 참고자료

profile
Jaytiger

0개의 댓글