Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Scala Kubernetes client library

License

NotificationsYou must be signed in to change notification settings

hagay3/skuber

Repository files navigation

skuber logo

Scala client for theKubernetes API.


Latest release dateMaven CentralDiscord

Read the Documentation.


Quick start

This example lists pods inkube-system namespace:

importskuber._importskuber.json.format._importorg.apache.pekko.actor.ActorSystemimportscala.util.{Success,Failure}implicitvalsystem=ActorSystem()implicitvaldispatcher= system.dispatchervalk8s= k8sInitvallistPodsRequest= k8s.list[PodList](Some("kube-system"))listPodsRequest.onComplete {caseSuccess(pods)=> pods.items.foreach { p=> println(p.name) }caseFailure(e)=>throw(e)}

Documentation

Read thedocumentation and joindiscord community to ask your questions!

Features

  • Uses standardkubeconfig files for configuration - see theconfiguration guide for details
  • Scala 3.2, 2.13, 2.12 support
  • Typed Kubernetes Client for creating, reading, updating, removing, listing and watching resources on a Kubernetes cluster.
  • Dynamic Kubernetes Client, which allows you to interact with Kubernetes API without strict types.
  • Refreshing EKS tokensRefresh EKS Token guide
  • Comprehensive support for Kubernetes API model represented as Scala case classes
  • Support for core, extensions and other Kubernetes API groups
  • Full support for converting resources between the case class and standard JSON representations
  • The API is asynchronous and strongly typed e.g.k8s get[Deployment]("nginx") returns a value of typeFuture[Deployment]
  • Fluent API for creating and updating specifications of Kubernetes resources

Prerequisites

  • Java 17
  • Kubernetes cluster

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

Release

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

  • Scala 3.2, 2.13, 2.12 support
libraryDependencies+="io.github.hagay3"%%"skuber"%"4.0.2"

Building

Building the library from source is very straightforward. Simply runsbt 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 inbuild.sbt.

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

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

CI Running against the following k8s versions

  • v1.19.6
  • v1.20.11
  • v1.21.5
  • v1.22.9
  • v1.23.6
  • v1.24.1

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


[8]ページ先頭

©2009-2025 Movatter.jp