Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Test pod preset in an init container
apiVersion: settings.k8s.io/v1alpha1
kind: PodPreset
metadata:
name: test
spec:
selector:
matchLabels:
app: test
env:
- name: SETME
value: "This should be set in the init container"
---
apiVersion: v1
kind: Pod
metadata:
name: test
labels:
app: test
spec:
initContainers:
- name: init
image: busybox
args: ["env"]
containers:
- name: test
image: busybox
args: [ "sleep", "1000"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.