-
Notifications
You must be signed in to change notification settings - Fork 736
/
kubernetes.headless-vnc.example.deployment.yaml
70 lines (69 loc) · 1.58 KB
/
kubernetes.headless-vnc.example.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
#### POD config (run one time)
apiVersion: apps/v1
kind: Deployment
metadata:
name: headless-vnc
labels:
application: headless-vnc
spec:
# 1 Pods should exist at all times.
replicas: 1
selector:
matchLabels:
application: headless-vnc
template:
metadata:
labels:
application: headless-vnc
spec:
terminationGracePeriodSeconds: 5
containers:
- name: headless-vnc
image: consol/rocky-xfce-vnc
imagePullPolicy: Always
args:
### make normal UI startup to connect via: oc rsh <pod-name> bash
- '--tail-log'
### checks that vnc server is up and running
livenessProbe:
tcpSocket:
port: 5901
initialDelaySeconds: 1
timeoutSeconds: 1
### checks if http-vnc connection is working
readinessProbe:
httpGet:
path: /
port: 6901
scheme: HTTP
initialDelaySeconds: 1
timeoutSeconds: 1
#TODO remove later
securityContext:
runAsUser: 0
---
apiVersion: v1
kind: Service
metadata:
labels:
application: headless-vnc
name: headless-vnc
spec:
externalName: headless-vnc
ports:
- name: http-port-tcp
protocol: TCP
port: 6901
targetPort: 6901
nodePort: 32001
- name: vnc-port-tcp
protocol: TCP
port: 5901
targetPort: 5901
nodePort: 32002
selector:
application: headless-vnc
# type: NodePort
#### connect by: http://NODEIP:NODEPORT/?password=vncpassword
# Use type loadbalancer if needed
type: LoadBalancer