'Unable to access the application with private external IP in Azure Kubernetes cluster
Below is the docker compose file and I am trying to deploy a react application container inside a pod:
version: "3"
services:
client:
build:
context: .
# dockerfile: Dockerfile
args:
- URI=http://localhost:6000
ports:
- 3000:3000
Below is the Docker file.I added the second stanza/snippet as previously I was not able to access the application via browser from my local laptop. But I am still thinking if EXPOSE 80 should be added or not as the yaml has a mention of container port 80 :
FROM node:12 as build-stage
WORKDIR /app
COPY package.json /app/
COPY package-lock.json /app/
RUN npm install
COPY ./ /app/
ARG URI
ENV REACT_APP_URI=$URI
RUN npm run build
FROM httpd:alpine
WORKDIR /var/www/html
COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf
COPY --from=build-stage /app/build/ .
The deployment yaml file is as below.In the below yaml has a Deployment and Service. The deployment would have two sidecar container for logs as count-log-1 and count-log-2.The service used to expose the application is loadbalancer .The file is pasted in below path:
Could someone please help?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

