add k8s files
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Torma Kristóf 2020-04-10 16:00:28 +02:00
parent 59f663c1fd
commit 3c521fcba8
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
3 changed files with 41 additions and 1 deletions

View File

@ -1,5 +1,5 @@
FROM openjdk:11-jdk-oracle
RUN addgroup -S spring && adduser -S spring -G spring
RUN groupadd spring && useradd -g spring spring
USER spring:spring
WORKDIR /app
EXPOSE 8080

24
k8s/deployment.yml Normal file
View File

@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-gateway
namespace: birbnetes
labels:
app: api-gateway
spec:
replicas: 1
selector:
matchLabels:
app: api-gateway
strategy:
type: Recreate
template:
metadata:
labels:
app: api-gateway
spec:
containers:
- image: registry.kmlabz.com/tormakris/api-gateway
name: api-gateway
ports:
- containerPort: 8080

16
k8s/service.yml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: api-gateway
namespace: birbnetes
labels:
app: api-gateway
spec:
ports:
- name: api-gateway
port: 80
targetPort: 8080
protocol: TCP
selector:
app: api-gateway
type: ClusterIP