diff --git a/.taskfiles/kubernetes/Taskfile.yaml b/.taskfiles/kubernetes/Taskfile.yaml index 06c543914d..5a955141ec 100644 --- a/.taskfiles/kubernetes/Taskfile.yaml +++ b/.taskfiles/kubernetes/Taskfile.yaml @@ -29,74 +29,19 @@ tasks: alpine: desc: Run alpine container - cmds: - - kubectl run -it alpine --image alpine:3.15.4 + cmd: "{{.ROOT_DIR}}/hack/ashell.sh" - dnsutils: - desc: Run DNSUtils pod - cmds: - - kubectl run -it dnsutils --image gcr.io/kubernetes-e2e-test-images/dnsutils:1.3 + ubuntu: + desc: Run ubuntu container + cmd: "{{.ROOT_DIR}}/hack/ushell.sh" + + netshoot: + desc: Run netshoot pod + cmd: kubectl netshoot --context {{.cluster}} run netshoot + vars: + cluster: '{{.cluster | default "main"}}' what-dockerhub: desc: What dockerhub images are running in my cluster cmds: - kubectl get pods --all-namespaces -o=jsonpath="{range .items[*]}{'\n'}{range .spec.containers[*]}{.image}{'\n'}{end}{end}" | sort | uniq | grep -Ev 'quay|gcr|ghcr|ecr|us-docker' | grep -Ev 'bitnami|rook|intel|grafana' | sed -e 's/docker\.io\///g' | sort | uniq - - debug-networking: - desc: Create a netshoot container for debugging - cmds: - - kubectl run tmp-shell --rm -i --tty --image docker.io/nicolaka/netshoot:latest {{.CLI_ARGS}} - - debug-volume: - desc: Attach a volume to a container for debugging, ex. VOLUME=zigbee2mqtt-config-v1 NAMESPACE=home task debug-volume - interactive: true - cmds: - - defer: kubectl -n ${NAMESPACE} delete pod debug-${VOLUME} - - | - cat <