Last active
July 10, 2023 05:11
-
-
Save crlspe/094929e7d63c9576786f56d492e30474 to your computer and use it in GitHub Desktop.
K3s snippets
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
# Install k3s | |
# Build Dockerfile | |
docker build . -t simplejob:v1.0.0 | |
# save to a tar file | |
docker save --output simplejob-v1.0.0.tar simplejob:v1.0.0 | |
# create a yaml with dry-run | |
kubectl create cronjob simplejob --image=simplejob --schedule="*/1 * * * *" --dry-run=client -o yaml | |
# Import into k3s | |
sudo k3s ctr images import simplejob-v1.0.0.tar | |
# monitor pods | |
kubectl ged pods --watch | |
#Set docker in minikube | |
eval $(minikube docker-env) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment