-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheatsheet.txt
47 lines (26 loc) · 1.11 KB
/
cheatsheet.txt
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
# Traffic Split
## Create a new split service
kubectl apply -f webapp-split-svc.yml
## Update the ingress
kubectl apply -f books-split-ingress.yml
## Create the traffic split resource
kubectl apply -f traffic-split.yml
## Create the v4 Deployment and Service
kubectl apply -f web-svc-v4.yml
## Open the v4 service in the browser
open http://$(kubectl get svc webapp-v4 -n booksapp -ojsonpath={.status.loadBalancer.ingress[].ip}):7000
## Observe that the split service has no public endpoint
watch linkerd stat deploy -n booksapp webapp webapp-v4
kubectl log -f deploy/webapp -n booksapp -c service
kubectl log -f deploy/webapp-v4 -n booksapp -c service
# Update the endpoint that is called for traffic service: - "webapp-split:7000"
kubectl edit deploy/traffic -n booksapp
# Update the traffic weights
kubectl edit ts booksapp-rollout -n booksapp
# Debugging
## Tap
linkerd tap -n booksapp deploy/webapp -o wide
## Debug container
kubectl get deploy/books -n booksapp -oyaml | linkerd inject --enable-debug-sidecar - > books-debug.yml
kubectl apply -f books-debug.yml
kubectl logs -f deploy/books linkerd-debug