Created
December 27, 2022 18:08
-
-
Save Kahuna-Honu/6091301bf582f244094a2fa1e2d843d7 to your computer and use it in GitHub Desktop.
aksdeploy.yml
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: kuberhwdeployment | |
spec: | |
selector: | |
matchLabels: | |
app: kuberhwapp | |
template: | |
metadata: | |
labels: | |
app: kuberhwapp | |
spec: | |
containers: | |
- name: kuberhwcontainer | |
image: nginxdemos/hello:latest | |
ports: | |
- containerPort: 80 | |
resources: | |
limits: | |
cpu: 100m #100 millicores = 1/10 of a core | |
memory: 50Mi #50 Mebibytes | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: kuberhwservice | |
spec: | |
type: LoadBalancer | |
ports: | |
- protocol: TCP | |
port: 80 | |
selector: | |
app: kuberhwapp | |
--- | |
apiVersion: autoscaling/v1 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: {NombreEscalador} | |
spec: | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: Deployment #Que objeto se va a escalar | |
name: {NombreDeployment} #Nombre de deployment | |
minReplicas: {RéplicasBase} | |
maxReplicas: {RéplicasMáximas} | |
targetCPUUtilizationPercentage: {TriggerCPU} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment