简体   繁体   English

容器化逻辑应用在部署到 AKS 时无法正常工作

[英]Containerized logic app not working when deployed to AKS

We are trying to deploy a logic app as containerized workload in AKS.我们正在尝试将逻辑应用程序部署为 AKS 中的容器化工作负载。 Following is our Docker file:以下是我们的 Docker 文件:

FROM mcr.microsoft.com/azure-functions/dotnet:3.0.14492-appservice

ENV AzureWebJobsStorage=<StorageAccount connection string>
ENV AZURE_FUNCTIONS_ENVIRONMENT Development
ENV AzureWebJobsScriptRoot=/home/site/wwwroot
ENV AzureFunctionsJobHost__Logging__Console__IsEnabled=true
ENV FUNCTIONS_V2_COMPATIBILITY_MODE=true

COPY ./bin/release/netcoreapp3.1/publish/ /home/site/wwwroot

Following is our deployment manifest file:以下是我们的部署清单文件:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pfna-pgt-sf-pdfextract
  namespace: canary
  labels:
    app: pfna-pgt-sf-pdfextract
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pfna-pgt-sf-pdfextract
  template:
    metadata:
      labels:
        app: pfna-pgt-sf-pdfextract
    spec:
      nodeSelector:
        beta.kubernetes.io/os: linux
      containers:
        - name: pfna-pgt-sf-pdfextract
          image: "image_link"
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 250m
              memory: 256Mi
          ports:
            - containerPort: 80
          env:
            - name: AzureBlob_connectionString
              value: <connection_string>
            - name: AzureWebJobsStorage
              value: <connection_string>
      imagePullSecrets:
        - name: sbx-acr-secret
---
apiVersion: v1
kind: Service
metadata:
  name: pfna-pgt-sf-pdfextract
  namespace: canary
  labels:
    app: pfna-pgt-sf-pdfextract
spec:
  type: LoadBalancer
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
    name: http-pfna-pgt-sf-pdfextract
  selector:
    app: pfna-pgt-sf-pdfextract

Following is connections.json:以下是 connections.json:

{
  "serviceProviderConnections": {
    "AzureBlob": {
      "parameterValues": {
        "connectionString": "@appsetting('AzureWebJobsStorage')"
      },
      "serviceProvider": {
        "id": "/serviceProviders/AzureBlob"
      },
      "displayName": "localAzureBlob"
    }
  },
  "managedApiConnections": {}
}

Following is the host.json:下面是host.json:

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
    "version": "[1.*, 2.0.0)"
  },
  "extensions": {
    "workflow": {
       "settings": {
          "Runtime.Backend.VariableOperation.MaximumStatelessVariableSize": "5000000"
       }
    }
 }
}

The image is running successfully in docker desktop but when deployed to AKS we are getting 'Function host is not running'.该图像在 docker 桌面上成功运行,但当部署到 AKS 时,我们得到“功能主机未运行”。

Please help resolve this.请帮助解决这个问题。

You need to specify WEBSITE_HOSTNAME as well (doesn't matter what it is, just needs to be specified)您还需要指定 WEBSITE_HOSTNAME (不管它是什么,只需要指定)

That being said, as of today there is another issue that is causing the function host to not start (libadvapi32.dll).话虽这么说,截至今天还有另一个问题导致 function 主机无法启动 (libadvapi32.dll)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eclipse Java web 应用程序 servlets 在部署到 AWS 时不起作用 - Eclipse Java web app servlets not working when deployed to AWS 无法访问部署在 AKS 集群上的我的应用程序,来自 azure 公共 ip - Can't access my app deployed on an AKS cluster, from the azure public ip 无法访问部署在 AKS 上的应用程序 - Can't access an application deployed on AKS 身份 MVC 项目在 .NET 5 升级到 .NET 6 部署到 AKS 集群时找不到视图 (Linux) - Identity MVC Project in .NET 5 upgraded to .NET 6 cannot find Views when deployed to AKS Cluster (Linux) HTTP 在Azure上部署应用程序时出现413错误 - HTTP 413 Error When App is Deployed on Azure firebase 部署和托管 React App 时获取空白页面 - Getting blank page when React App is deployed and hosted by firebase 部署在 azure web 应用程序上时找不到 React 应用程序上的字体 - Font on React app not found when deployed on azure web app Logic App Sharepoint 拉取文件时文件名错误 - Logic App Sharepoint File Name Wrong When Pulling File 部署到 Azure Function App 时跨执行共享的字典值 - Dictionary values shared across executions when deployed to Azure Function App 跳过逻辑应用连接器 - Skipping logic app connector
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM