-
Notifications
You must be signed in to change notification settings - Fork 4
/
bash_profile
132 lines (116 loc) · 3.72 KB
/
bash_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Alias Help
alias adock="alias | grep docker"
alias akind="alias | grep kind"
alias akube="alias | grep kube"
alias agit="alias | grep git"
# Docker Commands
# docker container run –it ubuntu /bin/bash
alias dcr="docker container run -it"
alias dcd="docker container run -d"
#
# ID=$(docker container run –d -i ubuntu)
# docker container exec -it $ID /bin/bash
alias dce="docker container exec -it"
#
# docker container start $ID
alias dcstart="docker container start"
#
# Stop a Single Container based on ID (stored above)
# docker container stop $ID
# Stops all the containers
#docker container stop $(docker container ls –aq)
alias dcstop="docker container stop"
# alias dcstopall="docker container stop $(docker container ls –aq)"
#
# List All the Containers
alias dcl="docker container ls"
#
# Removve the Container based on ID
alias dcrm="docker container rm"
#
# docker container rm $(docker container ls –aq)
# alias dcrmall="docker container rm $(docker container ls –aq)"
#
alias dp="docker push"
alias dpull="docker pull"
#
# docker rmi $(docker images | grep '^<none>' | tr -s " " | cut -d " " -f 3)
alias dcrmi="docker rmi $(docker images | grep '^<none>' | tr -s " " | cut -d " " -f 3)"
# Kind K8s Cluster
alias kccd="kind create cluster"
alias kcc="kind create cluster --config"
alias kk8s="fgrep server ~/.kube/config"
alias kgc="kind get clusters"
alias kci="kubectl cluster-info"
# Crictl
# Latest K8s Nodes contains CRI tools instead of Docker CLIs
alias cps="crictl ps"
# Multipass Ubuntu
alias mp="multipass"
alias mpl="multipass list"
alias mpi="multipass info"
alias mps="multipass shell"
alias mpd="multipass delete"
alias mpp="multipass purge"
# Kubernetes Commands
# Kubernetes Minikube Commands
alias mk="minikube "
alias mi="minikube ip"
alias ma="minikube addons"
alias mal="minikube addons list"
alias mae="minikube addons enable"
alias mk8s="minikube get-k8s-versions"
alias mks="minikube ssh"
alias msl="minikube service list"
alias mkv="minikube version"
alias mkstart="minikube start --memory=8192 --cpus=4"
alias mkstop="minikube stop"
alias mkstartn="minikube start --network-plugin=cni --extra-config=kubelet.network-plugin=cni --memory=5120"
# Kubernetes Minikube Monitoring
alias mkd="minikube dashboard"
alias maoh="minikube addons open heapster"
# Kubernetes Basic Commands
alias k="kubectl"
alias kd="kubectl describe"
alias ke="kubectl exec -it"
alias kg="kubectl get"
alias kl="kubectl logs "
alias kr="kubectl run -it"
alias kv="kubectl version -o yaml"
alias ke="kubectl get events -n"
# Kubernetes Get Commands
alias kga="kubectl get ing,svc,pods -o wide"
alias kgd="kubectl get deploy -o wide"
alias kgh="kubectl get hpa -o wide"
alias kgn="kubectl get nodes -o wide"
alias kgp="kubectl get pods -o wide"
alias kgr="kubectl get rs -o wide"
alias kgs="kubectl get svc -o wide"
# Kubernetes Objects Management
alias koc="kubectl create -f"
alias koa="kubectl apply -f"
alias kor="kubectl replace -f"
alias kod="kubectl delete -f"
# Kubernetes Description of Objects
alias kdi="kubectl describe ing"
alias kdd="kubectl describe deploy"
alias kdp="kubectl describe pods"
alias kdr="kubectl describe rs"
alias kds="kubectl describe svc"
alias kdst="kubectl describe sts"
# Kubernetes Rollout Deployments
alias krs="kubectl rollout status deploy"
alias krh="kubectl rollout history deploy"
alias krp="kubectl rollout pause deploy"
alias krr="kubectl rollout resume deploy"
alias kru="kubectl rollout undo deploy "
# Kubernetes Developer Tools
alias podshell="kubectl run -it podshell --image=metamagic/podshell"
alias podshella="kubectl -c podshell -it attach "
# Git Commands
alias g="git"
alias gi="git init"
alias ga="git add ."
alias grao="git remote add origin"
alias gc="git commit -a -m"
alias gpo="git push -u origin --all"