Requirements for Caretta
mainCaretta requires:
- Linux kernel version >= 4.16
- CO-RE (Compile Once – Run Everywhere) support.
Note: Docker for Mac uses a distribution that is currently not supported.
repository·main·Indexed 24 days ago
https://github.com/groundcover-com/carettaCaretta is a lightweight eBPF-based tool used to create visual network dependency maps of Kubernetes services, integrated with Grafana. It includes an eBPF agent, Victoria Metrics, and a pre-configured Grafana instance. The tool publishes metrics such as caretta_links_observed to provide visibility into network traffic between Kubernetes entities and external domains.
Caretta requires:
Note: Docker for Mac uses a distribution that is currently not supported.
Caretta ships with a pre-configured Grafana instance. To access the dashboard:
3000 from the Grafana pod in the caretta namespace:
kubectl port-forward --namespace caretta <grafana-pod-name> 3000:3000Credentials:
admin and password caretta.kubectl port-forward --namespace caretta <grafana-pod-name> 3000:3000To remove Caretta, delete the Helm release. Note that if you enabled persistent storage during installation, the persistent volumes may not be deleted automatically.
helm delete caretta --namespace carettaCaretta is installed as a Helm chart. It is recommended to install it in a new, unique namespace. The installation includes an eBPF agent, Victoria Metrics, and Grafana by default.
helm repo add groundcover https://helm.groundcover.com/
helm repo update
helm install caretta --namespace caretta --create-namespace groundcover/carettaYou can customize Caretta's behavior using Helm values. Key configuration options include:
pollIntervalSeconds: Specifies the polling and publishing interval of new metrics from the kernel (default: 5).traverseUpHierarchy: If true (default), Caretta resolves Kubernetes entities to their owners (e.g., pods are resolved to their parent Deployment). Set to false to disable this.tolerations: Used to ensure the eBPF agent runs on all nodes, including control-plane nodes. The default value tolerates common control-plane node annotations.victoria-metrics-single.enabled: Enables or disables the built-in Victoria Metrics instance (default: true).grafana.enabled: Enables or disables the built-in Grafana instance (default: true).victoria-metrics-single.server.persistentVolume.enabled: If true, saves Victoria Metrics data to a persistent volume (default: false).pollIntervalSeconds: 15 # set metrics polling interval
traverseUpHierarchy: false # disable resolving kubernetes entities to their owners
tolerations: # set any desired tolerations
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
victoria-metrics-single:
server:
persistentVolume:
enabled: true # set to true to use persistent volumeUse these example queries to analyze network traffic in Prometheus/Grafana:
Throughput between specific client and server (aggregated by port):
increase ((sum (server_port) (caretta_links_observed{client_name="some-client", server_name="some-server}))[15m])Traffic rate from a client to all its servers:
sum by (server_name) (rate(caretta_links_observed{client_name="some-client"}))Communication to external servers by client name (sorted descending):
sort_desc(increase((sum by (client_name)(caretta_links_observed{server_namespace="external"}))[5m]))Caretta publishes metrics to Victoria Metrics, which can be consumed by any Prometheus-compatible system. The primary metric is caretta_links_observed (Gauge).
Labels for caretta_links_observed:
client_name: Name of Kubernetes entity, external domain, or IP address.client_namespace: Namespace of the entity, or node or external.client_kind: Kind of the entity, or node or external.server_name: Name of the target entity, external domain, or IP address.server_namespace: Namespace of the target, or node or external.server_kind: Kind of the target, or node or external.server_port: The destination port.role: 1 for client, 2 for server.caretta_links_observed{client_id="1074587981",client_kind="Deployment",client_name="checkoutservice",client_namespace="demo-ng",link_id="198768460",role="1",server_id="1112713827",server_kind="Service",server_name="productcatalogservice",server_namespace="demo-ng",server_port="3550"} 2537