Implementation of a zero-scaling system leveraging Knative and Kubernetes.
Resource | Link |
---|---|
Implementation Base | Spright Project |
Video Guide | YouTube Tutorial |
Component | Version/Specification |
---|---|
OS | Ubuntu 22.04 |
Access | Root/sudo privileges |
Runtime | Python 3.x |
Containers | Docker |
Orchestration | Kubernetes |
Serverless | Knative |
git clone https://github.com/JamesChen-us/zero-scaling.git
# Install requirements
sudo apt-get update
sudo apt-get install unrar
# Download and extract trace data
curl -L -o zero-scaling/AzureFunctionsInvocationTraceForTwoWeeksJan2021.rar \
https://github.com/Azure/AzurePublicDataset/raw/master/data/AzureFunctionsInvocationTraceForTwoWeeksJan2021.rar
unrar e zero-scaling/AzureFunctionsInvocationTraceForTwoWeeksJan2021.rar zero-scaling/
mv zero-scaling/AzureFunctionsInvocationTraceForTwoWeeksJan2021.txt \
zero-scaling/AzureFunctionsInvocationTrace.txt
Complete these setups before proceeding:
# System packages
sudo apt install python3-pip python3-locust
# Python packages
pip install locust --upgrade
pip install jinja2
pip install pandas matplotlib seaborn
# Get control node's internal IP
kubectl get nodes -o wide
# Retrieve Kourier's HTTP2 port
PORT=$(kubectl get svc kourier -n kourier-system \
-o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
- Edit configuration files:
zero-scaling/configuration.yaml
zero-scaling/locustfile.py
- Update
IP:PORT
values - Deploy configuration:
kubectl apply -f zero-scaling/configuration.yaml
# Verify service status
kubectl get ksvc
Expected output: All services should show Ready: True
# Test frontend access
curl -H "Host: kn-frontend.default.127.0.0.1.sslip.io" \
http://128.110.96.97:31882 -v
# Install metrics server
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
# Edit deployment if needed
kubectl -n kube-system edit deploy metrics-server
# Verify metrics collection
kubectl top pod
# Generate histograms
python zero-scaling/histogram.py
# Run load test
locust -H kn-frontend.default.127.0.0.1.sslip.io \
-f zero-scaling/locustfile.py --processes -1
- Services properly configured
- IP and PORT values verified
- Kourier Ingress setup complete
- Regular service status monitoring
Issue | Resolution Steps |
---|---|
Service Status | Run kubectl get ksvc |
Kourier Config | Check kubectl get svc -n kourier-system |
Connectivity | Verify service-to-service communication |
IP/PORT | Confirm values in configuration files |