Skip to content

Instantly share code, notes, and snippets.

View fawix's full-sized avatar
🐱
Seeking wonders

Fatima Silveira fawix

🐱
Seeking wonders
View GitHub Profile
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- name: http
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
# this value goes away - we don't need to explicitly set the number of replicas anymore!
# replicas: 3
selector:
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: nginx-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: nginx-deployment
minReplicas: 1