kubernetes-handbook/manifests/linkerd/hello-world-grpc.yml

90 lines
1.7 KiB
YAML
Raw Normal View History

2017-08-01 21:20:16 +08:00
---
apiVersion: v1
kind: ReplicationController
metadata:
name: hello
spec:
replicas: 3
selector:
app: hello
template:
metadata:
labels:
app: hello
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
command:
- "/bin/sh"
- "-c"
- "helloworld -addr=:7777 -text=Hello -target=$NODE_NAME:4140 -protocol=grpc"
ports:
- name: service
containerPort: 7777
---
apiVersion: v1
kind: Service
metadata:
name: hello
spec:
selector:
app: hello
clusterIP: None
ports:
- name: grpc
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
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: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: TARGET_WORLD
value: world
args:
- "-addr=:7778"
- "-protocol=grpc"
ports:
- name: service
containerPort: 7778
---
apiVersion: v1
kind: Service
metadata:
name: world-v1
spec:
selector:
app: world-v1
clusterIP: None
ports:
- name: grpc
port: 7778