k8s alternatives and similar packages
Based on the "Cloud Infrastructure and Management" category.
Alternatively, view k8s alternatives based on common mentions on social networks and blogs.
-
erlcloud
AWS APIs library for Erlang (Amazon EC2, S3, SQS, DDB, ELB and etc) -
GCloudex
Friendly set of wrappers for Google Cloud Platform services' API's in Elixir. -
Kubex
Kubex is the kubernetes integration for Elixir projects and it is written in pure Elixir.
Tired of breaking your main and manually rebasing outdated pull requests?
Do you think we are missing an alternative of k8s or a related project?
Popular Comparisons
README
K8s
K8s - Kubernetes API Client for Elixir
Features
- A client API for humans ๐ฉ๐ผ๐ง๐ฉ๐ป๐ฉ๐ฝ๐ฉ๐พ๐ง๐ป๐ง๐ฝ๐ง๐ง๐พ๐จ๐ผ๐จ๐พ๐จ๐ฟ
- ๐ฎ Kubernetes resources, groups, and CRDs are autodiscovered at boot time. No swagger file to include or override.
- Client supports standard HTTP calls, async batches, wait on status โฒ๏ธ, and watchers ๐
- โ๏ธ HTTP Request middleware
- Multiple clusters โ โ โ
- ๐ Multiple authentication credentials
- ๐ค serviceaccount
- token
- ๐ certificate
- auth-provider
- Pluggable auth providers!
- ๐ Tested against Kubernetes versions 1.10+ and master
- ๐ ๏ธ CRD support
- ๐ Integrated with
:telemetry
- โน๏ธ Kubernetes resource and version helper functions
- ๐งฐ Kube config file parsing
- ๐๏ธ Macro free; fast compile & fast startup
Installation
The package can be installed by adding :k8s
to your list of dependencies in mix.exs
:
def deps do
[
{:k8s, "~> 1.0"}
]
end
Usage
Check out the Usage Guide for in-depth examples.
Most functions are also written using doctests.
If you are interested in building Kubernetes Operators or Schedulers, check out Bonny.
tl;dr Examples
Configure a cluster connection
Cluster connections can be created using the K8s.Conn
module.
K8s.Conn.from_file/1
will use the current context in your kubeconfig.
{:ok, conn} = K8s.Conn.from_file("path/to/kubeconfig.yaml")
K8s.Conn.from_file/2
accepts a keyword list to set the :user
, :cluster
, and/or :context
Connections can also be created in-cluster from a service account.
{:ok, conn} = K8s.Conn.from_service_account("/path/to/service-account/directory")
Check out the connection guide for additional details.
Creating a deployment
{:ok, conn} = K8s.Conn.from_file("path/to/kubeconfig.yaml")
opts = [namespace: "default", name: "nginx", image: "nginx:nginx:1.7.9"]
{:ok, resource} = K8s.Resource.from_file("priv/deployment.yaml", opts)
operation = K8s.Client.create(resource)
{:ok, deployment} = K8s.Client.run(conn, operation)
Listing deployments
In a namespace:
{:ok, conn} = K8s.Conn.from_file("path/to/kubeconfig.yaml")
operation = K8s.Client.list("apps/v1", "Deployment", namespace: "prod")
{:ok, deployments} = K8s.Client.run(conn, operation)
Across all namespaces:
{:ok, conn} = K8s.Conn.from_file("path/to/kubeconfig.yaml")
operation = K8s.Client.list("apps/v1", "Deployment", namespace: :all)
{:ok, deployments} = K8s.Client.run(conn, operation)
Getting a deployment
{:ok, conn} = K8s.Conn.from_file("path/to/kubeconfig.yaml")
operation = K8s.Client.get("apps/v1", :deployment, [namespace: "default", name: "nginx-deployment"])
{:ok, deployment} = K8s.Client.run(conn, operation)
*Note that all licence references and agreements mentioned in the k8s README section above
are relevant to that project's source code only.