forked from rdegges/ipify-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ipify-deployment.yaml
76 lines (74 loc) · 1.57 KB
/
ipify-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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# ipify-api server deployment for k8s
# author: tekintian@gmail.com
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ipify-deployment
namespace: default
labels:
name: ipify
app: ipify-api
version: "202202"
spec:
replicas: 1
selector:
matchLabels:
name: ipify
app: ipify-api
version: "202202"
template:
metadata:
labels:
name: ipify
app: ipify-api
version: "202202"
spec:
containers:
- name: ipify
image: tekintian/ipify-api:202202
ports:
- containerPort: 3000
name: tcp
protocol: TCP
---
# ipify-api service for Cluster IP
# Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. This is the default type.
kind: Service
apiVersion: v1
metadata:
name: ipify
namespace: default
labels:
name: ipify
app: ipify-api
version: "202202"
spec:
ports:
- name: ipify-port
port: 3000
protocol: TCP
targetPort: 3000
selector:
name: ipify
app: ipify-api
version: "202202"
---
# ipify-api service for Node Port
# Exposes the service on each node's IP at a static port (the `NodePort`). You'll be able to contact this type of service, from outside the cluster, by requesting `<NodeIP>:<NodePort>`.
apiVersion: v1
kind: Service
metadata:
name: ipify-port
namespace: default
spec:
ports:
- nodePort: 31003
port: 3000
protocol: TCP
targetPort: 3000
selector:
name: ipify
app: ipify-api
version: "202202"
type: NodePort