Created
November 1, 2018 19:09
-
-
Save wgordon17/1c95af1885d4fdcfea4f836c45b5eb39 to your computer and use it in GitHub Desktop.
An example of minimum required deployment config for OpenShift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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
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