Ruby client for the kubernetes API.
- Fork source: kubernetes-client/ruby.
- This project is forked from the original Kubernetes Ruby client codebase after official maintenance had effectively stalled.
- It is now maintained as a community-driven fork to keep pace with current Kubernetes API versions.
- This fork includes community-maintained modifications (packaging, compatibility fixes, CI/runtime requirements, and docs) in addition to OpenAPI-generated code.
- Like other official Kubernetes clients, this client is generated from Kubernetes OpenAPI specifications.
- Code generation is performed with OpenAPI Generator, and the generated client is versioned to the target Kubernetes OpenAPI release.
| Kubernetes version | Kubernetes API (OpenAPI) | Client gem version |
|---|---|---|
| 1.31 | release-1.35 | 1.35.0.3 |
| 1.32 | release-1.35 | 1.35.0.3 |
| 1.33 | release-1.35 | 1.35.0.3 |
| 1.34 | release-1.35 | 1.35.0.3 |
| 1.35 | release-1.35 | 1.35.0.3 |
- Ruby 3.3.0+
Add this gem to your Gemfile:
gem "kruby", "~> 1.35"require 'kruby'
require 'pp'
kube_config = Kubernetes::KubeConfig.new("#{ENV['HOME']}/.kube/config")
config = Kubernetes::Configuration.new()
kube_config.configure(config)
client = Kubernetes::CoreV1Api.new(Kubernetes::ApiClient.new(config))
pp client.list_namespaced_pod('default')For backward compatibility, require 'kubernetes' is also supported.
Please see CONTRIBUTING.md for instructions on how to contribute.
Participation in this repository is governed by the Code of Conduct.
to update the client clone the gen repo and run this command at the root of the client repo:
${GEN_REPO_BASE}/openapi/ruby.sh kubernetes settingsFor a full, repeatable upgrade workflow (including verification and troubleshooting), see:
This program follows the Apache License version 2.0 (http://www.apache.org/licenses/ ). See LICENSE file included with the distribution for details.