GithubHelp home page GithubHelp logo

kazan's Introduction

Kazan

Kazan is a Kubernetes API client for Elixir. It uses the OpenAPI specifications provided by elixir to generate most of it's functions and datastructures. This allows the whole kube API to be supported with relatively little effort.

Kazan should mostly be functional, though it is still somewhat experimental and untested. Parts of the API may not work, and the Kazan interface may be changed at any time.

Features

  • Support for most Kubernetes API calls.
  • Structs for most Kubernetes API structures.
  • Documentation of all models & calls.
  • Client certificate autentation.
  • Loading config from kubeconfig files.

Not Implemented

  • Support for watch requests.
  • Non-certificate based authentication.
  • Patching with application/json-patch+json or application/strategic-merge-patch+json content types.
  • Removing fields when patching with application/merge-patch+json.
  • Comprehensive tests.
  • Validation of requests.
  • Typespecs for functions or structs.
  • Probably some other things.

Installation

If available in Hex, the package can be installed as:

  1. Add kazan to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:kazan, "~> 0.1"}]
end
```
  1. Ensure kazan is started before your application:
```elixir
def application do
  [applications: [:kazan]]
end
```

Configuration

Assuming you're only intendeding to communicate with a single Kubernetes server, it's recommended to configure this server in your config.exs:

config :kazan, :server, %{url: "kubernetes.default"}

Usage

Making a request with Kazan is done in two stages.

  1. Build the request object using one of the functions in Kazan.Api.*.
  2. Run that request using Kazan.Client.

For example, to get all of the pods from a server:

Kazan.Apis.CoreV1.list_pod_for_all_namespaces!
|> Kazan.Client.run!
# %Kazan.Models.V1.PodList{...}

More details on building requests can be found in the documentation for Kazan.Apis.

All the models reutrned by the application can be found under Kazan.Models

kazan's People

Contributors

obmarg avatar wot123 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.