Skip to content

KunalSin9h/upkube

Repository files navigation

Important

This project has been moved to SafeDep/upkube, used internally.

Upcube logo

Bare minimum kubernetes deployment management platform, using Pod Service Account, built for usage behind Cloudflare Zero Trust

Production Deployment

upkube is a ~60 MiB container built using golang with templ html templating, no js. When deployed using UPKUBE_ENV=PROD variables (recommended for production usage), it connects to the Kubernetes cluster using Pod Service Account. It does not have auth, it's built for usage behind Cloudflare Zero Trust.

...
      serviceAccountName: upkube-sa
      containers:
      - name: upkube
        image: ghcr.io/kunalsin9h/upkube:1.4.0
        ports:
        - containerPort: 8080
        env:
        - name: UPKUBE_ENV
          value: "PROD"
        - name: UPKUBE_HOST
          value: "0.0.0.0"
        - name: UPKUBE_PORT
          value: "8080"

For full Kubernetes deployment example: k8s directory.

Environment Variables

  • UPKUBE_HOST - Set host for http service, default is 127.0.0.1

  • UPKUBE_PORT - Set port for http service, default is 8080

  • UPKUBE_ENV - Set application environment, PROD or DEV, default is DEV.

    • When using PROD environment (recommended for production usage), upkube connects with in-cluster configuration to the Kubernetes cluster, which uses the service account Kubernetes provides to pods.

    • When using DEV, it connects from a master url or a kubeconfig filepath. default is ~/.kube/config

Service Account Roles Settings

rules:
- apiGroups: ["apps"]
  resources: ["deployments"]
  verbs: ["get", "list", "patch", "update"]

- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "list"]

While deployments rule is essential, when you will also provide pods list rules, upkube will shows any error while fetching any image and its error.

image

Roadmap

  • Support Activity Logs
  • Request and Approve workflow

Local Development

Stack

  • go
  • templ
  • tailwindcss
  • minikube

After cloning the repo...

Download dependencies and tools.

go mod download

Download and make sure minikube is running, for local k8s testing.

minikube start
kubectl apply -f k8s/deployment.yml

Start live reloaded Application

go tool air
 
# or and run
make

This will start the application on specieif port (using env), or deafult is http://localhost:8080

About

Bare minimum kubernetes deployment management platform.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors 2

  •  
  •