Update Dockerfile and Kubernetes manifests
This commit updates the Dockerfile to expose port 32166 instead of 15002. It also adds a new deployment.yaml file, an ingress.yaml file, and a service.yaml file for Kubernetes deployment. The deployment.yml file has been deleted.
This commit is contained in:
parent
9943d214d2
commit
bfab727e59
@ -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;"]
|
||||
|
96
deployment.yaml
Normal file
96
deployment.yaml
Normal file
@ -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: {}
|
@ -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
|
16
ingress.yaml
Normal file
16
ingress.yaml
Normal file
@ -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
|
12
service.yaml
Normal file
12
service.yaml
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user