-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8s.yaml
39 lines (39 loc) · 894 Bytes
/
k8s.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: ssh-server
annotations:
description: "ssh server"
labels:
app: ssh-server
name: ssh-server
spec:
replicas: 1
template:
metadata:
labels:
app: ssh-server
spec:
containers:
- name: ssh-server
image: dmitrievav/ssh-server
ports:
- containerPort: 22
name: ssh-server-port
env:
- name: SSH_PUB_KEY
valueFrom:
secretKeyRef:
name: ssh-pub-key
key: id_rsa.pub
# it does not work due wrong permissions
# volumeMounts:
# - mountPath: /root/.ssh
# name: ssh-pub-key
# volumes:
# - name: ssh-pub-key
# secret:
# secretName: ssh-pub-key
# items:
# - key: id_rsa.pub
# path: authorized_keys