2017-08-01 21:20:16 +08:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ReplicationController
|
|
|
|
metadata:
|
|
|
|
name: api
|
|
|
|
spec:
|
|
|
|
replicas: 3
|
|
|
|
selector:
|
|
|
|
app: api
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: api
|
|
|
|
spec:
|
|
|
|
dnsPolicy: ClusterFirst
|
|
|
|
containers:
|
|
|
|
- name: service
|
2018-05-04 19:53:39 +08:00
|
|
|
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
|
2017-08-01 21:20:16 +08:00
|
|
|
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=:7779"
|
|
|
|
- "-text=api"
|
|
|
|
- "-target=hello"
|
|
|
|
- "-json"
|
|
|
|
ports:
|
|
|
|
- name: service
|
|
|
|
containerPort: 7779
|
|
|
|
- name: kubectl
|
2018-05-04 19:53:39 +08:00
|
|
|
image: harbor-001.jimmysong.io/library/buoyantio-kubectl:v1.4.0
|
2017-08-01 21:20:16 +08:00
|
|
|
args:
|
|
|
|
- proxy
|
|
|
|
- "-p"
|
|
|
|
- "8001"
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: api
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: api
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
port: 7779
|