Commit c40f802a authored by Sebastian Schrader's avatar Sebastian Schrader
Browse files

Initial commit

parents
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: clock
spec:
ingressClassName: nginx
rules:
- host: clock.185.97.173.221.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: clock
port:
name: http
- host: clock.185.97.173.241.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: clock
port:
name: http
---
apiVersion: v1
kind: Pod
metadata:
name: client
spec:
containers:
- name: client
image: curlimages/curl:7.81.0
args:
- watch
- -n
- "1"
- -t
- curl
- http://clock/clock.txt
volumes:
- name: share
persistentVolumeClaim:
claimName: clock
---
apiVersion: v1
kind: Pod
metadata:
name: clock
spec:
containers:
- name: clock
image: debian:buster
stdin: true
tty: true
args:
- bash
- -c
- 'format="\D{%Y-%m-%dT%H:%M:%S}"; while :; do echo "${format@P}" > /mnt/clock.txt; sleep 1; done'
volumeMounts:
- mountPath: /mnt
name: share
volumes:
- name: share
persistentVolumeClaim:
claimName: clock
---
apiVersion: v1
kind: Pod
metadata:
name: server
labels:
service: clock
spec:
containers:
- name: server
image: nginx:latest
volumeMounts:
- mountPath: /usr/share/nginx/html
name: share
readOnly: true
ports:
- containerPort: 80
protocol: TCP
name: http
readinessProbe:
httpGet:
port: 80
path: /ready.txt
livenessProbe:
httpGet:
port: 80
path: /live.txt
startupProbe:
httpGet:
port: 80
path: /startup.txt
volumes:
- name: share
persistentVolumeClaim:
claimName: clock
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: clock
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 128Mi
apiVersion: v1
kind: Service
metadata:
name: clock
spec:
type: ClusterIP
ports:
- port: 80
protocol: TCP
targetPort: http
selector:
service: clock
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: dockercoins
name: webui
spec:
ingressClassName: nginx
rules:
- host: webui.185.97.173.221.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webui
port:
name: http
- host: webui.185.97.173.241.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webui
port:
name: http
---
apiVersion: v1
kind: Namespace
metadata:
name: dockercoins
---
apiVersion: v1
kind: Pod
metadata:
namespace: dockercoins
name: hasher
labels:
service: hasher
spec:
containers:
- name: rng
image: 10.98.88.184:5000/hasher:latest
ports:
- containerPort: 80
name: http
---
apiVersion: v1
kind: Pod
metadata:
namespace: dockercoins
name: redis
labels:
service: redis
spec:
containers:
- name: redis
image: redis:latest
volumeMounts:
- mountPath: /data
name: data
ports:
- containerPort: 6379
name: redis
protocol: TCP
volumes:
- name: data
persistentVolumeClaim:
claimName: data
---
apiVersion: v1
kind: Pod
metadata:
namespace: dockercoins
name: rng
labels:
service: rng
spec:
containers:
- name: rng
image: 10.98.88.184:5000/rng:latest
ports:
- containerPort: 80
name: http
---
apiVersion: v1
kind: Pod
metadata:
namespace: dockercoins
name: webui
labels:
service: webui
spec:
containers:
- name: webui
image: 10.98.88.184:5000/webui:latest
ports:
- containerPort: 80
name: http
protocol: TCP
---
apiVersion: v1
kind: Pod
metadata:
namespace: dockercoins
name: worker
labels:
service: worker
spec:
containers:
- name: worker
image: 10.98.88.184:5000/worker:latest
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: dockercoins
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
namespace: dockercoins
name: hasher
spec:
type: ClusterIP
ports:
- port: 80
protocol: TCP
targetPort: http
selector:
service: hasher
---
apiVersion: v1
kind: Service
metadata:
namespace: dockercoins
name: redis
spec:
type: ClusterIP
ports:
- port: 6379
protocol: TCP
targetPort: redis
selector:
service: redis
---
apiVersion: v1
kind: Service
metadata:
namespace: dockercoins
name: rng
spec:
type: ClusterIP
ports:
- port: 80
protocol: TCP
targetPort: http
selector:
service: rng
---
apiVersion: v1
kind: Service
metadata:
namespace: dockercoins
name: webui
spec:
type: ClusterIP
ports:
- port: 80
protocol: TCP
targetPort: http
selector:
service: webui
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: aapp
spec:
ingressClassName: nginx
rules:
- host: aapp.185.97.173.221.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: aapp
port:
number: 80
- host: aapp.185.97.173.241.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: aapp
port:
number: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: bapp
spec:
ingressClassName: nginx
rules:
- host: bapp.185.97.173.221.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: bapp
port:
number: 80
- host: bapp.185.97.173.241.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: bapp
port:
number: 80
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment