본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

데이터 플레인

원문 보기 위키 갱신

데이터 플레인 (Dataplane)

Dataplane 리소스는 데이터 플레인 프록시, 흔히 사이드카라고 부르는 프록시를 설정하는 리소스예요. 이 프록시는 각 워크로드 옆에서 실행되면서 해당 워크로드의 모든 인바운드와 아웃바운드 트래픽을 처리해요. Kubernetes에서는 사이드카가 Pod에 주입될 때 Kong Mesh가 자동으로 리소스를 생성해 주지만, Universal에서는 직접 Dataplane 리소스를 작성해 메시에 워크로드를 등록해야 해요. 이 문서에서는 단일·다중 인바운드부터 투명 프록시, 헬스 프로브, 게이트웨이 구성까지 다양한 예시를 소개하고 있어요

출처: 문서

본문

쿠버네티스에서는 사이드카가 Pod에 주입되면 Kong Mesh가 Dataplane 리소스를 자동으로 생성해요. 유니버설에서는 워크로드를 메시에 등록하려면 Dataplane 리소스를 직접 만들어야 해요.

각 Dataplane은 정확히 하나의 메시에 속해요.

예제

다음 예제는 유니버설 배포에서 흔히 사용되는 Dataplane 구성을 보여줘요. 쿠버네티스에서는 Kong Mesh가 이런 리소스를 자동으로 생성해요.

단일 인바운드를 가진 기본 Dataplane

HTTP 포트 하나를 노출하는 워크로드를 등록해요:

type: Dataplane
mesh: default
name: web-01
networking:
  address: 192.168.0.1
  inbound:
    - port: 8080
      servicePort: 8080
      tags:
        kuma.io/service: web
        kuma.io/protocol: http
        version: v1

여러 인바운드를 가진 Dataplane

포트를 둘 이상 노출하는 워크로드를 위한 Dataplane을 구성해요:

type: Dataplane
mesh: default
name: backend-01
networking:
  address: 192.168.0.2
  inbound:
    - port: 8080
      servicePort: 8080
      tags:
        kuma.io/service: backend-http
        kuma.io/protocol: http
    - port: 9090
      servicePort: 9090
      tags:
        kuma.io/service: backend-grpc
        kuma.io/protocol: grpc

아웃바운드가 있고 투명 프록시를 사용하지 않는 Dataplane

워크로드가 호출하는 각 업스트림 서비스를 명시적인 아웃바운드 리스너로 선언해요:

type: Dataplane
mesh: default
name: web-01
networking:
  address: 192.168.0.1
  inbound:
    - port: 8080
      servicePort: 8080
      tags:
        kuma.io/service: web
        kuma.io/protocol: http
  outbound:
    - port: 10001
      tags:
        kuma.io/service: backend
    - port: 10002
      tags:
        kuma.io/service: database

투명 프록시를 사용하는 Dataplane

아웃바운드를 선언하지 않고도 워크로드가 서비스 이름으로 메시 서비스에 도달할 수 있도록 투명 프록시를 사용해요:

type: Dataplane
mesh: default
name: web-01
networking:
  address: 192.168.0.1
  inbound:
    - port: 8080
      servicePort: 8080
      tags:
        kuma.io/service: web
        kuma.io/protocol: http
  transparentProxying:
    redirectPortInbound: 15006
    redirectPortOutbound: 15001
    reachableServices:
      - backend
      - database

서비스 프로브가 있는 Dataplane

Kong Mesh가 워크로드가 비정상 상태가 되는 것을 감지하고 트래픽 라우팅을 중단할 수 있도록 헬스 프로브를 구성해요:

type: Dataplane
mesh: default
name: web-01
networking:
  address: 192.168.0.1
  inbound:
    - port: 8080
      servicePort: 8080
      tags:
        kuma.io/service: web
        kuma.io/protocol: http
      serviceProbe:
        interval: 10s
        timeout: 2s
        unhealthyThreshold: 3
        healthyThreshold: 1
        tcp: {}

광고 주소가 있는 Dataplane

프록시가 Docker 컨테이너 같은 프라이빗 네트워크에서 실행될 때는 광고 주소를 설정해요:

type: Dataplane
mesh: default
name: web-01
networking:
  address: 172.17.0.2
  advertisedAddress: 10.0.0.1
  inbound:
    - port: 8080
      servicePort: 8080
      tags:
        kuma.io/service: web
        kuma.io/protocol: http

위임 게이트웨이 Dataplane

메시 앞단에 서는 위임 게이트웨이로 기존 API 게이트웨이(예: Kong Gateway)를 등록해요:

type: Dataplane
mesh: default
name: kong-gateway
networking:
  address: 192.168.0.10
  gateway:
    type: DELEGATED
    tags:
      kuma.io/service: kong-gateway

내장 게이트웨이 Dataplane

인그레스 트래픽을 처리하는 내장 게이트웨이를 실행하고, MeshGateway 리소스를 통해 구성해요:

type: Dataplane
mesh: default
name: edge-gateway
networking:
  address: 192.168.0.10
  gateway:
    type: BUILTIN
    tags:
      kuma.io/service: edge-gateway

스키마

{
  "properties": {
    "networking": {
      "$ref": "#/definitions/kuma.mesh.v1alpha1.Dataplane.Networking",
      "additionalProperties": true,
      "description": "Networking describes inbound and outbound interfaces of the data plane proxy."
    },
    "metrics": {
      "$ref": "#/definitions/kuma.mesh.v1alpha1.MetricsBackend",
      "additionalProperties": true,
      "description": "Configuration for metrics that should be collected and exposed by the data plane proxy. Settings defined here will override their respective defaults defined at a Mesh level."
    },
    "probes": {
      "$ref": "#/definitions/kuma.mesh.v1alpha1.Dataplane.Probes",
      "additionalProperties": true,
      "description": "Probes describe a list of endpoints that will be exposed without mTLS. This is useful to expose the health endpoints of the application so the orchestration system (e.g. Kubernetes) can still health check the application. See https://kuma.io/docs/latest/policies/service-health-probes/#virtual-probes for more information. Deprecated: this feature will be removed for Universal; on Kubernetes, it's not needed anymore."
    }
  },
  "additionalProperties": true,
  "type": "object",
  "title": "Dataplane",
  "description": "Dataplane defines a configuration of a side-car proxy."
}

관련 리소스

더 알아보기 (Learn more)

  • 데이터 플레인 프록시의 기본 개념과 역할을 먼저 이해하면 좋아요 — data plane proxy
  • Kubernetes에서 데이터 플레인을 구성하는 방법을 자세히 다뤄요 — Configure the data plane on Kubernetes
  • Universal 환경에서 데이터 플레인을 직접 등록하는 절차를 설명해요 — Configure the data plane on Universal
  • 아웃바운드를 일일이 선언하지 않아도 되는 투명 프록시의 동작 원리를 알아봐요 — transparent proxying
  • 워크로드가 비정상 상태가 될 때 트래픽 전송을 멈추게 하는 헬스 프로브 설정 방법이에요 — health probes
  • 게이트웨이 형태로 데이터 플레인을 구성하는 방법을 이해하는 데 도움이 돼요 — built-in gateway