Skip to content

Instantly share code, notes, and snippets.

@ragul28
ragul28 / ingress-nginx-eks-nlb.values.yaml
Last active November 12, 2024 12:18
Ingress nginx helm values yaml for EKS with NLB & ACM annotations
controller:
name: controller
image:
registry: registry.k8s.io
image: ingress-nginx/controller
containerPort:
http: 80
https: 443
special: 8000
@ragul28
ragul28 / alb-ingress-sample.yaml
Created August 22, 2024 04:43
AWS LB controller ingress manifest covering all basics
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dev-ingress
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/group.name: example-dev
alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
@ragul28
ragul28 / eksctl-private-cluster.yaml
Last active August 23, 2024 18:02
eksctl private cluster with csi addon for ebs/efs & aws LBC OIDC SA enabled
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: private-cluster
region: us-west-2
vpc:
cidr: "10.0.0.0/16"
nat:
@ragul28
ragul28 / aws-nuke-config.yml
Created August 10, 2024 17:31
aws nuke config with commonly used services
regions:
- "us-east-1"
- "us-west-2"
account-blocklist:
- 1234567890
resource-types:
targets:
- EC2Instance
@ragul28
ragul28 / awsall-cli.sh
Last active June 6, 2024 16:29
Run aws command on all regions
function awsall {
export AWS_PAGER=""
for i in `aws ec2 describe-regions --query "Regions[].{Name:RegionName}" --output text|sort -r`
do
echo "------"
echo $i
echo "------"
echo -e "\n"
if [ `echo "$@"|grep -i '\-\-region'|wc -l` -eq 1 ]
then
#!/bin/sh
git filter-branch -f --env-filter '
OLD_EMAIL="<OLD_EMAIL>"
CORRECT_NAME="<NAME>"
CORRECT_EMAIL="<EMAIL>"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@ragul28
ragul28 / webhook_install.sh
Created May 18, 2020 17:01
Easy webhook installation script to systemd.
#!/bin/bash
echo "[-] Installing webhook.."
wget https://github.com/adnanh/webhook/releases/download/2.6.11/webhook-linux-amd64.tar.gz
tar -xvf webhook*.tar.gz
sudo mv webhook-linux-amd64/webhook /usr/local/bin
rm -rf webhook-linux-amd64*
echo "[ok] Installing webhook."
@ragul28
ragul28 / 1_sa-kubeconfig-gen.sh
Last active December 20, 2022 03:54
kubeconfig generator script for service account with RBAC.
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, RBAC role file needed
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]]; then
echo "usage: $0 <service_account_name> <namespace> [rbac-role-yaml]"
exit 1
fi
@ragul28
ragul28 / docker-compose-rabbitmq.yml
Created January 11, 2020 10:23
Rabbitmq - Docker
version: '3'
services:
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
hostname: rabbitmq
restart: always
ports:
- "15672:15672"
- "5672:5672"