-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (36 loc) · 1.66 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
# The IP of the container you want to test
IP := 30420
NAMESPACE := default
start:
# downgrade to enable kube-dns minikube start --iso-url=https://storage.googleapis.com/minikube/iso/minikube-v0.23.5.iso
@minikube start --memory 2048 --cpus 2 --extra-config=apiserver.Authorization.Mode=RBAC --kubernetes-version=v1.10.0
@eval $(minikube docker-env)
stop:
@minikube stop
dashboard:
@minikube dashboard
service:
@kubectl apply -f services/${NAME} --record
test:
@curl http://$(shell minikube ip):${IP}
# Switch to a different namespace, so that you don't have to specify the namespace all the time
# make switch NAMESPACE=default
set-context:
@kubectl config set-context $(shell kubectl config current-context) --namespace=${NS}
get-contexts:
@kubectl config get-contexts
# l5d-verify:
# @kubectl -n ${NAMESPACE} port-forward $(shell kubectl -n ${NAMESPACE} get pod -l app=l5d -o jsonpath='{.items[0].metadata.name}') 9990 &
# OUTGOING_PORT := $(shell kubectl get svc l5d -o jsonpath='{.spec.ports[0].nodePort}' -n ${NAMESPACE})
# L5D_INGRESS_LB := http://$(shell minikube ip):${OUTGOING_PORT}
# l5d-test:
# @curl -H "Host: hello" ${L5D_INGRESS_LB}
# http_proxy=${L5D_INGRESS_LB} curl -s http://hello
# http_proxy=${L5D_INGRESS_LB} curl -s http://world
# ADMIN_PORT=$(shell kubectl get svc l5d -o jsonpath='{.spec.ports[?(@.name=="admin")].nodePort}')
# l5d-dashboard:
# @open http://$(shell minikube ip):${ADMIN_PORT}
# conduit-test:
# @curl http://$(shell minikube ip):$(shell kubectl get svc echo -o jsonpath='{.spec.ports[0].nodePort}')
# conduit-simulate:
# wrk -d300 http://$(shell minikube ip):$(shell kubectl get svc echo -o jsonpath='{.spec.ports[0].nodePort}')