mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 01:15:49 +00:00
k8s part done
This commit is contained in:
parent
bb42fb739b
commit
2dab087dda
3 changed files with 51 additions and 0 deletions
8
petclinic-config.yaml
Normal file
8
petclinic-config.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: petclinic-configmap
|
||||
data:
|
||||
application.yml: |
|
||||
server:
|
||||
port: 8081
|
30
petclinic-deployment.yaml
Normal file
30
petclinic-deployment.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: petclinic
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spring-petclinic
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: spring-petclinic
|
||||
spec:
|
||||
containers:
|
||||
- name: petclinic
|
||||
image: spring-petclinic
|
||||
imagePullPolicy: Never
|
||||
ports:
|
||||
- containerPort: 8081
|
||||
name: "http"
|
||||
volumeMounts:
|
||||
- name: app-config
|
||||
mountPath: /application.yml
|
||||
subPath: application.yml
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: app-config
|
||||
configMap:
|
||||
name: petclinic-configmap
|
13
petclinic-service.yaml
Normal file
13
petclinic-service.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: petclinic-service
|
||||
spec:
|
||||
selector:
|
||||
app: spring-petclinic
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 8081
|
||||
targetPort: 8081
|
||||
type: NodePort
|
Loading…
Reference in a new issue