mirror of
https://github.com/wardviaene/kubernetes-course.git
synced 2026-02-14 09:39:54 +00:00
36 lines
606 B
YAML
36 lines
606 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: helloworld-v1-deployment
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: helloworld-v1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: helloworld-v1
|
|
spec:
|
|
containers:
|
|
- name: k8s-demo
|
|
image: wardviaene/k8s-demo:latest
|
|
ports:
|
|
- name: nodejs-port
|
|
containerPort: 3000
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: helloworld-v1
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 80
|
|
nodePort: 30303
|
|
targetPort: 3000
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
app: helloworld-v1
|