Last active
August 7, 2023 15:56
-
-
Save mehmetaydogduu/865512765f1697ba706174f45cb944b0 to your computer and use it in GitHub Desktop.
infinite-calls.yaml
This file contains 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: apps/v1 | |
kind: Deployment | |
metadata: | |
name: infinite-calls | |
labels: | |
app: infinite-calls | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: infinite-calls | |
template: | |
metadata: | |
name: infinite-calls | |
labels: | |
app: infinite-calls | |
spec: | |
containers: | |
- name: infinite-calls | |
image: busybox | |
command: | |
- /bin/sh | |
- -c | |
- "while true; do wget -q -O- http://php-apache; done" |
This file contains 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
# https://www.techtarget.com/searchitoperations/tutorial/Kubernetes-performance-testing-tutorial-Load-test-a-cluster | |
sudo yum install openssl | |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh | |
chmod 700 get_helm.sh | |
./get_helm.sh | |
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml | |
kubectl get deployment metrics-server -n kube-system | |
minikube addons enable metrics-server | |
kubectl apply -f https://k8s.io/examples/application/php-apache.yaml | |
kubectl get pods | |
kubectl autoscale deployment php-apache --cpu-percent=80 --min=1 --max=4 | |
kubectl get hpa | |
kubectl get hpa -w | |
kubectl describe hpa | |
kubectl apply -f https://gist.githubusercontent.com/mehmetaydogduu/865512765f1697ba706174f45cb944b0/raw/19f292cd6e33a258f2901d4ef1bc09778d5a6a79/f.yaml | |
kubectl get pods | |
kubectl scale deployment/infinite-calls --replicas 4 | |
kubectl exec -it <container name> sh | |
ps | |
kubectl get services | |
kubectl port-forward svc/php-apache 80:80 | |
kubectl scale deployment/infinite-calls --replicas 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment