-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
74 lines (59 loc) · 1.71 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
69
70
71
72
73
74
CLUSTER_NAME := foo
#
# Main commands
#
.PHONY: start
start: start/k3d context cilium/install gadget
.PHONY: delete
delete:
k3d cluster delete ${CLUSTER_NAME}
.PHONY: context
context:
kubectl config use-context k3d-${CLUSTER_NAME}
guard-%:
@ if [ "${${*}}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
.PHONY: start/k3d
start/k3d:
@k3d cluster list ${CLUSTER_NAME} || ( \
k3d cluster create ${CLUSTER_NAME} \
--config ./k3d-default.yaml \
)
.PHONY: cilium/install
cilium/install:
./bpf-scaffold.sh
./cilium-install.sh
.PHONY: falco/deploy
falco/deploy:
./falco-deploy.sh
.PHONY: gadget
gadget:
./inspektor-gadget-install.sh
.PHONY: hubble-forward
hubble-forward:
kubectl port-forward -n kube-system svc/hubble-ui --address 0.0.0.0 --address :: 12000:80
#
# Dashboard
#
.PHONY: dashboard/install
dashboard/install:
helm install --namespace kubernetes-dashboard --create-namespace kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --set extraArgs.enable-skip-login=true
@echo
@echo ignore the above, run make dashboard/auth followed by make dashboard/proxy
.PHONY: dashboard/auth
dashboard/auth:
kubectl apply -f ./local/k8s/dashboard-rbac.yaml
.PHONY: dashboard/proxy
dashboard/proxy:
@echo "Dashboard Url: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:https/proxy/#/workloads?namespace=default"
kubectl proxy
.PHONY: dashboard/uninstall
dashboard/uninstall:
helm uninstall kubernetes-dashboard --namespace kubernetes-dashboard
kubectl delete namespace kubernetes-dashboard
kubectl delete clusterrolebinding kubernetes-dashboard
.PHONY: k8s/apply
k8s/apply: context
kubectl apply -f local/k8s/grafana-service.yaml