27 lines
639 B
YAML
27 lines
639 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: sleep
|
|
labels:
|
|
kiamol: ch07
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: sleep
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: sleep
|
|
version: shared
|
|
spec:
|
|
shareProcessNamespace: true
|
|
containers:
|
|
- name: sleep
|
|
image: kiamol/ch03-sleep
|
|
- name: server
|
|
image: kiamol/ch03-sleep
|
|
command: ['sh', '-c', "while true; do echo -e 'HTTP/1.1 200 OK\nContent-Type: text/plain\nContent-Length: 7\n\nkiamol' | nc -l -p 8080; done"]
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|