89 lines
1.6 KiB
YAML
89 lines
1.6 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: ReplicationController
|
|
metadata:
|
|
name: hello
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
app: hello
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: hello
|
|
spec:
|
|
dnsPolicy: ClusterFirst
|
|
containers:
|
|
- name: service
|
|
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
|
|
env:
|
|
- name: NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
- name: http_proxy
|
|
value: $(NODE_NAME):4140
|
|
args:
|
|
- "-addr=:7777"
|
|
- "-text=Hello"
|
|
- "-target=world"
|
|
ports:
|
|
- name: service
|
|
containerPort: 7777
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: hello
|
|
spec:
|
|
selector:
|
|
app: hello
|
|
ports:
|
|
- name: http
|
|
port: 7777
|
|
---
|
|
apiVersion: v1
|
|
kind: ReplicationController
|
|
metadata:
|
|
name: world-v1
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
app: world-v1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: world-v1
|
|
spec:
|
|
dnsPolicy: ClusterFirst
|
|
containers:
|
|
- name: service
|
|
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
|
|
env:
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
- name: TARGET_WORLD
|
|
value: world
|
|
args:
|
|
- "-addr=:7778"
|
|
ports:
|
|
- name: service
|
|
containerPort: 7778
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: world-v1
|
|
spec:
|
|
selector:
|
|
app: world-v1
|
|
ports:
|
|
- name: http
|
|
port: 7778
|