네트워크 정책 시행: GKE가 Kubernetes 네트워크 정책을 적용하는 방법에 대한 정보입니다.
GKE Dataplane V2 측정항목을 사용하면 다음 도구를 사용하여 Kubernetes 워크로드를 모니터링하고 문제를 해결할 수 있습니다.
Google Cloud Managed Service for Prometheus로 GKE Dataplane V2 측정항목을 보고 분석할 수 있습니다. Google Cloud Managed Service for Prometheus 구성을 수정하여 Google Cloud Managed Service for Prometheus 수집에 대해 선택한 측정항목을 추가하거나 삭제할 수 있습니다.
Cloud Monitoring 측정항목 탐색기로 포드 수준의 트래픽 흐름 세부정보를 확인합니다.
모든 측정항목을 탐색하고 사용하기 위한 Cloud Monitoring 예를 들어 GKE Dataplan V2 측정항목이 특정 기준점을 초과할 때 트리거되는 알림을 만들 수 있습니다.
자체 관리형 Grafana로 Google Cloud Managed Service for Prometheus에서 수집한 측정항목을 시각화합니다.
Google Cloud Managed Service for Prometheus를 사용 설정하면 다음 작업을 수행합니다.
GKE가 PodMonitoring 리소스를 만듦
GKE가 측정항목 엔드포인트를 노출
Google Cloud Managed Service for Prometheus로 측정항목을 사용하고 PodMonitoring 리소스를 만들려면 클러스터에서 Google Cloud Managed Service for Prometheus를 사용 설정해야 합니다. Google Cloud Managed Service for Prometheus를 사용 설정하지 않으면 GKE가 측정항목 엔드포인트를 노출하지만 PodMonitoring 리소스를 만들지 않습니다.
클러스터에 GKE Dataplane V2 측정항목을 사용 설정하면 Google Cloud Managed Service for Prometheus가 다음 GKE Dataplane V2 측정항목을 수집합니다.
GKE Dataplane V2 측정항목을 사용 설정하면 각 Kubernetes 노드에서 측정항목 포트가 열립니다.
오픈소스 관측 가능성 플랫폼인 Hubble을 포함한 추가 측정항목도 사용할 수 있습니다.
기본적으로 Google Cloud Managed Service for Prometheus는 이러한 추가 측정항목을 수집하지 않지만 Google Cloud Managed Service for Prometheus가 이를 수집하도록 구성할 수 있습니다. 측정항목을 수집하려면 PodMonitoring 커스텀 리소스(CR)를 구성합니다.
다음 표에서는 추가 Hubble 측정항목에 대해 설명합니다.
Hubble 측정항목
유형
설명
hubble_flows_processed_total
누적
처리된 흐름 수 합계입니다.
hubble_drop_total
누적
삭제된 흐름 수 합계입니다.
hubble_port_distribution_total
누적
포트 번호별로 집계한 처리된 흐름 수 합계입니다.
hubble_tcp_flags_total
누적
지정된 TCP 플래그가 설정된 상태로 처리된 흐름 수 합계입니다.
hubble_icmp_total
누적
처리된 ICMP 흐름 수 합계입니다.
GKE Dataplane V2 관측 가능성 도구
GKE Dataplane V2 관측 가능성은 GKE Dataplane V2로 배포된 Kubernetes 워크로드에 대한 네트워크 관측 가능성 및 보안 통계를 제공하는 관리형 Hubble 솔루션을 제공합니다.
사용 설정된 경우 GKE Dataplane V2 관측 가능성이 다음 구성요소를 클러스터에 배포합니다.
Hubble Relay: 각 노드에서 포드에 대한 네트워크 원격 분석 데이터를 수집하는 서비스입니다.
Hubble CLI: 클러스터 내에서 실시간 트래픽 정보를 제공하는 명령줄 인터페이스 도구입니다.
GKE Dataplane V2 관측 가능성을 클러스터에 사용 설정한 후 다음 구성요소를 배포할 수 있습니다.
Hubble UI: Hubble Relay가 수집한 네트워크 원격 분석 데이터를 보고 분석하는 데 사용하는 웹 기반 도구입니다. Hubble UI를 배포하려면 GKE Dataplane V2 관측 가능성을 사용 설정해야 합니다.
GKE Dataplane V2 측정항목 및 관측 가능성 작동 방식
GKE Dataplane V2 관측 가능성은 다음 구성요소 및 도구를 사용하여 측정항목을 수집하고 네트워크 트래픽에 대한 통계를 제공합니다.
GKE Dataplane V2: GKE Dataplane V2 측정항목 및 관측 가능성은 eBPF 기반 GKE Dataplane V2 데이터 경로를 사용하여 지정된 워크로드를 기반으로 포드의 트래픽 흐름 및 네트워크 정책 시행에 대한 측정항목을 수집합니다.
Hubble: GKE Dataplane V2 관측 가능성은 오픈소스 관측 가능성 프로젝트인 Hubble을 사용합니다. Hubble은 eBPF Dataplane으로 배포된 Kubernetes 워크로드에 대한 네트워크 관측 가능성 및 보안 통계를 지원합니다.
Hubble 흐름 이벤트는 다음과 같은 경우에 발생합니다.
네트워크 연결이 먼저 설정됨
TCP 연결 상태를 나타내는 TCP 플래그가 먼저 표시됨
마지막 흐름 이벤트 이후로 5초 이상 경과 후 패킷이 전송됨
Hubble 측정항목: 어떤 포드가 서로 통신하고 있는지 식별할 때 사용할 수 있는 Kubernetes 클러스터 흐름 이벤트 수를 계산합니다.
측정항목 및 관측 가능성 사용 설정: GKE Dataplane V2와 관측 가능성을 독립적으로 사용 설정할 수 있습니다. 오픈소스 Hubble UI 기능에서 네트워크 토폴로지 시각화를 사용 설정하려면 네트워크 검사를 사용 설정해야 합니다.
Autopilot 클러스터:
측정항목은 기본적으로 사용 설정됨
관측 가능성 도구는 기본적으로 사용 중지됨
Google Cloud Managed Service for Prometheus에서 측정항목을 수집하려면 클러스터 PodMonitoring 리소스를 만들어야 합니다.
Standard 클러스터:
측정항목은 기본적으로 사용 중지됨
관측 가능성 도구는 기본적으로 사용 중지됨
Google Cloud Managed Service for Prometheus를 사용 설정하면 PodMonitoring 리소스가 자동으로 생성됩니다.
PodMonitoring 리소스는 존재 확인으로 표시됩니다. 모든 측정항목을 사용 중지하도록 PodMonitoring 리소스를 수정하여 Google Cloud Managed Service for Prometheus로의 측정항목 전송을 중지할 수 있습니다.
GKE Dataplane V2 관측 가능성 엔드포인트
GKE Dataplane V2 관측 가능성 구성요소는 다음 두 가지 관측 가능성 엔드포인트를 노출합니다.
측정항목 엔드포인트: Prometheus 형식으로 트래픽 측정항목을 노출하는 HTTP 엔드포인트입니다. anetd 포드는 포트 9965로 각 클러스터 노드에서 측정항목 엔드포인트를 노출합니다.
흐름 포트: gRPC 엔드포인트입니다. hubble-relay 포드는 포트 443에 Kubernetes ClusterIP 서비스로 흐름 포트 엔드포인트를 노출합니다. hubble-relay 포드는 Kubernetes ClusterIP 서비스의 백엔드이며 Kubernetes ClusterIP 서비스에 대한 모든 요청은 hubble-relay 포드에 전달됩니다.
Hubble CLI 또는 Hubble UI를 사용하여 흐름 포트에 액세스할 수 있습니다.
제한사항
GKE Dataplane V2 관측 가능성의 클러스터 전체 한도는 노드 5,000개입니다.
GKE Dataplane V2 측정항목 및 관측 가능성은 GKE Dataplane V2가 사용 설정된 클러스터에서만 작동합니다.
GKE Dataplane V2 측정항목은 연결 정보를 제공하기 위해 흐름 기반 측정항목으로 구현된다는 점에서 Hubble 측정항목과 유사합니다. 이러한 측정항목은 전송된 데이터 양 또는 패킷 수를 계산하지 않습니다.
측정항목은 흐름 기반 측정항목이므로 네트워크 흐름에서 전송되는 데이터 양을 정확하게 나타내지 않습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-11-19(UTC)"],[],[],null,["# About GKE Dataplane V2 observability\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nGKE Dataplane V2 observability provides GKE Dataplane V2 metrics and insights\ninto workloads on GKE clusters on Google Cloud.\nWith GKE Dataplane V2 observability, starting with\nGKE versions **1.28** or later, you can:\n\n- Capture, observe, and alert on network metrics using [Google Cloud Managed Service for Prometheus](/stackdriver/docs/managed-prometheus) and [Cloud Monitoring](/monitoring) with [Metrics Explorer](/monitoring/charts/metrics-explorer)\n- Understand traffic flows for a particular Service in a cluster\n- Understand and identify issues with the network health of a Kubernetes workload\n- Verify [Kubernetes Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/)\n\nGKE Dataplane V2 observability offers the following troubleshooting tools:\n\n- A Kubernetes cluster Network Topology\n- A Kubernetes Network Policy verdict table with live traffic flows and connection information\n- Command-line tooling for troubleshooting Kubernetes traffic flows\n\n### GKE Dataplane V2 metrics\n\nGKE Dataplane V2 metrics provide traffic flow information for the following:\n\n- **Traffic flows:** insights about how GKE handles flows between Pods and Services.\n- **Network policy enforcement:** information about how GKE\n enforces Kubernetes Network Policies.\n\n | **Note:** Observability draws insights from Layer 3 and Layer 4 network data. This aligns with GKE's Network Policies, which also function at Layer 3 and Layer 4.\n\nYou can use GKE Dataplane V2 metrics to monitor and troubleshoot Kubernetes\nworkloads using the following tools:\n\n- **Google Cloud Managed Service for Prometheus** to view and analyze your GKE Dataplane V2 metrics. You can modify the Google Cloud Managed Service for Prometheus configuration to add or remove the metrics of your choice for Google Cloud Managed Service for Prometheus ingestion.\n- **Cloud Monitoring Metrics Explorer** to view Pod-level traffic flow details.\n- **Cloud Monitoring** to explore and use any metric. For example, you can create alerts that trigger when GKE Dataplane V2 metrics exceed certain thresholds.\n- **Self-managed Grafana** to visualize metrics collected by Google Cloud Managed Service for Prometheus.\n\nWhen you enable Google Cloud Managed Service for Prometheus:\n\n- GKE creates a `PodMonitoring` resource\n- GKE exposes the metrics endpoint\n\nTo consume metrics with Google Cloud Managed Service for Prometheus and to be able to create a\n`PodMonitoring` resource, you must enable Google Cloud Managed Service for Prometheus\non the cluster. If you don't enable Google Cloud Managed Service for Prometheus, GKE\nexposes the metrics endpoint but does not create a `PodMonitoring`\nresource.\n\nWhen you enable GKE Dataplane V2 metrics for a cluster,\nGoogle Cloud Managed Service for Prometheus ingests the following GKE Dataplane V2 metrics:\n\nEnabling GKE Dataplane V2 metrics opens the metrics port on each Kubernetes node.\n\nAdditional metrics are also available, including from the open source\nobservability platform [Hubble](https://docs.cilium.io/en/v1.13/observability/metrics/#hubble).\nBy default, Google Cloud Managed Service for Prometheus doesn't ingest these additional metrics\nbut you can configure Google Cloud Managed Service for Prometheus to collect them. To collect\nthese metrics, [configure a `PodMonitoring` custom resource (CR)](/stackdriver/docs/managed-prometheus/setup-managed#gmp-pod-monitoring).\n\nThe following table describes additional Hubble metrics:\n\n### GKE Dataplane V2 observability tools\n\nGKE Dataplane V2 observability provides a Managed Hubble solution with network\nobservability and security insights for Kubernetes workloads deployed with\nGKE Dataplane V2.\n\nWhen enabled, GKE Dataplane V2 observability deploys the following components to\nyour cluster:\n\n- **Hubble Relay:** a service that collects network telemetry data about your\n Pods from each node.\n\n- **Hubble CLI:** a command-line interface tool providing live traffic\n information within the cluster.\n\nYou can deploy the following component after you enable GKE Dataplane V2\nobservability to your cluster:\n\n- **Hubble UI:** a web-based tool that you can use to view and analyze the network telemetry data that is collected by Hubble Relay. You must enable GKE Dataplane V2 observability to deploy Hubble UI.\n\nHow GKE Dataplane V2 metrics and observability works\n----------------------------------------------------\n\nGKE Dataplane V2 observability uses the following components and tools to\ncollect metrics and provide insights into your network traffic:\n\n- GKE Dataplane V2: GKE Dataplane V2 metrics and observability use\n GKE Dataplane V2 datapath based on [eBPF](https://ebpf.io/what-is-ebpf/)\n to collect metrics about traffic flows and network policy enforcement for a Pod\n based on a given workload.\n\n- [Google Cloud Managed Service for Prometheus](/stackdriver/docs/managed-prometheus):\n GKE Dataplane V2 metrics configures the Google Cloud Managed Service for Prometheus agent to\n ingest aggregated metrics to Google Cloud Managed Service for Prometheus, a scalable\n monitoring solution that can ingest and store large amounts of data that also\n lets you build on the [Google Cloud Observability](/stackdriver/docs/solutions/gke).\n\n- [Hubble](https://github.com/cilium/hubble): GKE Dataplane V2 observability\n uses Hubble, an open source observability project. Hubble enables network\n observability and security insights for Kubernetes workloads deployed with an\n eBPF Dataplane.\n\n Hubble flow events occur when:\n - A network connection is first established\n\n - A TCP flag is first seen, which indicates the state of the TCP connection\n\n - A packet is transmitted after at least five seconds have passed since the last\n flow event\n\n **Hubble metrics:** counts the number of flow events in a Kubernetes cluster\n that you can use to identify which Pods are communicating with each other.\n | **Note:** Hubble flow metrics don't count the amount of data or number of packets transmitted.\n- **Enabling metrics and observability:** You can enable GKE Dataplane V2 and\n observability independent of each other. To enable Network topology\n visualization in open source Hubble UI feature, you must enable Network inspection.\n\n- **Autopilot clusters:**\n\n - Metrics are enabled by default\n\n - Observability tools are disabled by default\n\n - You must create the Cluster`PodMonitoring` resource to gather metrics in the\n Google Cloud Managed Service for Prometheus\n\n- **Standard clusters:**\n\n - Metrics are disabled by default\n\n - Observability tools are disabled by default\n\n - If you have Google Cloud Managed Service for Prometheus enabled, a `PodMonitoring` resource\n is created automatically\n\n - A `PodMonitoring` resource is marked as **ensure exists** . You can stop\n sending metrics to Google Cloud Managed Service for Prometheus by editing the\n `PodMonitoring` resource to disable all metrics\n\n### GKE Dataplane V2 observability endpoints\n\nGKE Dataplane V2 observability components expose the following two observability\nendpoints:\n\n- **Metrics endpoint:** an HTTP endpoint that exposes traffic metrics in\n Prometheus format. The `anetd` Pod exposes the metrics endpoint on each cluster\n node on port 9965.\n\n- **Flows port:** a gRPC endpoint. The `hubble-relay` Pod exposes the flows port\n endpoint as a Kubernetes `ClusterIP` Service on port 443. The `hubble-relay`\n Pod is the backend for the Kubernetes `ClusterIP` Service and all requests to\n the Kubernetes `ClusterIP` Service are forwarded to the `hubble-relay` Pod.\n You can access the flow port using Hubble CLI or the Hubble UI.\n\nLimitations\n-----------\n\n- GKE Dataplane V2 observability has a cluster-wide limit of 5000 nodes.\n- GKE Dataplane V2 metrics and observability only work in clusters on Google Cloud with [GKE Dataplane V2](/kubernetes-engine/docs/concepts/dataplane-v2) enabled.\n- GKE Dataplane V2 metrics are similar to Hubble metrics in that they are implemented as flow-based metrics to provide connection information. These metrics don't count the amount of data nor number of packets transmitted. Given that the metrics are flow-based, they don't provide an accurate representation of the amount of data transmitted in a network flow.\n\nWhat's next\n-----------\n\n- [Set up GKE Dataplane V2 observability](/kubernetes-engine/docs/how-to/configure-dpv2-observability)\n- [Observe your traffic using GKE Dataplane V2 observability](/kubernetes-engine/docs/how-to/observe-your-traffic)"]]