This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pods=$(kubectl get po -A -l linkerd.io/control-plane-ns -ojsonpath="{range .items[*]}{.metadata.name} {.metadata.namespace}{'\n'}{end}") | |
IFS=" " | |
while read name namespace; do | |
tcp=$(kubectl debug -n $namespace $name --image=cr.l5d.io/linkerd/debug:stable-2.12.0 -it -- cat /proc/net/tcp) | |
close_wait=$(echo $tcp | awk 'BEGIN {cnt=0} $4==08 {cnt++} END {print cnt}') | |
fin_wait_2=$(echo $tcp | awk 'BEGIN {cnt=0} $4==05 {cnt++} END {print cnt}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: policy.linkerd.io/v1beta1 | |
kind: Server | |
metadata: | |
name: proxy-admin | |
labels: | |
linkerd.io/extension: viz | |
spec: | |
podSelector: | |
matchExpressions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: policy.linkerd.io/v1beta1 | |
kind: Server | |
metadata: | |
namespace: emojivoto | |
name: emoji-grpc | |
labels: | |
app.kubernetes.io/part-of: emojivoto | |
app.kubernetes.io/name: emoji | |
app.kubernetes.io/version: v11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
labels: | |
app.kubernetes.io/instance: ingress-nginx | |
app.kubernetes.io/name: ingress-nginx | |
name: ingress-nginx | |
--- | |
apiVersion: v1 | |
automountServiceAccountToken: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: emojivoto | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: emoji | |
namespace: emojivoto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1: Install Linkerd | |
# Step 2: Install Linkerd Viz (optional, but helpful for seeing what's going on) | |
# Step 3: Install Linkerd Jaeger | |
# Step 4: Install Nginx Ingress: | |
linkerd inject https://gist.githubusercontent.com/adleong/f7318d9282ab99ba12c3479405882e60/raw/713daaa51f035d0d484ea79daf77cc3aaded8010/yml | kubectl apply -f - | |
# Notice the tracing related config in the nginx config configmap in the aboe gist: https://gist.github.com/adleong/f7318d9282ab99ba12c3479405882e60#file-yml-L340 | |
# Step 5: Install Emojivoto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Two backend pods, one always failing | |
# and another one returning OK response | |
# Slowcooker is used to generate traffic | |
# that will be routed via traffic split | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: backend | |
spec: |
OlderNewer