Skip to content

Instantly share code, notes, and snippets.

@rubberduck203
Created May 20, 2021 13:17
Show Gist options
  • Select an option

  • Save rubberduck203/004c8c8887494b985bcc5f654fbdad91 to your computer and use it in GitHub Desktop.

Select an option

Save rubberduck203/004c8c8887494b985bcc5f654fbdad91 to your computer and use it in GitHub Desktop.

Revisions

  1. rubberduck203 created this gist May 20, 2021.
    22 changes: 22 additions & 0 deletions bastion-container.k8s
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # Example of how to keep a container running long enough to `exec` into it
    # https://stackoverflow.com/a/40605238/3198973
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: some-deployment
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: some-service
    template:
    metadata:
    labels:
    app: some-service
    spec:
    containers:
    - name: some-service
    image: some-image
    - name: bastion
    image: ubuntu
    command: ["tail", "-f", "/dev/null"]