昨天,当 Helm 升级在 Azure DevOps 中的发布管道上运行时,我停止了 Helm 升级,并且以下部署失败。
\n我试图查看失败的图表,目的是删除它,但微服务(“auth”)的图表没有出现。我使用命令 \xc2\xabhelm list -n [namespace_of_AKS]\xc2\xbb 但它没有出现。
\n我可以做什么来解决这个问题?
\nAzure 发布管道中出现错误
\n2022-03-24T08:01:39.2649230Z Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress\n2022-03-24T08:01:39.2701686Z ##[error]Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress\nRun Code Online (Sandbox Code Playgroud)\n\n kubernetes azure-devops azure-pipelines kubernetes-helm azure-aks
我在Azure中创建了一个托管的Kubernetes集群,但它仅用于学习目的,因此我只想在我实际使用它时为计算付费.
有没有一种简单的方法可以优雅地关闭和启动VM,可用性集和负载平衡器?
我尝试使用卸载 AKS 集群中的 helm 版本,helm uninstall RELEASE_NAME但似乎失败了。发生故障的原因是,由于某种原因,当我使用 时,集群中的所有节点都处于未就绪状态helm uninstall。
从那时起,我让所有节点都恢复并运行,并且集群正常运行。现在,当我尝试时helm list,我不会再看到此版本,但执行 ahelm list -a会显示该版本的状态仍处于uninstalling状态。我已经尝试了很多方法,但在过去的 3-4 天里它一直卡在那里。
我尝试过使用helm uninstall RELEASE_NAME,helm delete --purge RELEASE_NAME但这些命令会抛出错误,因为版本已经处于uninstalling状态。我尝试修改此特定版本的集群中的 Helm Secret,但这也没有帮助。Helm3正在使用,所以我不能重新启动舵柄吊舱来稳定这个问题。
是否Helm3使用某种可以修改的终结器机制来纠正此问题,或者是否没有其他方法可以尝试删除此版本?我希望将来也对特定 API 使用相同的版本名称。
任何帮助将不胜感激。
如何使用kubectl获取没有任何标签的K8S节点?另外,如何获取没有任何标签的 K8S Pod?
kubernetes google-kubernetes-engine kubectl kubernetes-pod azure-aks
我正在尝试将文件从Kubernetes Pods复制到我的本地系统。运行以下命令时出现以下错误:
kubectl cp aks-ssh2-6cd4948f6f-fp9tl:/home/azureuser/test.cap ./test.cap
Run Code Online (Sandbox Code Playgroud)
输出:
tar:home / azureuser / test:无法统计:没有这样的文件或目录tar:由于先前的错误而以失败状态退出错误:home / azureuser / test没有这样的文件或目录
我可以在上面给定的路径下看到文件。我真的很困惑。
你能帮我吗?
当一个请求需要超过 60 秒来响应时,入口控制器似乎会反弹
从我可以看到我们的 NGINX 入口控制器在处理一个请求超过 60 秒后返回 504 给客户端。我可以从 NGINX 日志中看到这一点:
2019/01/25 09:54:15 [error] 2878#2878: *4031130 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.244.0.1, server: myapplication.com, request: "POST /api/text HTTP/1.1", upstream: "http://10.244.0.39:45606/api/text", host: "myapplication.com"
10.244.0.1 - [10.244.0.1] - - [25/Jan/2019:09:54:15 +0000] "POST /api/text HTTP/1.1" 504 167 "-" "PostmanRuntime/7.1.6" 2940 60.002 [default-myapplication-service-80] 10.244.0.39:45606 0 60.000 504 bdc1e0571e34bf1223e6ed4f7c60e19d
Run Code Online (Sandbox Code Playgroud)
第二个日志项显示上游响应时间和请求时间均为 60 秒(请参阅此处的 NGINX 日志格式)
但是我在入口配置中将所有超时值指定为 3 分钟:
apiVersion: extensions/v1beta1 …Run Code Online (Sandbox Code Playgroud) 我是新的 AKS、ACR 和 DevOps 管道,我正在尝试设置 CI/CD 管道。
我有一个资源组设置,其中包含 AKS 和 ACR。AKS 正在使用Standard_B2s并且此时只有一个节点,因为我只是在玩。
图像在提交给 master 时自动部署到 ACR——还没有想出如何设置测试——但是在部署到 AKS 时,我只是不断得到:
##[error]error: deployment "client-deployment" exceeded its progress deadline
Run Code Online (Sandbox Code Playgroud)
我已经改变了我client.yaml对包括progressDeadlineSeconds像一个小时为10,15和20分钟没有工作:
apiVersion: apps/v1
kind: Deployment
metadata:
name: client-deployment
spec:
progressDeadlineSeconds: 3600
replicas: 1
selector:
matchLabels:
component: client
template:
metadata:
labels:
component: client
spec:
containers:
- name: client
image: testappcontainers.azurecr.io/testapp-client
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: client-cluster-ip-service
spec:
type: ClusterIP
selector:
component: client
ports:
- …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建和安装卷,但卡住了。
这部分创建存储:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvclaim2
spec:
accessModes:
- ReadWriteOnce
storageClassName: managed-premium
resources:
requests:
storage: 5Gi
Run Code Online (Sandbox Code Playgroud)
以下是我的部署部分的延续:
volumeMounts:
- name: config
mountPath: /config
readOnly: true
args:
- --configfile=/config/traefik.toml
volumes:
- name: config
persistentVolumeClaim:
claimName: pvclaim2
configMap:
name: traefik-config
Run Code Online (Sandbox Code Playgroud)
我不断收到以下错误消息:
部署“traefik-ingress-controller”无效:spec.template.spec.containers[0].volumeMounts[0].name:未找到:“config”
任何帮助表示赞赏。
更新:
Output from describe pv:
Conditions:
Type Status
PodScheduled False
Volumes:
certs:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: pvclaim101
ReadOnly: false
config:
Type: ConfigMap (a volume populated by a ConfigMap) …Run Code Online (Sandbox Code Playgroud) 我正在努力在 kubernetes 中部署 docker 镜像。第一次部署容器时,我使用了:
kubectl apply -f <deployment_file>.yaml
Run Code Online (Sandbox Code Playgroud)
并且容器已成功部署在 Pod 中。
另外,deployment_file 看起来像这样:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: publisher
spec:
replicas: 2
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
minReadySeconds: 300
progressDeadlineSeconds: 900
template:
metadata:
labels:
app: publisher
spec:
containers:
- name: publisher
image: 123dev.azurecr.io/publisher:{{ci-build-number}}
env:
- name: ENVIRONMENT
value: "dev"
ports:
- containerPort: 8080
Run Code Online (Sandbox Code Playgroud)
我在上面的 yaml 文件中定义了“progressDeadlineSeconds”属性。
为了跟踪部署,我使用了:
kubectl rollout status deployment.v1beta1.apps/publisher
Run Code Online (Sandbox Code Playgroud)
现在,如果我想用新映像更新容器,我可以再次重用该命令
kubectl apply -f <deployment_file>.yaml
Run Code Online (Sandbox Code Playgroud)
应用更新。
但是,如果由于某种原因应用更新失败(假设 docker 映像已损坏),有没有办法在 pod 状态未设置为“正在运行”或执行时间超过时自动触发回滚到之前的版本? 'pregressDeadlineSeconds'?
到目前为止我还没有找到自动执行回滚的方法。想法将不胜感激。
我正在使用terraform在azure中预配置一些资源,但似乎无法掌控安装nginx-ingress,因为它等待状态超时
helm_release.nginx_ingress:发生1个错误:
helm_release.nginx_ingress:rpc错误:代码=未知desc =发布nginx-ingress失败:等待条件超时
面对错误,Terraform不会自动回滚。相反,您的Terraform状态文件已使用成功完成的所有资源进行了部分更新。请解决以上错误,然后再次应用以逐步更改您的基础架构。主文件
data "azurerm_public_ip" "nginx_ingress" {
name = "xxxx-public-ip"
resource_group_name = "xxxx-public-ip"
}
resource "azurerm_resource_group" "xxxx_RG" {
name = "${var.name_prefix}"
location = "${var.location}"
}
resource "azurerm_kubernetes_cluster" "k8s" {
name = "${var.name_prefix}-aks"
kubernetes_version = "${var.kubernetes_version}"
location = "${azurerm_resource_group.xxxx_RG.location}"
resource_group_name = "${azurerm_resource_group.xxxx_RG.name}"
dns_prefix = "AKS-${var.dns_prefix}"
agent_pool_profile {
name = "${var.node_pool_name}"
count = "${var.node_pool_size}"
vm_size = "${var.node_pool_vmsize}"
os_type = "${var.node_pool_os}"
os_disk_size_gb = 30
}
service_principal {
client_id = "${var.client_id}"
client_secret = "${var.client_secret}"
}
tags = {
environment = "${var.env_tag}"
} …Run Code Online (Sandbox Code Playgroud) terraform kubernetes-helm terraform-provider-azure azure-aks nginx-ingress
azure-aks ×10
kubernetes ×9
azure ×1
azure-devops ×1
docker ×1
helm3 ×1
kubectl ×1
terraform ×1