[英]AKS Azure DevOps Build Agent
I'm trying to build a Azure DevOps Linux Build Agent in Azure Kubernetes Service.我正在尝试在 Azure Kubernetes 服务中构建 Azure DevOps Linux 构建代理。
I created the yaml file and created the secrets to use inside of the file.我创建了 yaml 文件并创建了要在文件内部使用的机密。
I applied the file and have "CreateContainerConfigError" with my pod in a "waiting" state.我应用了该文件,并使我的 pod 处于“等待”状态,并且“CreateContainerConfigError”。
I run command我运行命令
"kubectl get pod <pod name> -o yaml"
and it states the secret "vsts" could not be found.它指出无法找到秘密“vsts”。
I find this weird because I used "kubectl get secrets" and I see the secrets "vsts-account" and "vsts-token" listed.我觉得这很奇怪,因为我使用了“kubectl get secrets”并且看到了“vsts-account”和“vsts-token”列出的秘密。
You may check your kubernetes configuration, which is supposed to be like below:您可以检查您的 kubernetes 配置,它应该如下所示:
apiVersion: v1
kind: ReplicationController
metadata:
name: vsts-agent
spec:
replicas: 1
template:
metadata:
labels:
app: vsts-agent
version: "0.1"
spec:
containers:
– name: vsts-agent
image: microsoft/vsts-agent:ubuntu-16.04-docker-18.06.1-ce-standard
env:
– name: VSTS_ACCOUNT
valueFrom:
secretKeyRef:
name: vsts
key: VSTS_ACCOUNT
– name: VSTS_TOKEN
valueFrom:
secretKeyRef:
name: vsts
key: VSTS_TOKEN
– name: VSTS_POOL
value: dockerized-vsts-agents
volumeMounts:
– mountPath: /var/run/docker.sock
name: docker-volume
volumes:
– name: docker-volume
hostPath:
path: /var/run/docker.sock
You may follow the blog below to see whether it helps you:您可以关注下面的博客,看看它是否对您有帮助:
https://mohitgoyal.co/2019/01/10/run-azure-devops-private-agents-in-kubernetes-clusters/ https://mohitgoyal.co/2019/01/10/run-azure-devops-private-agents-in-kubernetes-clusters/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.