This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db: | |
container_name: db | |
image: postgres:9.6 | |
restart: always | |
volumes: | |
- "/data/metabase/pgdata:/var/lib/postgresql/data" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: 'CloudFormation - EKS VPC Stack' | |
Parameters: | |
EnvironmentName: | |
Description: 'CloudFormation - EKS VPC Stack' | |
Type: String | |
Default: '- CloudFormation - EKS VPC Stack' | |
VPCName: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Dijeesh Padinhaethil | |
# Script to take MySQL backups to remote server using Percona Xtrabackup | |
# Confirm log directory exist, create on if doesn't. |
NewerOlder