Sign inSign up

sgfoot/kubespray-files

By sgfoot

•Updated 9 months ago

Image
0

926

sgfoot/kubespray-files repository overview

⁠Kubespray Offline Files Server

Docker Pulls Docker Image Size GitHub

Offline file server for Kubespray v2.25.0 deployment. Contains all required binary files for Kubernetes v1.29.10 and related components, served via Nginx with HTTP file browsing.

ā šŸš€ Quick Start

# Pull the image
docker pull sgfoot/kubespray-files:v0.1.0-2.25.0

# Run the file server
docker run -d -p 8080:80 --name kubespray-files \
  sgfoot/kubespray-files:v0.1.0-2.25.0

# Browse files
curl http://localhost:8080/k8s/

# Download example (kubectl)
curl -O http://localhost:8080/k8s/dl.k8s.io/release/v1.29.10/bin/linux/amd64/kubectl

ā šŸ“¦ What's Included

This image contains binary files for both AMD64 and ARM64 architectures:

⁠Kubernetes Components
  • kubelet, kubectl, kubeadm (v1.29.10)
  • etcd (v3.5.16)
  • CNI plugins (v1.3.0)
⁠Container Runtimes
  • containerd (v1.7.22)
  • cri-o (v1.29.1)
  • cri-dockerd (v0.3.11)
  • runc (v1.1.14)
  • crun (v1.14.4)
⁠Network Plugins
  • Calico (v3.27.4)
  • Cilium CLI (v0.16.0)
⁠Tools
  • Helm (v3.14.4)
  • crictl (v1.29.0)
  • nerdctl (v1.7.7)
  • skopeo (v1.15.0)
  • yq (v4.42.1)
  • krew (v0.4.4)
⁠Advanced Runtimes
  • Kata Containers (v3.1.3)
  • gVisor (20240305)
  • youki (v0.1.0)

ā šŸ—ļø Multi-Architecture Support

This image contains files for both architectures in a single image:

/opt/k8s/k8s/
ā”œā”€ā”€ dl.k8s.io/release/v1.29.10/bin/linux/
│   ā”œā”€ā”€ amd64/          # AMD64 (x86_64) files
│   │   ā”œā”€ā”€ kubelet
│   │   ā”œā”€ā”€ kubectl
│   │   └── kubeadm
│   └── arm64/          # ARM64 (aarch64) files
│       ā”œā”€ā”€ kubelet
│       ā”œā”€ā”€ kubectl
│       └── kubeadm
└── ...

Supported Platforms:

  • āœ… linux/amd64 (x86_64)
  • āœ… linux/arm64 (aarch64)
  • āœ… Apple Silicon (M1/M2/M3)
  • āœ… AWS Graviton
  • āœ… Raspberry Pi 4/5

Kubespray automatically selects the correct architecture based on the target node.

ā šŸ”§ Usage with Kubespray

⁠1. Deploy File Server
# On your deployment server
docker run -d -p 8080:80 --restart always \
  --name kubespray-files \
  sgfoot/kubespray-files:v0.1.0-2.25.0
⁠2. Configure Kubespray

Edit inventory/mycluster/group_vars/all/offline.yml:

# Point to your file server
files_repo: "http://192.168.1.100:8080/k8s"

# Kubespray will automatically download the correct architecture:
# - AMD64 nodes: .../linux/amd64/kubectl
# - ARM64 nodes: .../linux/arm64/kubectl
⁠3. Deploy Kubernetes
ansible-playbook -i inventory/mycluster/hosts.yaml cluster.yml

⁠🌐 Mixed Architecture Clusters

Perfect for heterogeneous clusters with different CPU architectures:

# Single file server supports all node types
files_repo: "http://192.168.1.100:8080/k8s"

# Nodes automatically get the right files:
# - x86_64 control plane → AMD64 binaries
# - ARM64 workers → ARM64 binaries

ā šŸ“‹ Available Tags

  • v0.1.0-2.25.0 - Kubespray v2.25.0, Kubernetes v1.29.10
  • latest - Latest stable release

ā šŸ” Verify Files

# Start the server
docker run -d -p 8080:80 --name test-files \
  sgfoot/kubespray-files:v0.1.0-2.25.0

# Check AMD64 files
curl http://localhost:8080/k8s/dl.k8s.io/release/v1.29.10/bin/linux/amd64/

# Check ARM64 files
curl http://localhost:8080/k8s/dl.k8s.io/release/v1.29.10/bin/linux/arm64/

# Health check
curl http://localhost:8080/health

⁠🐳 Docker Compose

version: '3.8'

services:
  kubespray-files:
    image: sgfoot/kubespray-files:v0.1.0-2.25.0
    container_name: kubespray-files
    ports:
      - "8080:80"
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/k8s/"]
      interval: 30s
      timeout: 10s
      retries: 3

ā šŸ› ļø Environment Variables

No environment variables required. The image works out of the box.

ā šŸ“Š Image Size

  • Compressed: ~1.5-2 GB
  • Uncompressed: ~4-6 GB (contains both architectures)

Use with the companion image registry:

# Pull image registry
docker pull sgfoot/kubespray-images:v0.1.0-2.25.0

# Deploy both services
docker run -d -p 8080:80 --name kubespray-files \
  sgfoot/kubespray-files:v0.1.0-2.25.0

docker run -d -p 5000:5000 --name kubespray-registry \
  sgfoot/kubespray-images:v0.1.0-2.25.0

ā šŸ“š Documentation

ā šŸ› Troubleshooting

⁠Files not accessible
# Check container logs
docker logs kubespray-files

# Verify nginx is running
docker exec kubespray-files ps aux | grep nginx
⁠Port already in use
# Use a different port
docker run -d -p 9090:80 --name kubespray-files \
  sgfoot/kubespray-files:v0.1.0-2.25.0
⁠Architecture-specific issues
# Verify both architectures are present
docker run --rm sgfoot/kubespray-files:v0.1.0-2.25.0 \
  ls -la /opt/k8s/k8s/dl.k8s.io/release/v1.29.10/bin/linux/

ā šŸ’” Tips

  1. Persistent Storage: Mount a volume to preserve downloaded files

    docker run -d -p 8080:80 -v files-data:/opt/k8s \
      sgfoot/kubespray-files:v0.1.0-2.25.0
    
  2. Custom Port: Change the host port as needed

    docker run -d -p 9090:80 sgfoot/kubespray-files:v0.1.0-2.25.0
    
  3. Health Monitoring: Use the /health endpoint

    curl http://localhost:8080/health
    

ā šŸ“„ License

MIT License - See LICENSE⁠

ā šŸ¤ Contributing

Contributions welcome! Please visit the GitHub repository⁠.

⁠⭐ Support

If this image helps you, please star the GitHub repository⁠!


Maintained by: sgfoot⁠
Kubespray Version: v2.25.0
Kubernetes Version: v1.29.10
Last Updated: 2024-12

Tag summary

Content type

Image

Digest

sha256:9de403b85…

Size

1000.2 MB

Last updated

9 months ago

docker pull sgfoot/kubespray-files