++nginx test deployment

This commit is contained in:
Nico Schottelius 2021-05-20 19:28:39 +02:00
parent 27339b7d54
commit e67093bf8a
2 changed files with 37 additions and 0 deletions

View File

@ -66,3 +66,21 @@ alias calicoctl="kubectl exec -i -n kube-system calicoctl -- /calicoctl"
``` ```
calicoctl create -f - < bgp....yaml calicoctl create -f - < bgp....yaml
``` ```
## Setup a test deployment
Do *NOT* use https://k8s.io/examples/application/deployment.yaml. It
contains an outdated nginx container that has no IPv6 listener. You
will get results such as
```
[19:03] server47.place7:~/ungleich-k8s/v3-calico# curl http://[2a0a:e5c0:13:bbb:176b:eaa6:6d47:1c41]
curl: (7) Failed to connect to 2a0a:e5c0:13:bbb:176b:eaa6:6d47:1c41 port 80: Connection refused
```
if you use that deployment. Instead use something on the line of the
included **nginx-test-deployment.yaml**:
```
kubectl appply -f nginx-test-deployment.yaml
```

View File

@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.20.0-alpine
ports:
- containerPort: 80