Score:0

Why nginx is not reaching file in azure blob storage?

eg flag

Here is the minimal reproducible sample

configmap.yaml

apiVersion: v1
kind: ConfigMap 
metadata: 
  name: nginx-conf 
data: 
default: |     
  server {
       server_name myserver.com;
       location /read/ {
       proxy_pass https://myaccount.blob.core.windows.net/mycontainer/file.txt;
       }
     }

In my deployment file, I am mounting the configmap as volume as:

  containers:
    - name: nginx
      image: nginx
      imagePullPolicy: IfNotPresent
      ports:
        - containerPort: 80
          name: http
      volumeMounts:
        - name: nginx-config
          mountPath: /etc/nginx/site-enabled/default
          subPath: default
  volumes:
  - name: nginx-config
    configMap:
      name: nginx-config

After deployment an API call looks:

curl https://myserver.com/read

as a response to getting

{"error":"Not found","status":404}

The azure blob data ist accessible for reading. A pure API call via curl on https://myaccount.blob.core.windows.net/mycontainer/file.txt; is successfully done.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.