forked from username/flaskpaste
kubernetes: use NodePort for external access
- change service type from ClusterIP to NodePort (30500) - enables HAProxy routing from mymx to k8s cluster
This commit is contained in:
@@ -27,6 +27,7 @@ metadata:
|
|||||||
name: flaskpaste-data
|
name: flaskpaste-data
|
||||||
namespace: flaskpaste
|
namespace: flaskpaste
|
||||||
spec:
|
spec:
|
||||||
|
storageClassName: local-path
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
@@ -54,9 +55,11 @@ spec:
|
|||||||
runAsUser: 999
|
runAsUser: 999
|
||||||
runAsGroup: 999
|
runAsGroup: 999
|
||||||
fsGroup: 999
|
fsGroup: 999
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harbor-creds
|
||||||
containers:
|
containers:
|
||||||
- name: flaskpaste
|
- name: flaskpaste
|
||||||
image: localhost/flaskpaste:latest
|
image: 192.168.122.154:30443/library/flaskpaste:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
@@ -75,14 +78,14 @@ spec:
|
|||||||
cpu: "250m"
|
cpu: "250m"
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /
|
||||||
port: 5000
|
port: 5000
|
||||||
initialDelaySeconds: 10
|
initialDelaySeconds: 10
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /
|
||||||
port: 5000
|
port: 5000
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
@@ -104,7 +107,8 @@ spec:
|
|||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 5000
|
targetPort: 5000
|
||||||
type: ClusterIP
|
nodePort: 30500
|
||||||
|
type: NodePort
|
||||||
---
|
---
|
||||||
# Optional: Ingress for external access
|
# Optional: Ingress for external access
|
||||||
# Uncomment and adjust for your ingress controller
|
# Uncomment and adjust for your ingress controller
|
||||||
|
|||||||
Reference in New Issue
Block a user