-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (66 loc) · 1.9 KB
/
Makefile
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
# App
start:
docker-compose up
stop:
docker-compose down
#DockerHub
pushtohub:
docker-compose build nodewithdb
docker tag cwit_2020_nodewithdb bolbeck/nodewithdb
docker push bolbeck/nodewithdb
# minikube
mkstart:
minikube start
mkstop:
minikube stop
mkservices:
minikube service list
mkservice:
minikube service nodewithdb
mkdashboard:
minikube dashboard
#K8s
#Reference : https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait
k8version:
kubectl version --short
k8runpod:
kubectl run mariadb --image=mariadb --port=3306 --dry-run=client -o yaml
k8createDeploy:
kubectl create deployment --image=mariadb mariadb --port=3306 --dry-run=client -o yaml
k8get:
kubectl get ${RESOURCENAME}
k8createService:
kubectl create service nodeport redis --tcp=6379:6379 --dry-run=client -o yaml
k8manifests:
kompose --file ./../docker-compose.yml convert
k8apply:
kubectl apply -f ./Kubernetes
k8delete:
kubectl delete -f Kubernetes/
k8logs:
kubectl logs ${PODNAME} $(CONTAINERNAME)
K8describe:
kubectl describe pod/${PODNAME}
k8restartdeployment:
kubectl rollout restart deployment ${DEPLOYMENTNAME}
k8rolloutHistory:
kubectl rollout history deployment ${DEPLOYMENTNAME}
k8rolloutHistoryDetail:
kubectl rollout history deployment ${DEPLOYMENTNAME} --revision=${RevisionNumber}
K8undorollout:
kubectl rollout undo deployment ${DEPLOYMENTNAME} --to-revision=${RevisionNumber}
k8diff:
kubectl diff -f ${FILENAME}
K8secret:
kubectl get secret nodewithdb-secret -o yaml
k8viewcontext:
kubectl config current-context
k8setnamespace:
kubectl config set-context --current --namespace=${NAMESPACENAME}
# Kustommize
# Reference: https://kubectl.docs.kubernetes.io/pages/reference/kustomize.html#bases
# https://kubectl.docs.kubernetes.io/pages/app_customization/introduction.html
kusBuild:
kubectl kustomize KubernetesKustomize/${KUSTOMIZEDIR}
kusApply:
kubectl apply -k KubernetesKustomize/${KUSTOMIZEDIR}