【发布时间】:2021-04-19 14:08:01
【问题描述】:
我的掌舵图中有一个部署配置,
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "userapi.fullname" . }}
labels:
app: {{ template "userapi.name" . }}
chart: {{ template "userapi.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "userapi.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "userapi.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
另外,我已经配置了我的集群,基本上这是我的配置:
az group create --name demorg --location eastus
az aks create \
--resource-group demorg \
--name democluster \
--node-count 1 \
--vm-set-type VirtualMachineScaleSets \
--load-balancer-sku standard \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 3
az acr create --resource-group demorg --name acrdemo --sku Standard
但我收到此错误:
history.go:53: [debug] 获取发布 userapi 的历史记录 2021-04-19T07:24:14.7353557Z 版本“userapi”不存在。 现在安装它。 2021-04-19T07:24:14.7354630Z install.go:172: [调试] 原始图表版本:“” 2021-04-19T07:24:14.7357809Z install.go:189: [调试] 图表路径: /home/vsts/work/r1/a/_userapi-CI/dropuser/userapi-v0.4.0.tgz 2021-04-19T07:24:14.7360391Z 2021-04-19T07:24:14.7397152Z client.go:109: [debug] 创建 2 个资源 2021-04-19T07:24:14.7397607Z wait.go:53: [调试] 开始等待 2 超时时间为 2m0s 的资源 2021-04-19T07:24:14.7398121Z wait.go:206: [debug] 服务没有负载均衡器入口 IP 地址:demospace/userapi 2021-04-19T07:24:14.7398987Z wait.go:225: [调试] 部署未准备好:演示空间/userapi。 0 出 2 预期的 pod 已准备就绪 2021-04-19T07:24:14.7441027Z 错误:超时 等待条件 2021-04-19T07:24:14.7441419Z helm.go:81: [debug] 等待条件超时 2021-04-19T07:24:14.7468168Z ##[error]history.go:53: [debug] 获取 发布 userapi 的历史记录
我该如何解决?我尝试了几种方法,但没有找到解决方案
【问题讨论】:
标签: kubernetes kubernetes-helm azure-aks