-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathssh.yaml
46 lines (46 loc) · 948 Bytes
/
ssh.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
apiVersion: v1
kind: Service
metadata:
name: ssh
spec:
selector:
app: ssh
ports:
- protocol: TCP
port: 22
targetPort: 22
type: LoadBalancer
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ssh
namespace: default
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
app: ssh
template:
metadata:
creationTimestamp: null
labels:
app: ssh
spec:
containers:
- image: fedora/ssh
imagePullPolicy: IfNotPresent
name: ssh
command: ["/entrypoint.sh"]
args: ["/usr/bin/bash", "-c", "mkdir /root/.ssh; cp /tmp/ssh/authorized_keys /root/.ssh; chmod 700 /root/.ssh -R; /usr/sbin/sshd -D"]
ports:
- containerPort: 22
protocol: TCP
volumeMounts:
- mountPath: /tmp/ssh
name: ssh
volumes:
- name: ssh
configMap:
name: ssh
defaultMode: 0400