Skip to content

Instantly share code, notes, and snippets.

View Pheebzer's full-sized avatar
🤓

Petrus Manner Pheebzer

🤓
View GitHub Profile
@Pheebzer
Pheebzer / quickdocker.sh
Last active July 25, 2022 09:57
Bash script for quick docker exec
#!/bin/bash
PS3="Container to exec: "
IFS=$'\n'
OUTPUT=( $(docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.Status}}\t{{.Ports}}") )
# if there will always be 1 line of output, even when to containers are running
if [[ $(wc -l <<< $"{OUTPUT}") -le 1 ]]; then
echo "No running containers found, exiting.."
exit 0
@Pheebzer
Pheebzer / animals.yaml
Last active February 10, 2022 19:08
Example k8s application /w ingress
kind: Namespace
apiVersion: v1
metadata:
name: demo-ns
labels:
name: demo-ns
---
kind: Pod
apiVersion: v1
metadata: