Skip to content

Instantly share code, notes, and snippets.

@hjacobs
Created January 13, 2017 08:36
Show Gist options
  • Select an option

  • Save hjacobs/94e5543b37608e473c18d8bbeae193df to your computer and use it in GitHub Desktop.

Select an option

Save hjacobs/94e5543b37608e473c18d8bbeae193df to your computer and use it in GitHub Desktop.

Revisions

  1. hjacobs created this gist Jan 13, 2017.
    30 changes: 30 additions & 0 deletions add-my-ssh-key.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    apiVersion: extensions/v1beta1
    kind: DaemonSet
    metadata:
    name: add-my-ssh-key
    labels:
    application: add-my-ssh-key
    spec:
    template:
    metadata:
    name: add-my-ssh-key
    labels:
    application: add-my-ssh-key
    spec:
    containers:
    - name: shell
    image: registry.opensource.zalan.do/stups/ubuntu:latest
    command:
    - /bin/bash
    - -c
    args:
    - "curl https://even.stups.zalan.do/public-keys/hjacobs/sshkey.pub -o /host-root/home/core/.ssh/authorized_keys.d/hjacobs && cat /host-root/home/core/.ssh/authorized_keys.d/hjacobs >> /host-root/home/core/.ssh/authorized_keys; sleep 99999"
    securityContext:
    privileged: true
    volumeMounts:
    - mountPath: /host-root
    name: host-root
    volumes:
    - name: host-root
    hostPath:
    path: /