From e0aeda9660a6cca1ace6bb26509c517157974913 Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 14:12:15 +1030 Subject: [PATCH 01/13] wip: first pass on the timeout and some cleanup This will do some other changes like : * remove mongo * add node back in slimer version * update the image to squeeze some more juice * other minimal stuff --- Dockerfile | 65 ++++++++++--- README.md | 221 +++++++++++++++++++++++++++++------------- k8s-cluster-utils.yml | 28 ++++-- kickstart.sh | 21 ---- sleeper.sh | 12 +-- welcome.sh | 80 +++++++++++++++ 6 files changed, 310 insertions(+), 117 deletions(-) delete mode 100755 kickstart.sh create mode 100644 welcome.sh diff --git a/Dockerfile b/Dockerfile index 4a4e271..a3eb593 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,58 @@ -FROM alpine +FROM alpine:latest -# ENV LANG en_AU.UTF-8 -# ENV LANGUAGE en_AU.UTF-8 -# ENV LC_ALL en_AU.UTF-8 -# ENV LC_CTYPE=en_AU.UTF-8 ENV TZ="Australia/Adelaide" -# ENV DEBIAN_FRONTEND "noninteractive apt-get autoremove" WORKDIR /app -COPY ./*.sh /app/ -RUN apk add --no-cache \ - bind-tools netcat-openbsd curl \ - git jq vim tmux zsh \ - postgresql-client redis mongodb-tools \ - git nodejs +# Copy scripts +COPY sleeper.sh /app/runner.sh +COPY welcome.sh /app/welcome.sh -RUN ./kickstart.sh +# Install packages, setup tools, and cleanup in a single layer +RUN set -eux && \ + # Install system packages + apk add --no-cache \ + bind-tools \ + netcat-openbsd \ + curl \ + wget \ + git \ + jq \ + vim \ + tmux \ + zsh \ + postgresql-client \ + redis \ + npm \ + tar && \ + # Install oh-my-zsh + sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && \ + # Install k6 (lighter than vegeta) - always get the latest version + K6_VERSION=$(curl -s https://api.github.com/repos/grafana/k6/releases/latest | jq -r '.tag_name') && \ + curl -sS -L https://github.com/grafana/k6/releases/download/${K6_VERSION}/k6-${K6_VERSION}-linux-amd64.tar.gz | tar -xz --strip-components=1 && \ + mv k6 /usr/local/bin/ && \ + # Make scripts executable and configure welcome message + chmod +x /app/runner.sh /app/welcome.sh && \ + echo "# Show welcome message on interactive shell login" >> /root/.zshrc && \ + echo "if [[ \$- == *i* ]] && [[ -z \$WELCOME_SHOWN ]]; then" >> /root/.zshrc && \ + echo " export WELCOME_SHOWN=1" >> /root/.zshrc && \ + echo " /app/welcome.sh" >> /root/.zshrc && \ + echo "fi" >> /root/.zshrc && \ + # Set zsh as the default shell for root user in multiple ways for compatibility + sed -i 's|root:.*:/bin/.*sh|root:x:0:0:root:/root:/bin/zsh|g' /etc/passwd && \ + # Also set SHELL environment variable as fallback + echo 'export SHELL=/bin/zsh' >> /root/.profile && \ + echo 'export SHELL=/bin/zsh' >> /root/.zshrc && \ + # Create a .profile that auto-switches to zsh if we're in an interactive session with sh/ash + echo '# Auto-switch to zsh if in interactive mode and not already in zsh' >> /root/.profile && \ + echo 'if [ -t 0 ] && [ "$0" != "/bin/zsh" ] && [ "$0" != "zsh" ] && [ -z "$ZSH_SWITCHED" ]; then' >> /root/.profile && \ + echo ' export ZSH_SWITCHED=1' >> /root/.profile && \ + echo ' exec /bin/zsh' >> /root/.profile && \ + echo 'fi' >> /root/.profile && \ + # Make sure .profile is sourced by ash/sh + ln -sf /root/.profile /root/.ashrc && \ + # Cleanup to reduce image size + rm -rf /var/cache/apk/* /tmp/* /root/.oh-my-zsh/.git - -ENTRYPOINT ["sh", "/app/sleeper.sh"] +ENTRYPOINT ["sh", "/app/runner.sh"] diff --git a/README.md b/README.md index 84e39bc..da3fb96 100644 --- a/README.md +++ b/README.md @@ -1,102 +1,193 @@ -# cluster-utils +# 🐴 DonkeyX's Cluster Utils + +``` +╭────────────────────────────────────────╮ +| 🐴 DonkeyX's Cluster Utils │ +╰────────────────────────────────────────╯ + + //\\ + (/oo\) .----. + (____) | K8s | + /||\ '----' + //||\\ 🐛 Debug Mode + ^^ ^^ ^^ + "Braying at broken clusters!" +``` ## Description -Sample docker image to give you a bash session into your cluster, with lots of tools for testing -network routes etc. I find it super handy when i am testing istio routes/dns and security group -access. +A modern, lightweight Docker container designed for Kubernetes cluster debugging and network troubleshooting. Built on Alpine Linux with a comprehensive toolkit for testing network routes, DNS resolution, database connections, and service mesh configurations. -This container will by default run for 30mins before exiting. You can override this behavior -by modifying the env param ```RUNTIME=1234```. This can be done in the kubes pod definition or -passed to docker at runtime. +**Key Features:** +- 🚀 **Runs Continuously** - No timeouts, persistent debugging environment +- 🎨 **Beautiful Welcome** - Colorized interface with tool inventory +- 🐚 **Modern Shell** - Zsh with Oh My Zsh for enhanced productivity +- 🔧 **Latest Tools** - Automatically fetches latest versions (k6, etc.) +- 📦 **Optimized Size** - Single-layer build, minimal footprint (~220MB) -* dockerhub : https://hub.docker.com/r/donkeyx/cluster-utils +* **Container Registry**: `ghcr.io/donkeyx/cluster-utils:latest` or `donkeyx/cluster-utils:latest` -## Usage +## 🚀 Usage -### run image in k8 cluster: +### Deploy to Kubernetes Cluster + +Deploy as a **Deployment** (runs continuously, no timeouts): -You can run the pod in your cluster with the commands below, this will start the container -in the default namespace and timeout in 30mins. ```bash -# apply pod config with default 30min timeout -kubectl -n default \ - apply -f https://raw.githubusercontent.com/donkeyx/cluster-utils/master/k8s-cluster-utils.yml - -# list the pod -$ kubectl get pods -n default -NAME READY STATUS RESTARTS AGE -cluster-utils 1/1 Running 0 2m18s +# Deploy the cluster utilities as a persistent deployment +kubectl apply -f https://raw.githubusercontent.com/donkeyx/cluster-utils/master/k8s-cluster-utils.yml + +# Check the deployment +kubectl get deployments +NAME READY UP-TO-DATE AVAILABLE AGE +cluster-utils 1/1 1 1 30s + +# List the pod +kubectl get pods -l app=cluster-utils +NAME READY STATUS RESTARTS AGE +cluster-utils-7b8c9d4f5d-x9k2j 1/1 Running 0 45s ``` -Now the pod is running, you can exec into it and.. do whatever you need within the context of -your cluster/namespace. -```bash -# jump into container with zsh shell + ohmyzsh - ................ root@5341f0387b50 - ∴::::::::::::::::∴ OS: Alpine Linux - ∴::::::::::::::::::∴ Kernel: x86_64 Linux 4.19.76-linuxkit - ∴::::::::::::::::::::∴ Uptime: 6d 19h 30m - ∴:::::::. :::::':::::::∴ Packages: 67 - ∴:::::::. ;::; ::::::::∴ Shell: ash - ∴::::::; ∵ :::::::∴ Disk: / () - ∴:::::. . .::::::∴ CPU: Intel Core i7-7700HQ @ 4x 2.8GHz - :::::: :::. . :::::: RAM: 463MiB / 1991MiB - ∵:::: ::::::. ::. ::::∵ - ∵:.. .:;::::::: :::. :::∵ - ∵::::::::::::::::::::::::∵ - ∵::::::::::::::::::::::∵ - ∵::::::::::::::::::::∵ - :::::::::::::::::::: - ∵::::::::::::::::∵ +### Connect to the Container + +Multiple ways to connect - **all automatically give you zsh**: +```bash +# Any of these will give you zsh with the welcome message: +kubectl exec -it deployment/cluster-utils -- sh +kubectl exec -it deployment/cluster-utils -- zsh +kubectl exec -it deployment/cluster-utils -- /bin/sh + +# You'll see the welcome screen: +╭────────────────────────────────────────╮ +| 🐴 DonkeyX's Cluster Utils │ +╰────────────────────────────────────────╯ + + //\\ + (/oo\) .----. + (____) | K8s | + /||\ '----' + //||\\ 🐛 Debug Mode + ^^ ^^ ^^ + "Braying at broken clusters!" + +🚀 Welcome to the Kubernetes Cluster Utilities! 🚀 +===================================================== + +📦 Available Tools: + +🌐 Network & DNS: + • dig, nslookup, host (bind-tools) + • nc (netcat-openbsd) + • curl, wget + +🗄️ Database Clients: + • psql (PostgreSQL client v17.6) + • redis-cli (Redis client) + +🛠️ Development & Utilities: + • git (version control) + • jq (JSON processor) + • vim (text editor) + • tmux (terminal multiplexer) + • npm/node (JavaScript runtime) + +⚡ Load Testing: + • k6 (latest version - auto-updated) + +🐚 Shell Environment: + • zsh with Oh My Zsh + • Custom prompt and completions ``` -### Build image locally: +## 🔨 Local Development -You can build the image locally if you like and then push to your own repo for testing +### Build Image Locally ```bash -# clone repo -git@github.com:donkeyx/cluster-utils.git +# Clone the repository +git clone https://github.com/donkeyx/cluster-utils.git cd cluster-utils -# build and tag -docker build . -t donkeyx/cluster-utils +# Build with Docker or Podman +docker build -t cluster-utils:local . +# OR +podman build -t cluster-utils:local . -# push -docker push YOUR_REPO.../cluster-utils:latest +# Run locally for testing +docker run -d --name cluster-utils-test cluster-utils:local +docker exec -it cluster-utils-test sh # Automatically switches to zsh! ``` -### Start container: +### Container Runtime Options -Follow the build process above ```bash +# Run with Docker +docker run -d --rm --name cluster-utils donkeyx/cluster-utils:latest -$ docker run -e RUNTIME=60 -d --rm --name cluster-utils donkeyx/cluster-utils -1a3b19d75ab9a536ff531935e9da9f9c549d288cb0cab0d6bbdda2249b4ea680 - -$ docker ps -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -1a3b19d75ab9 donkeyx/cluster-utils "sh /tmp/sleeper.sh" 3 seconds ago Up 3 seconds cluster-utils - -$ docker exec -it cluster-utils zsh -➜ /tmp +# Run with Podman +podman run -d --rm --name cluster-utils donkeyx/cluster-utils:latest +# Connect (any of these work - all give you zsh): +docker exec -it cluster-utils sh +podman exec -it cluster-utils zsh +kubectl exec -it deployment/cluster-utils -- /bin/sh ``` -### Some useful command and packages available +## 🧰 Available Tools & Commands +### Network Diagnostics ```bash - -# check port is open +# Check if port is open nc -z -v -w5 10.1.1.51 8080 -# check dns +# DNS resolution dig google.com +nslookup my-service.default.svc.cluster.local + +# HTTP testing +curl -v https://api.example.com +wget --spider https://my-service/health +``` -# traceroute path for request -traceroute my-internal-service.com +### Database Testing +```bash +# PostgreSQL connection +psql -h postgres-host -U username -d database + +# Redis testing +redis-cli -h redis-host ping +redis-cli -h redis-host info server +``` + +### Load Testing +```bash +# k6 load testing (latest version auto-installed) +k6 run --vus 10 --duration 30s script.js +k6 run --http-debug https://api.example.com +``` +### Container & Kubernetes Debugging +```bash +# Check container environment +env | grep KUBERNETES +cat /var/run/secrets/kubernetes.io/serviceaccount/namespace + +# Network troubleshooting within cluster +nc -z -v service-name 80 +dig service-name.namespace.svc.cluster.local ``` + +## 🎯 Key Improvements + +- **No Timeouts**: Container runs continuously until manually stopped +- **Modern Tools**: Latest k6, PostgreSQL 17.6, npm instead of full Node.js +- **Optimized Size**: ~220MB (removed MongoDB tools, optimized layers) +- **Better UX**: Auto-switches to zsh, colorized welcome, tool inventory +- **Deployment Ready**: Kubernetes Deployment (not Job) for persistence +- **Multi-Shell Support**: Works with `sh`, `zsh`, or `bash` connections + +## 🐴 Why "Braying at Broken Clusters"? + +Because sometimes your clusters are stubborn as a mule, and you need the right tools to debug them! This container gives you everything you need to troubleshoot network issues, test services, and get your Kubernetes clusters working smoothly again. 🎯 diff --git a/k8s-cluster-utils.yml b/k8s-cluster-utils.yml index 269171b..53ae4a0 100644 --- a/k8s-cluster-utils.yml +++ b/k8s-cluster-utils.yml @@ -1,15 +1,23 @@ -apiVersion: v1 -kind: Pod +apiVersion: apps/v1 +kind: Deployment metadata: name: cluster-utils labels: + app: cluster-utils purpose: testing spec: - containers: - - name: cluster-utils - image: donkeyx/cluster-utils:latest - env: - - name: RUNTIME - value: "1800" - restartPolicy: Never - + replicas: 1 + selector: + matchLabels: + app: cluster-utils + template: + metadata: + labels: + app: cluster-utils + spec: + containers: + - name: cluster-utils + #image: ghcr.io/donkeyx/cluster-utils:latest + image: donkeyx/cluster-utils:latest + # Remove RUNTIME env if it was only for timeout + restartPolicy: Always diff --git a/kickstart.sh b/kickstart.sh deleted file mode 100755 index de71d88..0000000 --- a/kickstart.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env sh -set -eou pipefail - -# # decent prompt -echo "--- prompt setup zsh ---" - -apk add --no-cache zsh -sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" - -curl -sS -L https://github.com/tsenart/vegeta/releases/download/v12.8.3/vegeta-12.8.3-linux-amd64.tar.gz | tar -xz -mv vegeta /usr/local/bin - -# apk add --no-cache screenfetch --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing - -# echo "screenfetch" >> ~/.zshrc -# echo "export PATH=$HOME/go/bin:$PATH" >> ~/.zshrc - - -echo "--- cleanup ---" -rm -rf /var/cache/apk/* && \ - rm -rf /tmp/* diff --git a/sleeper.sh b/sleeper.sh index 21390f6..0736433 100755 --- a/sleeper.sh +++ b/sleeper.sh @@ -2,10 +2,10 @@ set -eu -# run for 30mins before ending -runtime=${RUNTIME:-1800} +echo "Container running continuously - ready for cluster utilities work" +echo "Use kubectl exec to connect and run commands interactively" +echo "Container will keep running until manually stopped" -echo "will run for $runtime seconds, before exiting container" -echo "-- you can override this by passing RUNTIME=33 to the container" - -sleep $runtime +# Keep container running indefinitely +# Using tail -f /dev/null is a common pattern for keeping containers alive +tail -f /dev/null diff --git a/welcome.sh b/welcome.sh new file mode 100644 index 0000000..54d2703 --- /dev/null +++ b/welcome.sh @@ -0,0 +1,80 @@ +#!/bin/sh + +# Welcome message and tool inventory for cluster-utils container +# Colors for better readability +if [ -t 1 ]; then + BOLD='\033[1m' + GREEN='\033[0;32m' + BLUE='\033[0;34m' + YELLOW='\033[1;33m' + CYAN='\033[0;36m' + NC='\033[0m' # No Color +else + BOLD='' GREEN='' BLUE='' YELLOW='' CYAN='' NC='' +fi + +echo "" +printf "${BOLD}${CYAN}" +cat << 'EOF' +╭────────────────────────────────────────╮ +| 🐴 DonkeyX's Cluster Utils │ +╰────────────────────────────────────────╯ + + //\\ + (/oo\) .----. + (____) | K8s | + /||\ '----' + //||\\ 🐛 Debug Mode + ^^ ^^ ^^ + "Braying at broken clusters!" + +EOF +printf "${NC}" +printf "${BOLD}${GREEN}🚀 Welcome to the Kubernetes Cluster Utilities! 🚀${NC}\n" +printf "${BOLD}=====================================================${NC}\n" +echo "" +printf "${BOLD}${BLUE}📦 Available Tools:${NC}\n" +echo "" + +# Network & DNS tools +printf "${CYAN}🌐 Network & DNS:${NC}\n" +echo " • dig, nslookup, host (bind-tools)" +echo " • nc (netcat-openbsd)" +echo " • curl, wget" +echo "" + +# Database clients +printf "${CYAN}🗄️ Database Clients:${NC}\n" +PG_VERSION=$(psql --version 2>/dev/null | cut -d' ' -f3 | cut -d'.' -f1-2 || echo 'N/A') +echo " • psql (PostgreSQL client v${PG_VERSION})" +echo " • redis-cli (Redis client)" +echo "" + +# Development & utilities +printf "${CYAN}🛠️ Development & Utilities:${NC}\n" +echo " • git (version control)" +echo " • jq (JSON processor)" +echo " • vim (text editor)" +echo " • tmux (terminal multiplexer)" +echo " • npm/node (JavaScript runtime)" +echo "" + +# Load testing +printf "${CYAN}⚡ Load Testing:${NC}\n" +K6_VERSION=$(k6 version 2>/dev/null | head -1 || echo 'load testing tool') +echo " • k6 (${K6_VERSION})" +echo "" + +# Shell +printf "${CYAN}🐚 Shell Environment:${NC}\n" +echo " • zsh with Oh My Zsh" +echo " • Custom prompt and completions" +echo "" + +printf "${BOLD}${YELLOW}💡 Tips:${NC}\n" +echo " • Use 'kubectl exec -it -- zsh' for interactive shell" +echo " • All tools are in PATH and ready to use" +echo " • Container runs continuously - no timeouts!" +echo "" +printf "${BOLD}${GREEN}Happy cluster debugging! 🎯${NC}\n" +echo "" \ No newline at end of file From f3cd394f27b4c63343966575755769a6b20d847f Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 14:45:11 +1030 Subject: [PATCH 02/13] wip: fixing the old gh action for docker login --- .github/workflows/docker-build-push.yml | 26 ++++++++++++------------- .github/workflows/release.yml | 6 +++--- Changelog.md | 19 ++++++++++++++++++ 3 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 Changelog.md diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index f523306..a9d6f33 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -2,10 +2,10 @@ name: Docker build and push on: push: - branches: [ $default-branch, 'release/*'] + branches: [ master, 'release/*'] tags: [ 'v*.*.*' ] pull_request: - branches: [ $default-branch ] + branches: [ master ] env: IMAGE_NAME: ${{ github.repository }} @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Capture build vars @@ -57,28 +57,27 @@ jobs: echo "hash: $hash" echo "dockertag: $docker_tag" - echo "::set-output name=git_ref::$git_ref" - echo "::set-output name=sha_short::$hash" - echo "::set-output name=docker_tag::$docker_tag" - echo "::set-output name=latest_tag::$latest_tag" + echo "git_ref=$git_ref" >> $GITHUB_OUTPUT + echo "sha_short=$hash" >> $GITHUB_OUTPUT + echo "docker_tag=$docker_tag" >> $GITHUB_OUTPUT + echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT # for multi architecture builds arm/x86 - - name: Setup qumu runner - uses: docker/setup-qemu-action@v1 + - name: Setup QEMU runner + uses: docker/setup-qemu-action@v3 - name: Setup Docker buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 # ################################ # push docker images (dockerhub/github) # ################################ - name: Log into registry (dockerhub) if: github.event_name != 'pull_request' - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PASS }} - logout: true - name: Build and push docker image (dockerhub) @@ -94,12 +93,11 @@ jobs: - name: Log into registry (github) if: github.event_name != 'pull_request' - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - logout: true - name: Build and push docker image (github) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 600097a..f83a313 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,15 +22,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # ################################ # create release and push assets # ################################ - - name: Build go binaries + - name: Verify Docker build if: startsWith(github.ref, 'refs/tags/') run: | - make build-all + docker build -t cluster-utils:release-test . - name: Release to github with Notes uses: softprops/action-gh-release@v1 diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 0000000..76efee6 --- /dev/null +++ b/Changelog.md @@ -0,0 +1,19 @@ +# Changelog + +## [3.0.0] - 2025-10-08 +### Added +- 🐴 ASCII donkey mascot with colorized welcome message +- Auto-updating k6 load testing tool (fetches latest version) +- Zsh as default shell with Oh My Zsh configuration +- Multi-shell auto-switching capability + +### Changed +- **BREAKING**: Converted from Job to Deployment for continuous operation +- Replaced vegeta with k6 for modern load testing +- Optimized Docker layers for smaller image size (~220MB) +- Enhanced README with comprehensive usage examples + +### Removed +- All timeout configurations (RUNTIME env, ttlSecondsAfterFinished) +- MongoDB tools (reduced bloat) +- Separate kickstart.sh script (consolidated into Dockerfile) \ No newline at end of file From e5547d72855331fce235ea94955848804db9270e Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 14:53:13 +1030 Subject: [PATCH 03/13] wip: fixing docker login v3 --- .github/workflows/docker-build-push.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index a9d6f33..6c9fe85 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -72,15 +72,30 @@ jobs: # ################################ # push docker images (dockerhub/github) # ################################ - - name: Log into registry (dockerhub) + - name: Verify DockerHub secrets if: github.event_name != 'pull_request' + run: | + if [ -z "${{ secrets.DOCKERHUB_USER }}" ]; then + echo "❌ DOCKERHUB_USER secret is not set" + exit 1 + fi + if [ -z "${{ secrets.DOCKERHUB_PASS }}" ]; then + echo "❌ DOCKERHUB_PASS secret is not set" + exit 1 + fi + echo "✅ DockerHub secrets are configured" + + - name: Log into registry (dockerhub) + if: github.event_name != 'pull_request' && secrets.DOCKERHUB_USER != '' uses: docker/login-action@v3 with: + registry: docker.io username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PASS }} - name: Build and push docker image (dockerhub) + if: github.event_name != 'pull_request' && secrets.DOCKERHUB_USER != '' run: | docker buildx build \ From 2b10f86b5e1f113f42804d3a8b50c4e87ee73a8c Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 14:58:36 +1030 Subject: [PATCH 04/13] wip: another test --- .github/workflows/docker-build-push.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 6c9fe85..99bf308 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -72,26 +72,13 @@ jobs: # ################################ # push docker images (dockerhub/github) # ################################ - - name: Verify DockerHub secrets - if: github.event_name != 'pull_request' - run: | - if [ -z "${{ secrets.DOCKERHUB_USER }}" ]; then - echo "❌ DOCKERHUB_USER secret is not set" - exit 1 - fi - if [ -z "${{ secrets.DOCKERHUB_PASS }}" ]; then - echo "❌ DOCKERHUB_PASS secret is not set" - exit 1 - fi - echo "✅ DockerHub secrets are configured" - - name: Log into registry (dockerhub) - if: github.event_name != 'pull_request' && secrets.DOCKERHUB_USER != '' + if: github.event_name != 'pull_request' && secrets.DOCKERHUB_USERNAME != '' uses: docker/login-action@v3 with: registry: docker.io - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PASS }} + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push docker image (dockerhub) From 47fd5b0c4ccb90282729dc01f9024b4aafd91bcf Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 15:08:42 +1030 Subject: [PATCH 05/13] wip: another test using -api conf --- .github/workflows/docker-build-push.yml | 155 +++++++++++------------- 1 file changed, 74 insertions(+), 81 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 99bf308..5de118f 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -2,111 +2,104 @@ name: Docker build and push on: push: - branches: [ master, 'release/*'] - tags: [ 'v*.*.*' ] - pull_request: - branches: [ master ] - -env: - IMAGE_NAME: ${{ github.repository }} - + tags: + - "v*" + branches: + - "release/*" jobs: - build: - environment: deployment # this gets the secrets for deployments + cache: + runs-on: ubuntu-latest + environment: ci + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Cache Go packages and Docker layers + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + /tmp/.buildx-cache + key: go-docker-${{ runner.os }}-${{ hashFiles('**/*.go') }} + restore-keys: | + go-docker-${{ runner.os }}- + + docker: + needs: cache runs-on: ubuntu-latest + environment: ci permissions: - contents: read + contents: write packages: write id-token: write - steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.25 - - name: Capture build vars - id: vars - shell: bash - run: | - git_ref=$(echo ${GITHUB_REF#refs/*/}| tr "/" "-" ) - hash=${GITHUB_SHA::6} - - if [ "$GITHUB_REF_TYPE" == "tag" ]; then - echo "processing tag" - docker_tag="$git_ref" - - echo "docker tag string latest" - latest_tag=" -t \donkeyx/cluster-utils:latest" - - fi - - if [ "$GITHUB_REF_TYPE" == "branch" ]; then - echo "processing branch" - - if [ "$git_ref" == "master" ]; then - echo "match latest" - docker_tag=latest - fi - - docker_tag="${git_ref}" - fi - - echo "branch: $git_ref" - echo "hash: $hash" - echo "dockertag: $docker_tag" - - echo "git_ref=$git_ref" >> $GITHUB_OUTPUT - echo "sha_short=$hash" >> $GITHUB_OUTPUT - echo "docker_tag=$docker_tag" >> $GITHUB_OUTPUT - echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT - - # for multi architecture builds arm/x86 - - name: Setup QEMU runner + - name: Cache Go packages (reuse cache from 'cache' job) + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: go-${{ runner.os }}-${{ hashFiles('**/*.go') }} + restore-keys: | + go-${{ runner.os }}- + + - name: Docker metadata setup + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/donkeyx/cluster-utils + docker.io/donkeyx/cluster-utils + tags: | + type=sha + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}} + type=semver,pattern={{major}}.{{minor}} + branches: | + release/* + + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - name: Setup Docker buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + # with: + # driver-opts: | + # image=moby/buildkit:v0.15.0 + # buildkitd-flags: --debug + - # ################################ - # push docker images (dockerhub/github) - # ################################ - - name: Log into registry (dockerhub) - if: github.event_name != 'pull_request' && secrets.DOCKERHUB_USERNAME != '' + - name: Login to Docker Hub uses: docker/login-action@v3 with: - registry: docker.io username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push docker image (dockerhub) - if: github.event_name != 'pull_request' && secrets.DOCKERHUB_USER != '' - run: | - - docker buildx build \ - --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ - -t "donkeyx/cluster-utils:${{ steps.vars.outputs.docker_tag }}" \ - ${{ steps.vars.outputs.latest_tag }} \ - --push \ - . - - - - name: Log into registry (github) - if: github.event_name != 'pull_request' + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push docker image (github) - run: | - docker buildx build \ - --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ - -t "ghcr.io/${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.docker_tag }}" \ - ${{ steps.vars.outputs.latest_tag }} \ - --push \ - . + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache \ No newline at end of file From 3913ec5f35199556537981ac12206c9abcf745f8 Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 15:14:41 +1030 Subject: [PATCH 06/13] wip: remove the docker refs this is pure container stuff --- .github/workflows/docker-build-push.yml | 31 ++++++++----------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 5de118f..bd91c9e 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -15,16 +15,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Cache Go packages and Docker layers + - name: Cache Docker layers uses: actions/cache@v4 with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - /tmp/.buildx-cache - key: go-docker-${{ runner.os }}-${{ hashFiles('**/*.go') }} + path: /tmp/.buildx-cache + key: docker-buildx-${{ runner.os }}-${{ github.sha }} restore-keys: | - go-docker-${{ runner.os }}- + docker-buildx-${{ runner.os }}- docker: needs: cache @@ -38,20 +35,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.25 - - - name: Cache Go packages (reuse cache from 'cache' job) - uses: actions/cache@v3 + - name: Cache Docker layers (reuse cache from 'cache' job) + uses: actions/cache@v4 with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: go-${{ runner.os }}-${{ hashFiles('**/*.go') }} + path: /tmp/.buildx-cache + key: docker-buildx-${{ runner.os }}-${{ github.sha }} restore-keys: | - go-${{ runner.os }}- + docker-buildx-${{ runner.os }}- - name: Docker metadata setup id: meta @@ -66,8 +56,7 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} - branches: | - release/* + type=raw,value=latest,enable={{is_default_branch}} - name: Set up QEMU uses: docker/setup-qemu-action@v3 From 4a2ccd06ecfe7f3236afdec90569498c8ff42ca9 Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 15:22:35 +1030 Subject: [PATCH 07/13] wip: cleanup the gh flow --- .github/workflows/docker-build-push.yml | 37 +++++++------------------ 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index bd91c9e..c3ae15c 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -5,26 +5,14 @@ on: tags: - "v*" branches: + - "master" - "release/*" + pull_request: + branches: + - "master" jobs: - cache: - runs-on: ubuntu-latest - environment: ci - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: docker-buildx-${{ runner.os }}-${{ github.sha }} - restore-keys: | - docker-buildx-${{ runner.os }}- - docker: - needs: cache runs-on: ubuntu-latest environment: ci permissions: @@ -35,14 +23,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Cache Docker layers (reuse cache from 'cache' job) - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: docker-buildx-${{ runner.os }}-${{ github.sha }} - restore-keys: | - docker-buildx-${{ runner.os }}- - - name: Docker metadata setup id: meta uses: docker/metadata-action@v4 @@ -70,6 +50,7 @@ jobs: - name: Login to Docker Hub + if: github.event_name != 'pull_request' && vars.DOCKERHUB_USERNAME != '' uses: docker/login-action@v3 with: username: ${{ vars.DOCKERHUB_USERNAME }} @@ -83,12 +64,14 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache \ No newline at end of file + cache-from: type=gha + cache-to: type=gha,mode=max + provenance: false + sbom: false \ No newline at end of file From 3624b3763260108520fa3579b662ff8df812fbdf Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 15:40:24 +1030 Subject: [PATCH 08/13] wip: another change to the readme to handle the podman --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index da3fb96..97a9fdc 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ /||\ '----' //||\\ 🐛 Debug Mode ^^ ^^ ^^ - "Braying at broken clusters!" + "Lets break some Shit!" ``` ## Description @@ -29,6 +29,26 @@ A modern, lightweight Docker container designed for Kubernetes cluster debugging ## 🚀 Usage +### Quick Interactive Access (Local) + +For immediate interactive shell access without deployment: + +```bash +# Interactive shell (with explicit zsh entry) +docker run -it --rm --entrypoint=/bin/zsh ghcr.io/donkeyx/cluster-utils:latest +podman run -it --rm --entrypoint=/bin/zsh ghcr.io/donkeyx/cluster-utils:latest + +# Alternative: Let auto-shell switching handle it (sh → zsh automatically) +docker run -it --rm --entrypoint=/bin/sh ghcr.io/donkeyx/cluster-utils:latest +podman run -it --rm --entrypoint=/bin/sh ghcr.io/donkeyx/cluster-utils:latest +``` + +**What you get:** +- ✅ Immediate zsh shell with Oh My Zsh +- ✅ Welcome screen with ASCII donkey and tool inventory +- ✅ All debugging tools ready to use +- ✅ Auto-cleanup when you exit (`--rm`) + ### Deploy to Kubernetes Cluster Deploy as a **Deployment** (runs continuously, no timeouts): @@ -48,9 +68,9 @@ NAME READY STATUS RESTARTS AGE cluster-utils-7b8c9d4f5d-x9k2j 1/1 Running 0 45s ``` -### Connect to the Container +### Connect to Deployed Container -Multiple ways to connect - **all automatically give you zsh**: +Multiple ways to connect to the **deployed** container - **all automatically give you zsh**: ```bash # Any of these will give you zsh with the welcome message: @@ -100,6 +120,16 @@ kubectl exec -it deployment/cluster-utils -- /bin/sh • Custom prompt and completions ``` +## 🎯 **Two Usage Modes** + +| Mode | Use Case | Command Pattern | +|------|----------|-----------------| +| **Interactive** | Quick local debugging, testing tools | `docker/podman run -it --rm --entrypoint=/bin/zsh ...` | +| **Deployment** | Persistent cluster pod, team access | `kubectl apply -f k8s-cluster-utils.yml` | + +### Deploy to Kubernetes Cluster +``` + ## 🔨 Local Development @@ -110,14 +140,17 @@ kubectl exec -it deployment/cluster-utils -- /bin/sh git clone https://github.com/donkeyx/cluster-utils.git cd cluster-utils -# Build with Docker or Podman +# Build the image docker build -t cluster-utils:local . -# OR podman build -t cluster-utils:local . # Run locally for testing docker run -d --name cluster-utils-test cluster-utils:local +podman run -d --name cluster-utils-test cluster-utils:local + +# Connect to test container docker exec -it cluster-utils-test sh # Automatically switches to zsh! +podman exec -it cluster-utils-test sh ``` ### Container Runtime Options @@ -125,12 +158,16 @@ docker exec -it cluster-utils-test sh # Automatically switches to zsh! ```bash # Run with Docker docker run -d --rm --name cluster-utils donkeyx/cluster-utils:latest +docker run -d --rm --name cluster-utils ghcr.io/donkeyx/cluster-utils:latest # Run with Podman podman run -d --rm --name cluster-utils donkeyx/cluster-utils:latest +podman run -d --rm --name cluster-utils ghcr.io/donkeyx/cluster-utils:latest -# Connect (any of these work - all give you zsh): +# Connect to running container (any of these work - all give you zsh): docker exec -it cluster-utils sh +docker exec -it cluster-utils zsh +podman exec -it cluster-utils sh podman exec -it cluster-utils zsh kubectl exec -it deployment/cluster-utils -- /bin/sh ``` From 579d0c738dc2b602ecb49e9ada535f5dbef57f89 Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 15:47:49 +1030 Subject: [PATCH 09/13] wip: switching to github as the default repo --- README.md | 63 ++++++++++++++++++++++--------------------- k8s-cluster-utils.yml | 21 +++++++++++++-- 2 files changed, 51 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 97a9fdc..419a4fb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A modern, lightweight Docker container designed for Kubernetes cluster debugging - 🔧 **Latest Tools** - Automatically fetches latest versions (k6, etc.) - 📦 **Optimized Size** - Single-layer build, minimal footprint (~220MB) -* **Container Registry**: `ghcr.io/donkeyx/cluster-utils:latest` or `donkeyx/cluster-utils:latest` +* **Container Registry**: `ghcr.io/donkeyx/cluster-utils:latest` (GitHub) or `donkeyx/cluster-utils:latest` (DockerHub) ## 🚀 Usage @@ -36,11 +36,11 @@ For immediate interactive shell access without deployment: ```bash # Interactive shell (with explicit zsh entry) docker run -it --rm --entrypoint=/bin/zsh ghcr.io/donkeyx/cluster-utils:latest -podman run -it --rm --entrypoint=/bin/zsh ghcr.io/donkeyx/cluster-utils:latest -# Alternative: Let auto-shell switching handle it (sh → zsh automatically) +# Alternative: Let auto-shell switching handle it (sh → zsh automatically) docker run -it --rm --entrypoint=/bin/sh ghcr.io/donkeyx/cluster-utils:latest -podman run -it --rm --entrypoint=/bin/sh ghcr.io/donkeyx/cluster-utils:latest + +# Note: Replace 'docker' with 'podman' if using Podman instead ``` **What you get:** @@ -57,26 +57,27 @@ Deploy as a **Deployment** (runs continuously, no timeouts): # Deploy the cluster utilities as a persistent deployment kubectl apply -f https://raw.githubusercontent.com/donkeyx/cluster-utils/master/k8s-cluster-utils.yml -# Check the deployment -kubectl get deployments -NAME READY UP-TO-DATE AVAILABLE AGE -cluster-utils 1/1 1 1 30s +# Check the deployment and service +kubectl get deployments,services -l app=cluster-utils +NAME READY UP-TO-DATE AVAILABLE AGE +deployment.apps/cluster-utils 1/1 1 1 30s -# List the pod -kubectl get pods -l app=cluster-utils -NAME READY STATUS RESTARTS AGE -cluster-utils-7b8c9d4f5d-x9k2j 1/1 Running 0 45s +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +service/cluster-utils ClusterIP 10.96.45.123 8080/TCP 30s ``` ### Connect to Deployed Container -Multiple ways to connect to the **deployed** container - **all automatically give you zsh**: +**Easy connection via service (no need to know pod name!):** ```bash -# Any of these will give you zsh with the welcome message: +# Connect using the service - simplest method: +kubectl exec -it service/cluster-utils -- sh +kubectl exec -it service/cluster-utils -- zsh + +# Alternative: Connect via deployment: kubectl exec -it deployment/cluster-utils -- sh -kubectl exec -it deployment/cluster-utils -- zsh -kubectl exec -it deployment/cluster-utils -- /bin/sh +kubectl exec -it deployment/cluster-utils -- zsh # You'll see the welcome screen: ╭────────────────────────────────────────╮ @@ -124,7 +125,7 @@ kubectl exec -it deployment/cluster-utils -- /bin/sh | Mode | Use Case | Command Pattern | |------|----------|-----------------| -| **Interactive** | Quick local debugging, testing tools | `docker/podman run -it --rm --entrypoint=/bin/zsh ...` | +| **Interactive** | Quick local debugging, testing tools | `docker run -it --rm --entrypoint=/bin/zsh ...` | | **Deployment** | Persistent cluster pod, team access | `kubectl apply -f k8s-cluster-utils.yml` | ### Deploy to Kubernetes Cluster @@ -142,34 +143,34 @@ cd cluster-utils # Build the image docker build -t cluster-utils:local . -podman build -t cluster-utils:local . # Run locally for testing docker run -d --name cluster-utils-test cluster-utils:local -podman run -d --name cluster-utils-test cluster-utils:local -# Connect to test container -docker exec -it cluster-utils-test sh # Automatically switches to zsh! -podman exec -it cluster-utils-test sh +# Connect to test container (automatically switches to zsh!) +docker exec -it cluster-utils-test sh + +# Note: All commands work with Podman by replacing 'docker' with 'podman' ``` ### Container Runtime Options ```bash -# Run with Docker -docker run -d --rm --name cluster-utils donkeyx/cluster-utils:latest +# Run with Docker (GitHub Container Registry - recommended) docker run -d --rm --name cluster-utils ghcr.io/donkeyx/cluster-utils:latest -# Run with Podman -podman run -d --rm --name cluster-utils donkeyx/cluster-utils:latest -podman run -d --rm --name cluster-utils ghcr.io/donkeyx/cluster-utils:latest +# Alternative: DockerHub registry +docker run -d --rm --name cluster-utils donkeyx/cluster-utils:latest -# Connect to running container (any of these work - all give you zsh): +# Connect to running container (any shell command gives you zsh): docker exec -it cluster-utils sh docker exec -it cluster-utils zsh -podman exec -it cluster-utils sh -podman exec -it cluster-utils zsh -kubectl exec -it deployment/cluster-utils -- /bin/sh + +# Kubernetes connections (easiest with service): +kubectl exec -it service/cluster-utils -- sh +kubectl exec -it deployment/cluster-utils -- sh + +# Note: Podman users can replace 'docker' with 'podman' in all commands ``` ## 🧰 Available Tools & Commands diff --git a/k8s-cluster-utils.yml b/k8s-cluster-utils.yml index 53ae4a0..d87a782 100644 --- a/k8s-cluster-utils.yml +++ b/k8s-cluster-utils.yml @@ -17,7 +17,24 @@ spec: spec: containers: - name: cluster-utils - #image: ghcr.io/donkeyx/cluster-utils:latest - image: donkeyx/cluster-utils:latest + image: ghcr.io/donkeyx/cluster-utils:latest + # Alternative: donkeyx/cluster-utils:latest (DockerHub) # Remove RUNTIME env if it was only for timeout restartPolicy: Always +--- +apiVersion: v1 +kind: Service +metadata: + name: cluster-utils + labels: + app: cluster-utils + purpose: testing +spec: + selector: + app: cluster-utils + ports: + - name: dummy + port: 8080 + targetPort: 8080 + protocol: TCP + type: ClusterIP From 159c6ba4c0374e45fb4d53e0f8ae3c6046801b16 Mon Sep 17 00:00:00 2001 From: donkeyx Date: Wed, 8 Oct 2025 16:42:54 +1030 Subject: [PATCH 10/13] wip: adding in the dockerhub readme push --- .github/workflows/docker-build-push.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index c3ae15c..3b7ff56 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -74,4 +74,13 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max provenance: false - sbom: false \ No newline at end of file + sbom: false + + - name: Update DockerHub README + if: github.event_name != 'pull_request' && vars.DOCKERHUB_USERNAME != '' + uses: peter-evans/dockerhub-description@v4 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: donkeyx/cluster-utils + readme-filepath: ./README.md \ No newline at end of file From b47844af7e59bdc091c0ba555f2419344329eafd Mon Sep 17 00:00:00 2001 From: donkeyx Date: Thu, 9 Oct 2025 08:34:30 +1030 Subject: [PATCH 11/13] wip: change to readme --- welcome.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/welcome.sh b/welcome.sh index 54d2703..974c5fd 100644 --- a/welcome.sh +++ b/welcome.sh @@ -30,7 +30,7 @@ cat << 'EOF' EOF printf "${NC}" -printf "${BOLD}${GREEN}🚀 Welcome to the Kubernetes Cluster Utilities! 🚀${NC}\n" +printf "${BOLD}${GREEN}🚀 Welcome to the Networking Cluster Utilities! 🚀${NC}\n" printf "${BOLD}=====================================================${NC}\n" echo "" printf "${BOLD}${BLUE}📦 Available Tools:${NC}\n" From 2a90cfeb1d176101b8e5bab9e5796158eae00948 Mon Sep 17 00:00:00 2001 From: donkeyx Date: Thu, 9 Oct 2025 08:40:41 +1030 Subject: [PATCH 12/13] wip: another fix to readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 419a4fb..cc82803 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ``` ╭────────────────────────────────────────╮ -| 🐴 DonkeyX's Cluster Utils │ +| 🐴 DonkeyX's Cluster Utils │ ╰────────────────────────────────────────╯ //\\ From a8cab04bacd0bd85404f616ed0e51a910633917d Mon Sep 17 00:00:00 2001 From: donkeyx Date: Thu, 9 Oct 2025 08:42:40 +1030 Subject: [PATCH 13/13] wip: switch back to dockerhub as base example --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cc82803..3598735 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A modern, lightweight Docker container designed for Kubernetes cluster debugging - 🔧 **Latest Tools** - Automatically fetches latest versions (k6, etc.) - 📦 **Optimized Size** - Single-layer build, minimal footprint (~220MB) -* **Container Registry**: `ghcr.io/donkeyx/cluster-utils:latest` (GitHub) or `donkeyx/cluster-utils:latest` (DockerHub) +* **Container Registry**: `donkeyx/cluster-utils:latest` (DockerHub) or `ghcr.io/donkeyx/cluster-utils:latest` (GitHub) ## 🚀 Usage @@ -35,11 +35,12 @@ For immediate interactive shell access without deployment: ```bash # Interactive shell (with explicit zsh entry) -docker run -it --rm --entrypoint=/bin/zsh ghcr.io/donkeyx/cluster-utils:latest +docker run -it --rm --entrypoint=/bin/zsh donkeyx/cluster-utils:latest # Alternative: Let auto-shell switching handle it (sh → zsh automatically) -docker run -it --rm --entrypoint=/bin/sh ghcr.io/donkeyx/cluster-utils:latest +docker run -it --rm --entrypoint=/bin/sh donkeyx/cluster-utils:latest +# GitHub Container Registry alternative: ghcr.io/donkeyx/cluster-utils:latest # Note: Replace 'docker' with 'podman' if using Podman instead ``` @@ -156,12 +157,12 @@ docker exec -it cluster-utils-test sh ### Container Runtime Options ```bash -# Run with Docker (GitHub Container Registry - recommended) -docker run -d --rm --name cluster-utils ghcr.io/donkeyx/cluster-utils:latest - -# Alternative: DockerHub registry +# Run with Docker (DockerHub - recommended) docker run -d --rm --name cluster-utils donkeyx/cluster-utils:latest +# Alternative: GitHub Container Registry +docker run -d --rm --name cluster-utils ghcr.io/donkeyx/cluster-utils:latest + # Connect to running container (any shell command gives you zsh): docker exec -it cluster-utils sh docker exec -it cluster-utils zsh