Skip to content

Instantly share code, notes, and snippets.

@wgordon17
Created November 1, 2018 19:09
Show Gist options
  • Save wgordon17/1c95af1885d4fdcfea4f836c45b5eb39 to your computer and use it in GitHub Desktop.
Save wgordon17/1c95af1885d4fdcfea4f836c45b5eb39 to your computer and use it in GitHub Desktop.
An example of minimum required deployment config for OpenShift
kind: DeploymentConfig
apiVersion: v1
metadata:
name: minimal-dc
spec:
replicas: 1
selector:
name: busybox
template:
metadata:
labels:
name: busybox
spec:
containers:
- name: busybox
image: busybox
args:
- /bin/sh
- -c
- >
while true; do
sleep 10;
done
@wgordon17
Copy link
Author

containers is an array of the containers to be contained within the pod. It's certainly possible to provide more than 1 element in the array to have multiple containers in the pod, however it's typically more common to see just 1

@wgordon17
Copy link
Author

By default, the image within the containers array will use Dockerhub as the image repository to lookup. If you want to reference an image within your local cluster, you can either use the oc set image-lookup command (use oc set image-lookup -h for more details) to force local lookups for the specified image, or you can rely on ImageChange triggers and leave the image field off entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment