Skip to content

Instantly share code, notes, and snippets.

View sleipnir's full-sized avatar
🎯
Focusing

Adriano Santos sleipnir

🎯
Focusing
View GitHub Profile
@sleipnir
sleipnir / README.md
Created January 6, 2025 19:34 — forked from mruoss/README.md
Livebook with Kubernetes Port-Forwarding using ThousandIsland and Kubereq

Kubernetes Port-Forwarding Livebook

The File below is a livebook implementing Port-Forwarding to a Kubernetes Pod. I uses Thousand Island to open a socket on the local machine and kubereq to open a websocket to the Kubernetes API Server to forward the traffic to the Pod.

Currently depends on an open Pull Request on thousand_island.

Run in Livebook

Creating and Scheduling a Pod Manually

This tutorial demonstrates how to create a Pod and manually schedule it to a node using cURL. This guide assumes you don't have a scheduler running in your Kubernetes cluster.

Create a Pod

The following pod will run version 1.10.0 of nginx with a 100m CPU limit.

Create the nginx pod manifest and name it pod.json: