Created
January 4, 2020 18:08
-
-
Save runlevl4/940edb9101238a20700063fca8481ba9 to your computer and use it in GitHub Desktop.
Describes how to easily create multiple Kubernetes resources
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
# Note: All examples have aliased kubectl to k --> alias k=kubectl | |
# Create a NGINX pod | |
k run nginx --image=nginx --restart=Never | |
# Create a NGINX deployment with 3 replicas | |
k run nginx --image=nginx --replicas=3 | |
# Create a Job based on the busybox image. Execute the command "sleep 4800" | |
k run bb-job --image=busybox --restart=OnFailure -- /bin/sh -c "sleep 4800" | |
# Create a CronJob based on the busybox image. Write the date to stdout every minute. | |
k run bb-cj --image=busybox --restart=OnFailure --schedule="*/1 * * * *" -- date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment