【发布时间】:2022-11-05 23:01:40
【问题描述】:
我在 AKS 中尝试了一些东西。现在我正在尝试通过 Azure DevOps 发布到 AKS。但我怀疑我有 3 个 yaml 文件(ConfigMap、Deployment 和 Secret),我在 deployment.yaml 文件中提到了以下内容
envFrom:
- secretRef:
name: webinar-web-app-secret
- configMapRef:
name: webinar-web-app-configmap
现在我的发布文件看起来像这样。请指导我如何在管道中添加 secret.yaml 文件
trigger:
- master
pool:
vmImage: ubuntu-latest
resources:
- repo: self
stages:
- stage: 'Deployment_AKS_Prod'
displayName: 'Deploy To AKS prod'
jobs:
- deployment: Release
environment: 'test-aks.prod'
displayName: 'Release'
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: Kubernetes@1
displayName: Deploying Manifests into AKS
inputs:
connectionType: 'Azure Resource Manager'
azureSubscriptionEndpoint: 'aks'
azureResourceGroup: 'test-rg'
kubernetesCluster: 'test-aks'
namespace: 'prod'
command: 'apply'
useConfigurationFile: true
configuration: '$(Build.SourcesDirectory)/deployment/webinar-app.yaml'
secretType: 'dockerRegistry'
containerRegistryType: 'Azure Container Registry'
useConfigMapFile: true
configMapFile: '$(Build.SourcesDirectory)/deployment/configmap.yaml'
【问题讨论】:
标签: azure kubernetes azure-devops azure-aks azure-pipelines-yaml