Update README.md

Add deployment.yaml to add pods to namespace 1 and 2 for something to shot at
This commit is contained in:
madsler
2024-03-13 16:25:43 +01:00
committed by GitHub
parent d501beea10
commit cb8662b354

View File

@@ -288,6 +288,33 @@ spec:
tls:
termination: Edge
```
## Add simple nginx Deployment for Pods to shot at
cat >deployment.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 20 # tells deployment to run 20 pods matching the template
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.24.0
ports:
- containerPort: 81
EOF
# Apply Nginx Deployment in namespace1 and namespace2
sudo kubectl apply -f deployment.yaml -n namespace1
sudo kubectl apply -f deployment.yaml -n namespace2
## Usage