Monitoring Managed K8s Clusters

Created:2023-10-04 Last Modified:2024-06-24

This document was translated by ChatGPT

#1. Introduction

DeepFlow supports monitoring managed K8s clusters from cloud service providers. The only difference from directly monitoring K8s clusters is that by calling the cloud provider's API, tags of cloud resources can be automatically injected into the observability data (AutoTagging).

#2. Deployment Topology

#3. Configure DeepFlow Server

Create a local YAML file your-managed-k8s.yaml:

# Name
name: sub-domain-test
# Name of the cloud platform [required]
domain_name: example-domain-name
config:
  # VPC UUID of the cluster [required], can be queried via `deepflow-ctl vpc list`
  vpc_uuid: xxxxx-xxxx-xxxx-xxxx-xxxx
  # Maximum mask of POD subnet IPv4 address [optional]
  #pod_net_ipv4_cidr_max_mask: 16
  # Maximum mask of POD subnet IPv6 address [optional]
  #pod_net_ipv6_cidr_max_mask: 64
  # Input regular expression to specify additional routing interfaces [optional]
  #port_name_regex: ^(cni|flannel|vxlan.calico|tunl|en[ospx])
1
2
3
4
5
6
7
8
9
10
11
12
13

Create the managed cluster:

deepflow-ctl subdomain create -f your-managed-k8s.yaml
1

Query the ClusterID of the managed cluster generated by DeepFlow Server:

deepflow-ctl subdomain list
1

#4. Deploy DeepFlow Agent

Deploy DeepFlow Agent using the generated ClusterID:

echo "deepflowK8sClusterID: "fffffff"  # FIXME: Generate by `deepflow-ctl  subdomain list`" >> values-custom.yaml
helm upgrade deepflow-agent -n deepflow deepflow/deepflow-agent  \
    -f values-custom.yaml
1
2
3

#5. Next Steps