This project demonstrates an small part of Quality of Service (QoS), bandwidth limiting in Kubernetes using Calico's native traffic control features.
Demo is built around HLS (HTTP Live Streaming) video delivery as a real-world use case to visualize how network constraints affect application performance.
- Kind
- Kind Cloud Provider
- kubectl
- Web browser
Note: This demo uses Kind Cloud Provider to run, this is due to the demo app requiring an external IP to run.
kind create cluster --config - <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
# Disable default CNI so Calico can manage networking
disableDefaultCNI: true
nodes:
- role: control-plane
- role: worker
- role: worker
EOFkubectl create -f https://docs.tigera.io/calico/latest/manifests/tigera-operator.yamlkubectl create -f -<<EOF
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
# Configures Calico networking.
calicoNetwork:
bgp: Disabled
ipPools:
- name: default-ipv4-ippool
blockSize: 26
cidr: 10.244.0.0/16
encapsulation: VXLAN
natOutgoing: Enabled
nodeSelector: all()
kubeletVolumePluginPath: None
EOFwatch kubectl get tigerastatuskubectl create -f manifests/Now that you have everything up and running, point your browser to the service external-IP and follow the QOS directive on the page.
Make sure your cluster can acquire ExternalIP for Loadbalancer services, and then restart the pods.
panic: No Ingress found for streama service
goroutine 1 [running]:
main.main()
/app/main.go:99 +0x700