Home

Awesome

<p align="center"> <img src="docs/skuber_logo.png" alt="skuber logo"> </p> <p align="center"> Scala client for the <a href="https://kubernetes.io/" target="_blank">Kubernetes API</a>. </p> </br> <p align="center"> <img src="https://img.shields.io/github/release-date/hagay3/skuber?style=for-the-badge" alt="Latest release date" /> <a href="https://mvnrepository.com/artifact/io.github.hagay3/skuber_2.12" target="_blank"> <img src="https://img.shields.io/maven-central/v/io.github.hagay3/skuber_2.12?color=green&style=for-the-badge" alt="Maven Central" /> </a> <a href="https://discord.gg/byEh56vFJR" target="_blank"> <img src="https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord" /> </a> </p> <p align="center"> <strong> <a href="https://hagay3.github.io/skuber/" target="_blank">Read the Documentation</a>. </strong> </p> </br>

Quick start

This example lists pods in kube-system namespace:

import skuber._
import skuber.json.format._
import org.apache.pekko.actor.ActorSystem
import scala.util.{Success, Failure}

implicit val system = ActorSystem()
implicit val dispatcher = system.dispatcher

val k8s = k8sInit
val listPodsRequest = k8s.list[PodList](Some("kube-system"))
listPodsRequest.onComplete {
  case Success(pods) => pods.items.foreach { p => println(p.name) }
  case Failure(e) => throw(e)
}

Documentation

Read the documentation and join discord community to ask your questions!

Features

Prerequisites

A Kubernetes cluster is needed at runtime. For local development purposes, minikube is recommended. To get minikube follow the instructions here

Release

You can use the latest release by adding to your build:

libraryDependencies += "io.github.hagay3" %% "skuber" % "4.0.2"

Building

Building the library from source is very straightforward. Simply run sbt test in the root directory of the project to build the library (and examples) and run the unit tests to verify the build.

CI + Build

The CI parameters defined in build.sbt.

ci.yaml and clean.yaml are generated automatically with sbt-github-actions plugin.

Run sbt githubWorkflowGenerate && bash infra/ci/fix-workflows.sh in order to regenerate ci.yaml and clean.yaml.

CI Running against the following k8s versions

skuber supports all other k8s versions, not all of them tested under CI.

https://kubernetes.io/releases/

Support

I'm trying to be responsive to any new issues, you can create github issue or contact me.

Skuber chat on discord: https://discord.gg/byEh56vFJR

Email: hagay3@gmail.com