Cannot access application deployed in Azure ACS Kubernetes Cluster using Azure CICD Pipeline Cannot access application deployed in Azure ACS Kubernetes Cluster using Azure CICD Pipeline kubernetes kubernetes

Cannot access application deployed in Azure ACS Kubernetes Cluster using Azure CICD Pipeline


For your issue, I did a test and it worked in my side. The yaml file here:

apiVersion: apps/v1beta1kind: Deploymentmetadata:  name: nginxspec:  replicas: 1  template:    metadata:      labels:        app: nginx    spec:      containers:      - name: nginx        image: nginx        ports:        - containerPort: 80---apiVersion: v1kind: Servicemetadata:  name: nginxspec:  type: LoadBalancer  ports:  - port: 88    targetPort: 80  selector:    app: nginx

And there are some points should pay attention to.

  1. You should make sure which port the service listen to in the container. For example, in my test, the nginx service listens to port 80 default.
  2. The port that you want to expose in the node should be idle. In other words, the port was not used by other services.
  3. When all the steps have done. You can access the public IP with the port you have exposed in the node.

The screenshots show the result of my test:

enter image description hereenter image description here

Hope this will help you!


We are able to solve this issue after reconfiguring Kubernetes Service with Right configuration and changing deploy.yaml file as follows -

apiVersion: apps/v1beta1kind: Deployment metadata: name: imageclassificationapp spec:   selector:    matchLabels:      app: imageclassificationapp replicas: 1 # tells deployment to run 2 pods matching the template template: metadata:   labels:     app: imageclassificationapp spec:    containers:     - name: model-api      image: crrq51278013.azurecr.io/model-api:205     ports:      - containerPort: 88---apiVersion: v1kind: Service   metadata:     name: imageclassificationapp  spec:    type: LoadBalancer  ports:  - port: 85 targetPort: 88 selector:    app: imageclassificationapp

We can close this thread now.