Skip to content

Instantly share code, notes, and snippets.

View dhiren051's full-sized avatar
🎯
Focusing

DM dhiren051

🎯
Focusing
  • Cypress, CA
View GitHub Profile
@dhiren051
dhiren051 / .profile
Created July 24, 2018 23:41 — forked from PGBI/.profile
`vagrant halt all` command to halt all running vagrant VMs
# To be pasted in ~/.profile
vagrant() {
if [[ $@ == "halt all" ]]; then
command vagrant global-status | grep running | colrm 8 | xargs -L 1 -t vagrant halt
else
command vagrant "$@"
fi
}
@dhiren051
dhiren051 / installvagrant
Created July 29, 2018 16:29 — forked from rrgrs/installvagrant
installs brew, virtualbox, and vagrant in osx
if ! type "brew" > /dev/null; then
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)";
fi
brew tap phinze/homebrew-cask && brew install brew-cask;
brew cask install vagrant;
brew cask install virtualbox;
@dhiren051
dhiren051 / prometheus.yml
Created August 7, 2018 00:11 — forked from sacreman/prometheus.yml
Prometheus configuration to scrape Kubernetes outside the cluster
# Prometheus configuration to scrape Kubernetes outside the cluster
# Change master_ip and api_password to match your master server address and admin password
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
# metrics for the prometheus server
- job_name: 'prometheus'
@dhiren051
dhiren051 / simple_allow_all.xml
Created August 13, 2018 00:46 — forked from philfreo/simple_allow_all.xml
AWS S3 CORS policy examples
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
<AllowedHeader>Content-*</AllowedHeader>
<AllowedHeader>Host</AllowedHeader>
</CORSRule>
Short name Full name
csr       certificatesigningrequests
cs componentstatuses
cm configmaps
ds daemonsets
deploy deployments
ep endpoints
ev events
hpa       horizontalpodautoscalers
@dhiren051
dhiren051 / tmux-cheatsheet.markdown
Created March 19, 2019 18:07 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@dhiren051
dhiren051 / helm-cheatsheet.md
Created March 19, 2019 23:33 — forked from tuannvm/cka.md
#Helm #Kubernetes #cheatsheet, happy helming!
@dhiren051
dhiren051 / kubectl-shortcuts.sh
Created March 26, 2019 16:16 — forked from tamas-molnar/kubectl-shortcuts.sh
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
## Useful Commands
Get kubectl version
kubectl version
Get cluster info:
@dhiren051
dhiren051 / Kubernetes - Tips.md
Created April 3, 2019 17:30 — forked from savishy/Kubernetes - Tips.md
Kubernetes Cheatsheet

About kubeconfig and Sharing kubeconfigs

When you create a Google Cloud Container cluster with gcloud container clusters create it also generates a kubeconfig entry. See the output below:

Creating cluster petclinic...done.
Created [https://container.googleapis.com/v1/projects/gcloud-testing-vish/zones/asia-east1-a/clusters/petclinic].
kubeconfig entry generated for petclinic.
NAME       LOCATION      MASTER_VERSION  MASTER_IP       MACHINE_TYPE   NODE_VERSION  NUM_NODES  STATUS