- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在本地计算机上运行Multiservices系统,当我在Chrome中键入域时,总是得到:
404 Not Found
nginx/1.19.1
考虑客户:
FROM node:13.14.0
WORKDIR /app
COPY package.json .
RUN npm i
COPY . .
CMD ["npm","run","start"]
client-deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: client-depl
spec:
replicas: 1
selector:
matchLabels:
app: multi-client
template:
metadata:
labels:
app: multi-client
spec:
containers:
- name: multi-client
image: MYDOCKERID/multi-client
---
apiVersion: v1
kind: Service
metadata:
name: client-cluster-ip-service
spec:
selector:
app: multi-client
ports:
- name: multi-client
protocol: TCP
port: 3000
targetPort: 3000
Skaffold.yaml:
apiVersion: skaffold/v2alpha3
kind: Config
deploy:
kubectl:
manifests:
- ./k8s/*
build:
local:
push: false
artifacts:
- image: MYDOCKERID/multi-client
context: client
docker:
dockerfile: Dockerfile.dev
sync:
manual:
- src: 'src/**/*.js'
dest: .
// ... more services , they work OK
我在主机文件中添加了以下条目:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 fibonacci.dot
当我在Chrome中输入
fibonacci.dot
时,我得到:
C:\Development-T410\Docker\Fibonacci>skaffold dev
[34mListing files to watch...[0m
[34mStarting deploy...[0m
- deployment.apps/client-depl configured
- service/client-cluster-ip-service configured
- persistentvolumeclaim/database-persistent-volume-claim configured
- ingress.extensions/ingress-fibonacci-service configured
- service/postgres-cluster-ip-service configured
- deployment.apps/postgres-deployment configured
- service/redis-cluster-ip-service configured
- deployment.apps/redis-deployment configured
- deployment.apps/server-deployment configured
- service/server-cluster-ip-service configured
- deployment.apps/worker-deployment configured
[34mWaiting for deployments to stabilize...[0m
- deployment/client-depl:
- deployment/postgres-deployment:
- deployment/redis-deployment:
- deployment/server-deployment:
- deployment/worker-deployment:
- deployment/server-deployment: waiting for rollout to finish: 1 out of 3 new replicas have been updated...
- deployment/worker-deployment: waiting for rollout to finish: 0 out of 1 new replicas have been updated...
- deployment/client-depl: waiting for rollout to finish: 1 old replicas are pending termination...
- deployment/redis-deployment: waiting for rollout to finish: 1 old replicas are pending termination...
- deployment/postgres-deployment: waiting for rollout to finish: 1 old replicas are pending termination...
- deployment/worker-deployment: waiting for rollout to finish: 1 old replicas are pending termination...
- deployment/client-depl is ready. [4/5 deployment(s) still pending]
- deployment/server-deployment: waiting for rollout to finish: 2 out of 3 new replicas have been updated...
- deployment/postgres-deployment is ready. [3/5 deployment(s) still pending]
- deployment/worker-deployment is ready. [2/5 deployment(s) still pending]
- deployment/redis-deployment is ready. [1/5 deployment(s) still pending]
- deployment/server-deployment: waiting for rollout to finish: 2 old replicas are pending termination...
- deployment/server-deployment: waiting for rollout to finish: 1 old replicas are pending termination...
- deployment/server-deployment is ready.
[34mDeployments stabilized in 34.4563547s[0m
[33mWatching for changes...[0m
[client-depl-f646b85cd-bgmm5 multi-client] ℹ 「wds」: Project is running at http://10.1.1.203/
[client-depl-f646b85cd-bgmm5 multi-client] ℹ 「wds」: webpack output is served from
[client-depl-f646b85cd-bgmm5 multi-client] ℹ 「wds」: Content not from webpack is served from /app/public
[client-depl-f646b85cd-bgmm5 multi-client] ℹ 「wds」: 404s will fallback to /
[client-depl-f646b85cd-bgmm5 multi-client] Starting the development server...
[client-depl-f646b85cd-bgmm5 multi-client]
我们该如何解决?为什么我会得到404?
最佳答案
根据日志
- ingress.extensions/ingress-fibonacci-service configured
/
。您可以看到入口中的内容。
$ kubectl get ingress ingress-fibonacci-service -o=yaml
$ kubectl logs <ingress-controller-pod>
如果您使用的是Nginx入口 Controller 。检查配置
$ kubectl exec -t <ingress-pod> cat nginx.conf
关于docker - (NGINX + Skaffold)-即使编译正确,在本地计算机上运行微服务系统也会始终生成404?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62923487/
我有一个用例,我使用 Github Actions 构建图像一次到 Github 容器存储库。然后我想使用 Skaffold 将已经构建的图像部署到多个 Kubernetes 集群。构建和部署需要分开
运行 后出现此错误支架开发 . Step 1/6 : FROM node:current-alpine3.11 exiting dev mode because first build failed:
我正在向我的 Kubernetes 集群添加 NextJS 前端。我添加了以下文件: apiVersion: apps/v1 kind: Deployment metadata: name: cl
我正在向我的 Kubernetes 集群添加 NextJS 前端。我添加了以下文件: apiVersion: apps/v1 kind: Deployment metadata: name: cl
基本上,我需要在 API 部署之前启动数据库部署。如果数据库未运行,则会在 API 中引发错误。 我弄乱了 artifacts: 中的顺序还有: deploy: kubectl: mani
我将 skaffold 用于基于 k8s 的微服务应用程序。我输入 skaffold dev 和 skaffold run 运行,然后输入 skaffold delete 重新启动所有微服务。 如果我
我不确定如何调试此错误,因为我在终端机上可以确定我的项目ID,并且已经使用gcloud登录了。这是我的-vdebug错误: INFO[0000] starting gRPC server on por
由于我是在 M1 mac 上开发,所以我的 Docker 构建将构建 ARM。我想构建我知道可以使用 --platform 标志构建的 x86_64 图像,但我想使用我的 Skaffold 配置来实现
有没有办法可以将外部环境变量从 Skaffold 传递给 kustomization.yaml . 假设我在下面有一个 kustomization 文件 resources: - ./de
我遇到了 Skaffold,试图简化本地 Docker 镜像开发。我们基本上希望能够快速迭代图像并使用现有的稳定 Helm chart 版本部署它。 在文档中它说: https://github.co
我在本地计算机上运行Multiservices系统,当我在Chrome中键入域时,总是得到: 404 Not Found nginx/1.19.1 考虑客户: Dockerfile.dev: FROM
问题: 在本地,我使用 Skaffold (Kubernetes) 热重载代码的客户端和服务器端。当我关闭它时,它会删除我的服务器 pod,包括我的/migrations/文件夹,因此与我的数据库 a
问题: 当运行 skaffold 并更新监视的文件时,我看到发生文件同步更新并且 nodemon 重新启动服务器,但刷新页面没有显示更改。直到我完全停止 skaffold 并重新启动后,我才看到变化。
Kubernetes 新手在这里。 我有一些奇怪的 Skaffold/Kubernetes 行为。我在 Google Cloud 中工作,但我已更改到本地环境进行测试,结果是一样的。所以可能是我怎么做
有没有办法将 skaffold 配置文件绑定(bind)到命名空间?我想确保 dev、staging 和 prod 部署始终转到正确的命名空间。我知道我可以向 skaffold run 添加命名空间,
我们正在尝试在 Skaffold 下建立一个包含多个微服务应用程序的本地开发环境。我们使用 https://github.com/ahmetb/skaffold-from-laptop-to-clou
我有一个 python 应用程序,它的 docker build 大约需要 15-20 分钟。 这是我的 Dockerfile 或多或少的样子 FROM ubuntu:18.04 ... COPY .
我正在测试 Skaffod,它是微服务开发的一个很棒的工具。但我没有找到任何关于如何在 Java 中使用它的教程。是否支持 Maven 构建? 最佳答案 正在讨论添加 support for Java
我曾尝试遵循建议 here ,具体来说: 运行 docker system prune,释放了大约 6GB 空间 将 docker 桌面首选项中的磁盘镜像大小增加到64 GB(已使用 43 GB) 但
我一直在尝试使用本地 minikube 安装的 skaffold。能够在尽可能接近生产的东西上开发您的项目真是太好了。 如果我使用 getting-started example在 skaffold
我是一名优秀的程序员,十分优秀!