41 lines
879 B
YAML
41 lines
879 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
namespace: spring-dev
|
|
name: spring-web-service
|
|
spec:
|
|
selector:
|
|
app: spring-web-api
|
|
ports:
|
|
- port: 8080
|
|
targetPort: 8080
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
namespace: spring-dev
|
|
name: spring-web-api
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: spring-web-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: spring-web-api
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: registry-secret
|
|
containers:
|
|
- name: spring-web-app
|
|
image: registry.kh.cubetiqs.com/spring-web-api:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
env:
|
|
- name: MONGODB_URI
|
|
value: mongodb://mongo:27017/spring-web-api
|
|
- name: APP_NAME
|
|
value: spring-web-api-hello
|
|
imagePullPolicy: Always |