summaryrefslogtreecommitdiff
path: root/rocky-ssh-deployment.yaml
blob: 61e0dc90c88ed4a410af3e3b11ac1055643aede5 (plain)
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
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: rocky-dev-deploy
  labels:
    app: rocky-dev-deploy
spec:
  serviceName: rocky-dev-deploy-svc
  replicas: 3
  selector:
    matchLabels:
      app: rocky-dev-deploy
  template:
    metadata:
      labels:
        app: rocky-dev-deploy
    spec:
      containers:
      - name: rocky-dev-deploy
        image: localhost:5000/rocky_dev:latest
        imagePullPolicy: IfNotPresent  # Use local image
        ports:
        - containerPort: 22
          name: ssh
        securityContext:
          privileged: true
        livenessProbe:
          tcpSocket:
            port: 22
          initialDelaySeconds: 30
          periodSeconds: 30
        readinessProbe:
          tcpSocket:
            port: 22
          initialDelaySeconds: 5
          periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
  name: rocky-dev-deploy-svc
spec:
  clusterIP: None
  selector:
    app: rocky-dev-deploy
  ports:
  - port: 22
    targetPort: 22