-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathcreate-pods-services.yaml
More file actions
61 lines (61 loc) · 1.27 KB
/
create-pods-services.yaml
File metadata and controls
61 lines (61 loc) · 1.27 KB
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
60
61
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: lb-premium-nb
name: test
spec:
replicas: 2
selector:
matchLabels:
app: lb-premium-nb
template:
metadata:
labels:
app: lb-premium-nb
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- simple-lb
topologyKey: kubernetes.io/hostname
weight: 100
containers:
- image: appscode/test-server:2.3
name: test
ports:
- name: http-1
containerPort: 8080
protocol: TCP
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
---
apiVersion: v1
kind: Service
metadata:
name: svc-test
annotations:
service.beta.kubernetes.io/linode-loadbalancer-nodebalancer-type: premium
labels:
app: lb-premium-nb
spec:
type: LoadBalancer
selector:
app: lb-premium-nb
ports:
- name: http-1
protocol: TCP
port: 80
targetPort: 8080
sessionAffinity: None