Skip to content

Instantly share code, notes, and snippets.

@0mp
Created June 23, 2020 19:52
Show Gist options
  • Save 0mp/bc756048fdf48cdf37db6e6912b06187 to your computer and use it in GitHub Desktop.
Save 0mp/bc756048fdf48cdf37db6e6912b06187 to your computer and use it in GitHub Desktop.
petclinic
apiVersion: v1
kind: PersistentVolume
metadata:
name: logs-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/vagrant/logs"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: logs-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 3Gi
apiVersion: v1
kind: Service
metadata:
name: petclinic-service-1
spec:
type: NodePort
selector:
app: petclinic-1
ports:
- port: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: petclinic-deployment-1
labels:
app: petclinic-1
spec:
selector:
matchLabels:
app: petclinic-1
template:
metadata:
labels:
app: petclinic-1
spec:
volumes:
- name: logs-storage
persistentVolumeClaim:
claimName: logs-claim
containers:
- name: petclinic-1
image: mpts/petclinic:latest
ports:
- containerPort: 8080
args:
- --logging.file.name=/logs/application.log
volumeMounts:
- mountPath: /logs
name: logs-storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment