Created
October 11, 2020 09:45
-
-
Save hulucc/1d453bcc0eef936dc2dce5960d20f7ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: udppress | |
namespace: default | |
spec: | |
selector: | |
matchLabels: | |
app: udppress | |
replicas: 1 | |
revisionHistoryLimit: 0 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 0 | |
template: | |
metadata: | |
labels: | |
app: udppress | |
spec: | |
restartPolicy: Always | |
containers: | |
- name: udppress | |
image: local/udppress:latest | |
imagePullPolicy: Never | |
command: ["/main", "server"] | |
# securityContext: | |
# allowPrivilegeEscalation: true | |
# capabilities: | |
# add: ["NET_ADMIN"] | |
readinessProbe: | |
exec: | |
command: | |
- /main | |
- health | |
initialDelaySeconds: 1 | |
periodSeconds: 1 | |
livenessProbe: | |
exec: | |
command: | |
- /main | |
- health | |
initialDelaySeconds: 5 | |
periodSeconds: 1 | |
lifecycle: | |
preStop: | |
exec: | |
command: ["/main", "stop"] | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: udppress | |
namespace: default | |
spec: | |
selector: | |
app: udppress | |
type: LoadBalancer | |
ports: | |
- port: 30000 | |
targetPort: 30000 | |
protocol: UDP | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment