Set version
kubectl_version='1.29.2'
Install
curl -LO https://dl.k8s.io/v${kubectl_version}/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv ./kubectl /usr/bin/kubectl
Set version
kubectl_version='1.29.2'
Install
curl -LO https://dl.k8s.io/v${kubectl_version}/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv ./kubectl /usr/bin/kubectl
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' FILENAME
import os, sys, time | |
pid = os.fork() | |
if pid == 0 : | |
print("in child") | |
sys.exit(0) | |
else : | |
print("in parent") | |
time.sleep(90) |
git ls-files '*/<FILENAME>'
git ls-files '**/argo-admin-clusterrole.yaml'
git ls-files '*argo-admin-clusterrole.yaml'
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic --from-beginning
In kafka container: cd /opt/bitnami/kafka/bin
– Filtering AWS resources with Boto3
This post will be updated frequently when as I learn more about how to filter AWS resources using Boto3 library.
Filtering VPCs by tags
#!/usr/bin/env bash | |
function delete_namespace () { | |
echo "Deleting namespace $1" | |
kubectl get namespace $1 -o json > tmp.json | |
sed -i 's/"kubernetes"//g' tmp.json | |
kubectl replace --raw "/api/v1/namespaces/$1/finalize" -f ./tmp.json | |
rm ./tmp.json | |
} |
# Reset | |
Color_Off='\033[0m' # Text Reset | |
# Regular Colors | |
Black='\033[0;30m' # Black | |
Red='\033[0;31m' # Red | |
Green='\033[0;32m' # Green | |
Yellow='\033[0;33m' # Yellow | |
Blue='\033[0;34m' # Blue | |
Purple='\033[0;35m' # Purple |