Files
automation/kubernetes-templates/whoami.yml

56 lines
938 B
YAML

---
apiVersion: v1
kind: Namespace
metadata:
name: whoami
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: whoami-sa
namespace: whoami
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: whoami
namespace: whoami
spec:
replicas: 1
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
serviceAccountName: whoami-sa
containers:
- name: whoami
image: traefik/whoami
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 50m
memory: 64Mi
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: whoami
namespace: whoami
spec:
type: NodePort
selector:
app: whoami
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
nodePort: 31002