k8s-dart Logo

CI Coverage License: MIT pub

A Dart library for the Kubernetes API.


Work in Progress

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

Developed with 💙 by Nopso

Documentation 📝

Please visit the official documentation.

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('There are a total of ${pods.data?.items.length} in all namespaces.');


Kubernetes Dart Client