i have an angular app running inside a docker nginx container on port 85 like it is mentioned in default.conf below. When i run the container i am obliged to add argument “-p 85:85” just this way so that i can browse the app in localhost:85 and it works. Now my container is inside a minikube pod (on ubuntu) and it is running successefully . i also checked coredns and minikube servers and they are working fine. BUTT i cannot access my app in browser when i make minikubeip:nodeport i even allowed full ingress and egress traffic but in vain !!! i don’t know why!
Dockerfile:
```
# Stage 0
FROM node:10.8.0 as build-stage WORKDIR /app COPY package*.json /app/ RUN npm install COPY ./ /app/ ARG configuration=production RUN npm run build -- --output-path=./dist/out --configuration $configuration
# Stage 1 FROM nginx:1.15 #Copy ci-dashboard-dist COPY --from=build-stage /app/dist/out/ /usr/share/nginx/html #Copy default nginx configuration COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
```
pods.yaml
apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: null name: frontend spec: replicas: 2 selector: matchLabels: app: front strategy: {} template: metadata: creationTimestamp: null labels: app: front spec: containers: - name: front image: chaima31991/angularimage command: [ "/bin/bash", "-c", "--"] args: [ "while true; do sleep 30; done;" ] imagePullPolicy: Always resources: {} ports: - containerPort: 85 - containerPort: 443
services.yaml
```
apiVersion: v1 kind: Service metadata: name: front-service labels: app: front spec: ports: - port: 85 targetPort: 85 protocol: TCP name: http - port: 443 protocol: TCP name: https selector: app: front type: NodePort ```
ingress.yaml
```
piVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-all-ingress
spec:
podSelector: {}
ingress:
- {}
policyTypes:
- Ingress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-all-egress
spec:
podSelector: {}
egress:
- {}
policyTypes:
- Egress
```
default.conf
```
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/json max;
application/javascript max;
~image/ max;
}
server {
listen 85;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
expires $expires;
gzip on;
}
```
Thank you for helping me