Skip to content

Instantly share code, notes, and snippets.

View jkleinkauff's full-sized avatar

Jhonatas Kleinkauff jkleinkauff

View GitHub Profile
@jkleinkauff
jkleinkauff / immortal_pod.yaml
Created June 13, 2024 21:16
An immortal pod. So you can bash into it to do anything.
apiVersion: v1
kind: Pod
metadata:
name: bash-pod
namespace:
spec:
containers:
- name: bash-container
image: ubuntu:latest
command: ["/bin/bash", "-c", "while true; do sleep 30; done;"]
@jkleinkauff
jkleinkauff / spark-minikube.sh
Created December 16, 2021 03:39 — forked from jjstill/spark-minikube.sh
Running Spark job on local kubernetes (minikube)
# Starting minikube with 8Gb of memory and 3 CPUs
minikube --memory 8192 --cpus 3 start
# Creating separate Namespace for Spark driver and executor pods
kubectl create namespace spark
# Creating ServiceAccount and ClusterRoleBinding for Spark
kubectl create serviceaccount spark-serviceaccount --namespace spark
kubectl create clusterrolebinding spark-rolebinding --clusterrole=edit --serviceaccount=spark:spark-serviceaccount --namespace=spark
docker exec -it <container> /bin/bash
# Run the following commands inside the container
apt update
apt install -y gdb
apt install -y net-tools
pip install debugpy
# Find the PID for the Flask process. Always use the first that appear on the list
ps -ef