Last active
October 4, 2020 04:42
-
-
Save tirumaraiselvan/9879536054ba63ab74910077e9ed538c to your computer and use it in GitHub Desktop.
tcpdump kubernetes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: hasura | |
hasuraService: custom | |
name: hasura | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hasura | |
template: | |
metadata: | |
labels: | |
app: hasura | |
spec: | |
containers: | |
- image: hasura/graphql-engine:v1.3.2 | |
name: hasura | |
env: | |
- name: HASURA_GRAPHQL_DATABASE_URL | |
value: postgres://postgres:[email protected]:5432/postgres | |
ports: | |
- containerPort: 8080 | |
protocol: TCP | |
- image: corfr/tcpdump | |
name: tcpdump | |
command: ["/bin/sleep", "infinity"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Commands:
kubectl exec --stdin --tty hasura-574895c6bf-cdzdp --container tcpdump -- sh
tcpdump -s 0 -w dump.pcap
. After capturing, quit the process and exit the container.kubectl cp hasura-574895c6bf-cdzdp:/dump.pcap -c tcpdump dump.pcap