Skip to content

Instantly share code, notes, and snippets.

@crlspe
Last active July 10, 2023 05:11
Show Gist options
  • Save crlspe/094929e7d63c9576786f56d492e30474 to your computer and use it in GitHub Desktop.
Save crlspe/094929e7d63c9576786f56d492e30474 to your computer and use it in GitHub Desktop.
K3s snippets
# 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