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
36 lines
504 B
YAML
36 lines
504 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nginx
|
|
labels:
|
|
app: nginx
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: nginx
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nginx
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx
|
|
ports:
|
|
- containerPort: 80
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ngnix-service
|
|
spec:
|
|
selector:
|
|
app: nginx
|
|
type: NodePort
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
|