【问题标题】:Deploy Dotnet core Web api to AWS EKS将 Dotnet 核心 Web api 部署到 AWS EKS
【发布时间】:2021-06-27 15:20:17
【问题描述】:

我正在通过 kubectl get svc 命令将 dotnet core web API 3.1 示例应用程序部署到 aws eks 我可以获取外部 URL,但 URL 不起作用,

相同的部署 yml 适用于 Web 应用程序,但不适用于 Web API。我们是否需要为 Web API 项目做任何额外的配置?

下面是我的yml部署cmets,

kind: Deployment
metadata:
  name: apiddapp
spec:
  replicas: 1
  selector:
    matchLabels:
      app: apiddapp
  template:
    metadata:
      labels:
        app: apiddapp
    spec:
      containers:
        - image: xxxx.amazonaws.com/myapptestapi:v3
          name: apiddapp
          ports:
            - containerPort: 8080

apiVersion: v1
kind: Service
metadata:
  name: apiddapp
spec:
  ports:
    - port: 80
      targetPort: 8080
  selector:
    app: apiddapp
  type: LoadBalancer```

Many thanks in advance.

【问题讨论】:

  • 你能详细说明“不工作”吗? yaml 申请不成功? yaml 是否适用但 pod 没有启动?有任何 pod 日志吗?
  • 否,可以创建服务。但是当我在浏览器中访问外部 URL 时,它显示该页面无法加载。我在邮递员中试过也一样。

标签: amazon-web-services .net-core amazon-eks webapi


【解决方案1】:

尝试为部署和服务创建单独的文件。先创建服务再看看。我有同样的问题,但现在可以了。我关注了https://www.youtube.com/watch?v=ZOROT9yMp44

【讨论】:

    猜你喜欢
    • 2020-06-21
    • 2019-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-18
    • 2020-02-04
    • 2020-11-18
    相关资源
    最近更新 更多