HTTP Route Test Image for Container Network Test
7.1K
It's just free. (Public Domain)
See https://github.com/yidigun/test-image
22.x and express to 4.19.This image is useful when settting up k8s cluster and ingress configuration, to check application server can acquire correct client address.
docker run -d -e SERVERPORT=8080 -p 8080:8080/tcp yidigun/test-image:latest
curl -v http://localhost:8080
curl -v -H 'X-Forwarded-For: 192.168.112.22' http://localhost:8080
curl -v -H 'Accept: application/json' http://localhost:8080
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-image
labels:
app: test-image
spec:
replicas: 10
selector:
matchLabels:
app: test-image
template:
metadata:
labels:
app: test-image
spec:
containers:
- name: test-image
image: docker.io/yidigun/test-image:latest
env:
- name: SERVERPORT
value: "8080"
---
apiVersion: v1
kind: Service
metadata:
name: test-image-service
spec:
selector:
app: test-image
ports:
- protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test-image-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /test-image
pathType: Prefix
backend:
service:
name: test-image-service
port:
number: 80
- host: "test-image.yidigun.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: test-image-service
port:
number: 80
Content type
Image
Digest
sha256:8b501c469…
Size
6 MB
Last updated
8 months ago
docker pull yidigun/test-image