Skip to content

Instantly share code, notes, and snippets.

View dijeesh's full-sized avatar
😎

Dijeesh Padinharethil dijeesh

😎
View GitHub Profile
@dijeesh
dijeesh / Notes.txt
Created May 27, 2020 06:19
EKS 1.16.8 Upgrade, kube-proxy:v1.16.8 errors
EKS clusters created from 1.12 onwards use a config file (by mounting a configmap called kube-proxy-config
If you are updating a cluster that was originally created on < 1.12, you will need to updated the kube-proxy configmaps and daemonsets.
1. Create kube-proxy-config configmap
kubectl -n kube-system apply -f kube-proxy-config.yaml
2. Update kube-proxy configmap, replace the server: with your API Server endpoint details and apply.
comm -23 <(aws ec2 describe-security-groups --query 'SecurityGroups[*].GroupId' --output text | tr '\t' '\n'| sort) <(aws ec2 describe-instances --query 'Reservations[*].Instances[*].SecurityGroups[*].GroupId' --output text | tr '\t' '\n' | sort | uniq)
Change xxxxxxxxxxx with your HOSTED-ZONE-ID
aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | \
jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?] | @tsv'
@dijeesh
dijeesh / gist:5c0b915fb6b428a92d9fc9175d55dae3
Created February 4, 2019 09:56
docker-compose-metabase-postgress
version: '3'
services:
db:
container_name: db
image: postgres:9.6
restart: always
volumes:
- "/data/metabase/pgdata:/var/lib/postgresql/data"
SELECT table_schema "DB Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;
1. Install jq
2. Run
(
NAMESPACE=YOUR-NAMESPACE
kubectl proxy &
kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >temp.json
curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize
)
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'CloudFormation - EKS VPC Stack'
Parameters:
EnvironmentName:
Description: 'CloudFormation - EKS VPC Stack'
Type: String
Default: '- CloudFormation - EKS VPC Stack'
VPCName:
cd /var/named
sed -i 's/20[0-9][0-9]\{7\}/2016120701/g’ *.db
This will set Serial Numbers for all zones to : 2016120701 [ YYYYMMDDNN ]
Take a backup of named directory before updating serial numbers.
#!/bin/bash
# XenServer Disk Monitoring and post message to XenCenter
# Get this host's UUID
thisUUID=`xe host-list name-label=$HOSTNAME params=uuid --minimal`
# Threshold of disk usage to report on
threshold=75 # an example of how much disk can be used before alerting
# Get disk usage
#! /bin/bash
# Dijeesh Padinhaethil
# Script to take MySQL backups to remote server using Percona Xtrabackup
# Confirm log directory exist, create on if doesn't.