Spec Explorer kube-spec.dev: A handy tool for exploring Kubernetes resource specifications. Link: https://kubespec.dev Running a One-Time Job from a CronJob To execute a job based on an existing CronJob, use the following command:
kubectl create job --from=cronjob/<cronjob-name> <job-name> -n <namespace-name> Source: https://stackoverflow.com/a/50041304 Spawning a Curl Container for Debugging To quickly spin up a curl container with specific security and resource constraints, use:
kubectl run debug-curl \ --image=curlimages/curl \ --overrides='{ "apiVersion": "v1", "spec": { "securityContext": { "runAsNonRoot": true, "runAsUser": 1000, "runAsGroup": 1000 }, "containers": [ { "name": "debug-curl", "image": "curlimages/curl", "resources": { "requests": { "cpu": "100m", "memory": "128Mi" }, "limits": { "cpu": "200m", "memory": "256Mi" } }, "command": ["/bin/sh", "-c", "sleep infinity"] } ] } }' This command creates a debug-curl pod with a non-root user context and resource requests/limits. Connect to the shell using: kubectl exec -it pod/debug-curl sh Delete container using kubectl delete pod/debug-curl Getting Kubernetes Events To view Kubernetes events sorted by creation timestamp, use:
...