k8s-dart Logo

CI Coverage License: MIT pub


A Dart library for the Kubernetes API.

Warning

Work in Progress

We keep working on it until we have all the features of the officially-supported Kubernetes JavaScript client.

Developed with 💙 by Kubeec Team

Installation 💻

For quick start, please use this package as a library

With Dart:

dart pub add k8s

With Flutter:

flutter pub add k8s

For more information, please visit the pub.dev

Quick Start 🚀

List pods for all namespaces:

import 'package:k8s/k8s.dart';

Future<void> main() async {
  final kubernetes = Kubernetes();
  await kubernetes.initDefault();
  final coreV1Api = kubernetes.client.getCoreV1Api();
  final pods = await coreV1Api.listPodForAllNamespaces();
  print('All namespaces have ${pods.data?.items.length} pods.');
}

Libraries

k8s
Kubernetes Dart Client