Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mruoss/kino_k8s

A Livebook Kino for learning how to use the k8s Elixir library
https://github.com/mruoss/kino_k8s

elixir kubernetes livebook

Last synced: 9 days ago
JSON representation

A Livebook Kino for learning how to use the k8s Elixir library

Awesome Lists containing this project

README

        

# KinoK8s

A Livebook Kino for learning to use the k8s Elixir library.

[![Module Version](https://img.shields.io/hexpm/v/kino_k8s.svg)](https://hex.pm/packages/kino_k8s)
[![Last Updated](https://img.shields.io/github/last-commit/mruoss/kino_k8s.svg)](https://github.com/mruoss/kino_k8s/commits/main)

[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/kino_k8s/)
[![Total Download](https://img.shields.io/hexpm/dt/kino_k8s.svg)](https://hex.pm/packages/kino_k8s)
[![License](https://img.shields.io/hexpm/l/kino_k8s.svg)](https://github.com/mruoss/kino_k8s/blob/main/LICENSE)

## Installation

Install the latest 1.x version:

```elixir
Mix.install([{:kino_k8s, "~> 1.0"}])
```

To install the latest from `main` branch:

```elixir
Mix.install([{:kino_k8s, github: "mruoss/kino_k8s"}])
```

## Smart Cells

`kino_k8s` brings the following Smart Cells to your [Livebook](https://livebook.dev):

- **Cluster Connection** - Connect to a Kubernetes Cluster
- **Get / List / Watch Resources**
- **Create / Update / Apply Resource** - Modify resources in your cluster
- **Connect to Pod (Exec/Logs)** - Renders a terminal using xterm.js (Formerly `kino_k8s_term`).

The smart cells require a connection to a Kubernetes Cluster in form of a
`%K8s.Conn{}` object. To add such a connection to your Livebook, you can add
the `Cluster Connection` smart cell before adding any other smart cells.

## Development

### Build and Watch Javascript and CSS

```bash
cd assets
npm install
npm run dev
```

### Install and run livebook

```bash
mix escript.install hex livebook
livebook server ./dev.livemd
```

### Build Assets

```bash
cd assets
npm install
npm run build
```