mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-05-06 00:36:44 +00:00
Update README.md
Add deployment.yaml to add pods to namespace 1 and 2 for something to shot at
This commit is contained in:
27
README.md
27
README.md
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user