Skip to content

Commit 8857ab9

Browse files
authored
Merge pull request #206082 from dotanpatrich/patch-13
update k8s.node alert simulating instructions
2 parents 1eed0c2 + e1a43a7 commit 8857ab9

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

articles/defender-for-cloud/alert-validation.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,34 @@ You can simulate alerts for both of the control plane, and workload alerts with
111111

112112
**To simulate a a Kubernetes workload security alert**:
113113

114-
1. Access one of the `azuredefender-publisher-<XXX>` pods deployed in your Kubernetes cluster.
114+
1. Create a pod to run a test command on. This pod can be any of the existing pods in the cluster, or a new pod. You can create created using this sample yaml configuration:
115+
116+
```yaml
117+
apiVersion: v1
118+
kind: Pod
119+
metadata:
120+
name: mdc-test
121+
spec:
122+
containers:
123+
- name: mdc-test
124+
image: ubuntu:18.04
125+
command: ["/bin/sh"]
126+
args: ["-c", "while true; do echo sleeping; sleep 3600;done"]
127+
```
128+
129+
To create the pod run:
130+
131+
```bash
132+
kubectl apply -f <path_to_the_yaml_file>
133+
```
115134

116135
1. Run the following command from the cluster:
117136

118137
```bash
119-
kubectl exec -it azuredefender-publisher-xx-xxxxx -n <namespace> -- bash
138+
kubectl exec -it mdc-test -- bash
120139
```
121140

122-
For AKS - `<namespace>` = `kube-system`<br>
123-
For ARC - `<namespace>` = `mdc`
124-
125-
1. Select an executable, copy it to a convenient location and rename it to `./asc_alerttest_662jfi039n`. For example:
126-
`cp /bin/echo ./asc_alerttest_662jfi039n`.
141+
1. Copy the executable to a separate location and rename it to `./asc_alerttest_662jfi039n` with the following command `cp /bin/echo ./asc_alerttest_662jfi039n`.
127142

128143
1. Execute the file `./asc_alerttest_662jfi039n testing eicar pipe`.
129144

0 commit comments

Comments
 (0)