Skip to content

Instantly share code, notes, and snippets.

@rubberduck203
Created May 20, 2021 13:17
Show Gist options
  • Save rubberduck203/004c8c8887494b985bcc5f654fbdad91 to your computer and use it in GitHub Desktop.
Save rubberduck203/004c8c8887494b985bcc5f654fbdad91 to your computer and use it in GitHub Desktop.
# 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"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment