diff --git a/apex.yaml b/apex.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c3f69aa6f8677e8f4e82290dc982cb0f88508724 --- /dev/null +++ b/apex.yaml @@ -0,0 +1,77 @@ +--- +kind: Service +apiVersion: v1 +metadata: + name: apex-svc +spec: + selector: + app: apex + ports: + - name: ui + protocol: "TCP" + # Port accessible inside cluster + port: 8080 + # Port to forward to inside the pod + targetPort: http + # Port accessible outside cluster + nodePort: 30080 + - name: tcp-1 + protocol: "TCP" + # Port accessible inside cluster + port: 12345 + # Port to forward to inside the pod + targetPort: tcp1 + # Port accessible outside cluster + nodePort: 32345 + - name: tcp-2 + protocol: "TCP" + # Port accessible inside cluster + port: 18989 + # Port to forward to inside the pod + targetPort: tcp2 + # Port accessible outside cluster + nodePort: 28989 + - name: tcp-3 + protocol: "TCP" + # Port accessible inside cluster + port: 23324 + # Port to forward to inside the pod + targetPort: tcp3 + # Port accessible outside cluster + nodePort: 23324 + type: NodePort #LoadBalancer +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: apex + labels: + app: apex +spec: + selector: + matchLabels: + app: apex + replicas: 1 + template: + metadata: + labels: + app: apex + spec: + containers: + - name: apex + image: gitlab-registry.eps.surrey.ac.uk/noc/apex:example + #command: ["sh", "-c", "while true; do sleep 3600; done"] + command: ["sh", "-c", "/apex/start.sh"] + ports: + - name: http + containerPort: 8080 + - name: tcp1 + containerPort: 12345 + - name: tcp2 + containerPort: 18989 + - name: tcp3 + containerPort: 23324 + imagePullPolicy: IfNotPresent + restartPolicy: Always +