KubernetesClassAkademik/Clase 3/Ejercicio/hello-app/hello-app.yaml

48 lines
728 B
YAML
Raw Normal View History

2022-09-07 12:28:50 -06:00
apiVersion: v1
kind: Namespace
metadata:
name: hello
---
apiVersion: v1
kind: Service
metadata:
name: my-hello-svc
namespace: hello
labels:
app: hello
spec:
type: ClusterIP
selector:
app: hello
ports:
- port: 80
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-hello
namespace: hello
labels:
app: hello
spec:
replicas: 2
selector:
matchLabels:
app: hello
template:
metadata:
labels:
app: hello
spec:
containers:
- name: hello
image: gcr.io/google-samples/hello-app:1.0
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 8080