diff --git a/Dockerfile b/Dockerfile index 68ba422..2935857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,5 @@ RUN npm run build FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf -EXPOSE 15002 +EXPOSE 32166 CMD ["nginx", "-g", "daemon off;"] diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..5dda7c9 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,96 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + deployment.kubernetes.io/revision: "1" + io.portainer.kubernetes.application.note: "" + creationTimestamp: 2024-01-11T13:42:37Z + generation: 1 + labels: + io.portainer.kubernetes.application.name: apkt-eis + io.portainer.kubernetes.application.owner: sadigit-randy + io.portainer.kubernetes.application.stack: apkt-eis + name: apkt-eis + namespace: default + uid: 5baf9337-e94e-4433-b3ae-fed15a69abfe +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: apkt-eis + strategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 100% + type: RollingUpdate + template: + metadata: + creationTimestamp: null + labels: + app: apkt-eis + io.portainer.kubernetes.application.name: apkt-eis + spec: + containers: + - image: apkt-eis:latest + imagePullPolicy: IfNotPresent + name: apkt-eis + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 +status: + availableReplicas: 1 + conditions: + - lastTransitionTime: 2024-01-11T13:42:37Z + lastUpdateTime: 2024-01-11T13:42:37Z + message: Deployment has minimum availability. + reason: MinimumReplicasAvailable + status: "True" + type: Available + - lastTransitionTime: 2024-01-11T13:42:37Z + lastUpdateTime: 2024-01-11T13:42:53Z + message: ReplicaSet "apkt-eis-5b895bf4d5" has successfully progressed. + reason: NewReplicaSetAvailable + status: "True" + type: Progressing + observedGeneration: 1 + readyReplicas: 1 + replicas: 1 + updatedReplicas: 1 +--- +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: 2024-01-11T13:42:37Z + labels: + io.portainer.kubernetes.application.name: apkt-eis + io.portainer.kubernetes.application.owner: sadigit-randy + io.portainer.kubernetes.application.stack: apkt-eis + name: apkt-eis + namespace: default + uid: ef0f2a1f-ee2a-4310-a2ed-80bc8093b29f +spec: + clusterIP: 10.152.183.252 + clusterIPs: + - 10.152.183.252 + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: port-0 + port: 32166 + protocol: TCP + targetPort: 80 + selector: + app: apkt-eis + sessionAffinity: None + type: ClusterIP +status: + loadBalancer: {} diff --git a/deployment.yml b/deployment.yml deleted file mode 100644 index 0c5423f..0000000 --- a/deployment.yml +++ /dev/null @@ -1,20 +0,0 @@ -# deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: apkt-eis -spec: - replicas: 3 - selector: - matchLabels: - app: apkt-eis - template: - metadata: - labels: - app: apkt-eis - spec: - containers: - - name: apkt-eis - image: apkt-eis:latest - ports: - - containerPort: 80 diff --git a/ingress.yaml b/ingress.yaml new file mode 100644 index 0000000..c828dd6 --- /dev/null +++ b/ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: apkt-eis-ingress +spec: + rules: + - host: localhost + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: apkt-eis-service + port: + number: 80 diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..a8340a9 --- /dev/null +++ b/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: apkt-eis-service +spec: + selector: + app: apkt-eis + ports: + - protocol: TCP + port: 80 + targetPort: 80 + type: LoadBalancer