11/12 free views
Library/SDK
Library
Container Security

kubernetes-client

by fabric8io

3.5Kstars
1.5Kforks
125watchers
Updated 10 months ago
About

A comprehensive Java client library providing fluent DSL access to Kubernetes and OpenShift REST APIs for container security and automation.

Java client for Kubernetes & OpenShift

Primary Use Case

This tool is primarily used by Java developers and DevOps engineers to interact programmatically with Kubernetes and OpenShift clusters, enabling cloud configuration scanning, container scanning, and security automation. It facilitates building custom integrations and automations around Kubernetes/OpenShift environments to enhance container security and operational workflows.

Key Features
  • Fluent DSL for Kubernetes and OpenShift REST APIs
  • Supports full Kubernetes and OpenShift API access
  • Modular architecture with extensions for Knative, Tekton, Chaos Mesh, Volume Snapshot, and Volcano
  • Available via Maven Central with comprehensive Javadoc documentation
  • Continuous integration with build, Sonar scanning, and end-to-end tests
  • Active community support via Gitter chat
  • Versioned releases with Maven and GitHub Actions integration

Installation

  • Add the fabric8 Kubernetes client dependency to your Maven project:
  • <dependency>
  • <groupId>io.fabric8</groupId>
  • <artifactId>kubernetes-client</artifactId>
  • <version>[latest-version]</version>
  • </dependency>
  • For OpenShift support, add the openshift-client dependency similarly.
  • Use Maven Central to resolve dependencies automatically.
  • Refer to Javadoc for API usage and examples.

Usage

>_ new KubernetesClient()

Instantiate a new Kubernetes client to interact with the cluster.

>_ client.pods().list()

Retrieve a list of pods in the Kubernetes cluster.

>_ client.services().inNamespace("default").list()

List all services in the 'default' namespace.

>_ client.resource(resource).create()

Create a Kubernetes resource using the fluent DSL.

>_ client.extensions().knative()

Access Knative resources via the Knative client extension.

Security Frameworks
Discovery
Collection
Defense Evasion
Execution
Persistence
Usage Insights
  • Leverage the fluent DSL to automate continuous cloud configuration and container security scanning within CI/CD pipelines.
  • Integrate with custom security automation workflows to dynamically detect and remediate misconfigurations or vulnerabilities in Kubernetes/OpenShift clusters.
  • Use the client to build bespoke detection tools that monitor API interactions for anomalous or suspicious activity indicative of attack.
  • Combine with threat intelligence feeds to automate response actions such as isolating compromised pods or revoking access tokens.
  • Enable purple team exercises by scripting attack simulations and defense validations directly against Kubernetes/OpenShift APIs.

Docs Take 2 Hours. AI Takes 10 Seconds.

Ask anything about kubernetes-client. Installation? Config? Troubleshooting? Get answers trained on real docs and GitHub issues—not generic ChatGPT fluff.

3 free chats per tool • Instant responses • No credit card

Security Profile
Red Team70%
Blue Team60%
Purple Team75%
Details
LicenseApache License 2.0
LanguageJava
Open Issues2783
Topics
kubernetes
openshift
java-client
kubernetes-client
mocking-kubernetes
kubernetes-model
openshift-client
dsl
mock-server
java