Short name | Full name |
---|---|
csr | certificatesigningrequests |
cs | componentstatuses |
cm | configmaps |
ds | daemonsets |
deploy | deployments |
ep | endpoints |
ev | events |
hpa | horizontalpodautoscalers |
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
# 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 | |
} |
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
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; |
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
# 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' |
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
<?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> |
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
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' |
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
## Useful Commands | |
Get kubectl version | |
kubectl version | |
Get cluster info: |
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
OlderNewer