mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-08-29 00:47:16 +00:00
@@ -288,7 +288,35 @@ spec:
|
||||
tls:
|
||||
termination: Edge
|
||||
```
|
||||
|
||||
## Add simple nginx Deployment for Pods to shot at
|
||||
```bash
|
||||
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
|
||||
```bash
|
||||
sudo kubectl apply -f deployment.yaml -n namespace1
|
||||
sudo kubectl apply -f deployment.yaml -n namespace2
|
||||
```
|
||||
## Usage
|
||||
|
||||
At the top you will find some metrics as described below:
|
||||
|
||||
Reference in New Issue
Block a user