cd ~ git clone https://github.com/schoolofdevops/metrics-server.git kubectl apply -k metrics-server/manifests/overlays/release
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: | |
creationTimestamp: null | |
labels: | |
app: vote | |
name: vote | |
annotations: | |
kubernetes.io/change-cause: "updated image to v2" | |
spec: |
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: 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 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: StatefulSet | |
metadata: | |
name: redis | |
labels: | |
app: redis | |
spec: | |
selector: | |
matchLabels: | |
role: master |
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: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: vote | |
namespace: instavote | |
spec: | |
ingressClassName: nginx | |
rules: | |
- host: vote.example.com |
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
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update | |
apt-get install -y git wget net-tools | |
# Prereqs | |
modprobe overlay |
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: autoscaling/v2 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: vote | |
spec: | |
minReplicas: 2 | |
maxReplicas: 10 | |
metrics: | |
- type: ContainerResource | |
containerResource: |
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
2023-11-22 10:19:12 ERROR - An error occurred in the application: | |
Traceback (most recent call last): | |
File "app.py", line 27, in <module> | |
result = divide(15, 3) | |
File "app.py", line 15, in divide | |
return x / y | |
ZeroDivisionError: division by zero |
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: argoproj.io/v1alpha1 | |
kind: Application | |
metadata: | |
name: vote-dev | |
namespace: argocd | |
spec: | |
destination: | |
namespace: dev | |
server: https://kubernetes.default.svc | |
project: default |
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
cd bootcamp/jenkins | |
git pull origin main | |
docker-compose build | |
docker-compose up -d |