apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: ssh-server
  namespace: kube-system
spec:
  replicas: 2
  template:
    metadata:
      labels:
        app: ssh-server
    spec:
      containers:
      - name: ssh-server
        image: previousnext/k8s-ssh:latest
        imagePullPolicy: Always
        ports:
          - containerPort: 22
---
apiVersion: v1
kind: Service
metadata:
  name: ssh-server
  namespace: kube-system
spec:
  type: NodePort
  selector:
    app: ssh-server
  ports:
  - port: 22
    targetPort: 22
    protocol: TCP
    name: ssh
