我面对的是similar issue。";Deployment.yml";已成功应用,但";Services.yml";提供了
验证数据时出错:服务器找不到请求的 资源Deployment.yml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: #{component}#
spec:
replicas: #{replica}#
selector:
matchLabels:
app: #{component}#
template:
metadata:
labels:
app: #{component}#
spec:
containers:
-
env:
-
name: AUTHOR
value: #{author}#
image: #{acr}#/#{component}#:#{stage}#-#{Build.BuildId}#
imagePullPolicy: Always
name: #{component}#
ports:
-
containerPort: 8000
resources:
limits:
cpu: "1"
memory: 512Mi
requests:
cpu: "0.25"
memory: 256Mi
imagePullSecrets:
-
name: "acrakssecret"
Services.yml
---
apiVersion: v1
kind: Service
metadata:
name: #{component}#
spec:
ports:
-
name: #{component}#
port: 443
protocol: TCP
targetPort: 8000
selector:
app: #{component}#
type: LoadBalancer
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"54684493f8139456e5d2f963b23cb5003c4d8055", GitTreeState:"clean", BuildDate:"2021-03-22T23:02:59Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
通过kubectl控制台部署时,成功应用了";Services.yml";。有什么帮助吗?
作为对我的支持票证的回应,微软提供了this article,只需勾选kubectl任务的高级部分中的‘检查最新版本’即可解决该问题。
希望这能帮助他人:)