diff --git a/Dockerfile b/Dockerfile index c1ec63b..5f822b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/k8s/deployment.yml b/k8s/deployment.yml new file mode 100644 index 0000000..f81f2c1 --- /dev/null +++ b/k8s/deployment.yml @@ -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 \ No newline at end of file diff --git a/k8s/service.yml b/k8s/service.yml new file mode 100644 index 0000000..d6d88e3 --- /dev/null +++ b/k8s/service.yml @@ -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 \ No newline at end of file