-
Notifications
You must be signed in to change notification settings - Fork 0
/
17-admin-deployment.yaml
59 lines (59 loc) · 1.28 KB
/
17-admin-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apiVersion: v1
kind: Service
metadata:
name: admin
labels:
app: admin
spec:
ports:
- name: http
port: 8080
nodePort: 30148
selector:
app: admin
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: admin
labels:
app: admin
spec:
replicas: 1
selector:
matchLabels:
app: admin
template:
metadata:
labels:
app: admin
annotations:
"consul.hashicorp.com/connect-inject": "true"
"consul.hashicorp.com/service-meta-version": "1"
"consul.hashicorp.com/service-tags": "v1"
"consul.hashicorp.com/connect-service-upstreams": "admin:8081"
spec:
containers:
- name: admin
image: docker.io/vikramkhatri/hello-admin:1.0
ports:
- containerPort: 8080
name: http
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace