43 lines
910 B
YAML
43 lines
910 B
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: catalog
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: catalog26-deployment
|
|
namespace: catalog
|
|
labels:
|
|
app: catalog26
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: catalog26
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: catalog26
|
|
spec:
|
|
containers:
|
|
- name: catalog26
|
|
image: registry.chopark.home/catalog26:latest # Or yourusername/catalog26:latest for Docker Hub
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8080 # This must match your Dockerfile EXPOSE port
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: catalog26-service
|
|
namespace: catalog
|
|
spec:
|
|
type: LoadBalancer # Or NodePort if you don't have a LoadBalancer
|
|
selector:
|
|
app: catalog26
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8080
|
|
# nodePort: 30080 # Uncomment if using NodePort |