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:

@sleipnir
sleipnir / urubatan.teste
Created January 2, 2012 13:50
Teste de Conectividade com o site urubatan.com.br
C:\Users\sleipnir>ping urubatan.com.br
Disparando urubatan.com.br [174.121.54.22] com 32 bytes de dados:
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Estatísticas do Ping para 174.121.54.22:
Pacotes: Enviados = 4, Recebidos = 0, Perdidos = 4 (100% de