mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Now you are be able to capture traffic inside k8s like this: ``` gor --input-raw k8s://namespace/deployment/app:80 --output-http http://replay.com ``` Supported format for filtering required pods: ``` k8s://[namespace/]pod/[pod_name] - k8s://default/pod/nginx-7848d4b86f-5nxz8 k8s://[namespace/]deployment/[deployment_name] - k8s://default/deployment/nginx k8s://[namespace/]daemonset/[daemonset_name] - k8s://default/daemonset/nginx k8s://[namespace/]labelSelector/[selector] - k8s://default/labelSelector/app=nginx k8s://[namespace/]fieldSelector/[selector] - k8s://default/fieldSelector/metadata.name=nginx-7848d4b86f-5nxz8 ``` `namespace` is optional, omit to use all namespaces: `k8s://labelSelector/app=replay` GoReplay designed to be running running as a daemonset (e.g. on each physical k8s node). See the full guide in here: https://github.com/buger/goreplay/blob/ca8205a5c5d2a1facb00214c78e4120aae6d772d/k8s/README.md
16 lines
348 B
Go
16 lines
348 B
Go
//go:build (!linux && ignore) || arm64 || darwin
|
|
// +build !linux,ignore arm64 darwin
|
|
|
|
package capture
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/google/gopacket/pcap"
|
|
)
|
|
|
|
// NewSocket returns new M'maped sock_raw on packet version 2.
|
|
func NewSocket(_ pcap.Interface) (Socket, error) {
|
|
return nil, errors.New("afpacket socket is only available on linux")
|
|
}
|