Files
dsh_shenxian/poc/03-networkpolicy/pods.yaml
T

48 lines
956 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 目标 DSH Pod(app=dsh)+ 控制面源(app=dsh-orchestrator)+ 攻击源(app=attacker)。
apiVersion: v1
kind: Pod
metadata:
name: dsh-target
namespace: dsh-poc
labels: { app: dsh, user: u1 }
spec:
automountServiceAccountToken: false
containers:
- name: dsh
image: node:22-alpine
command: ["node", "/app/target.mjs"]
ports: [{ containerPort: 8081 }]
volumeMounts:
- name: script
mountPath: /app
volumes:
- name: script
configMap:
name: dsh-target-script
---
apiVersion: v1
kind: Pod
metadata:
name: controlplane
namespace: dsh-poc
labels: { app: dsh-orchestrator }
spec:
containers:
- name: src
image: busybox:1.36
command: ["sleep", "3600"]
---
apiVersion: v1
kind: Pod
metadata:
name: attacker
namespace: dsh-poc
labels: { app: attacker }
spec:
containers:
- name: src
image: busybox:1.36
command: ["sleep", "3600"]