Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm deployment failed with error "unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "v1"" #10

Open
erezbatish opened this issue Apr 6, 2022 · 1 comment

Comments

@erezbatish
Copy link

erezbatish commented Apr 6, 2022

Hi
In step unit 10 Create the deployment pipeline

When running the workflow build-latest.yaml

I'm getting the following error on Run Helm Deploy step:

Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "v1"
Error: Process completed with exit code 1.

This is how my workflow looks like:

__name: Build and push the latest build to staging

on:
push:
branches: [ main ]

jobs:
build_push_image:
runs-on: ubuntu-latest

steps:
  - uses: actions/checkout@v2

  - name: Build and push staging image
    uses: docker/[email protected]
    with:
      username: ${{ secrets.ACR_LOGIN }}
      password: ${{ secrets.ACR_PASSWORD }}
      registry: ${{ secrets.ACR_NAME }}
      repository: contoso-website
      tags: latest

_deploy:
runs-on: ubuntu-latest
needs: build_push_image

steps:
  - uses: actions/checkout@v2

  - name: Install Helm
    uses: Azure/setup-helm@v1
    with:
      version: v3.3.1

  - name: Get AKS Credentials
    uses: Azure/aks-set-context@v1
    with:
      creds: ${{ secrets.AZURE_CREDENTIALS }}
      resource-group: mslearn-gh-pipelines-8235
      cluster-name: contoso-video
  - name: Run Helm Deploy
    run: |
      helm upgrade \
        --install \
        --create-namespace \
        --atomic \
        --wait \
        --namespace staging \
        contoso-website \
        ./kubernetes/contoso-website \
        --set image.repository=${{ secrets.ACR_NAME }} \
        --set dns.name=${{ secrets.DNS_NAME }}__

Please advise_

@erezbatish
Copy link
Author

erezbatish commented Apr 6, 2022

It seems like the Ingress.yaml manifest is in old version format and need to be updated to the current Ingress version.
This is the current ingress.yaml manifest:

apiVersion: v1
kind: Ingress
metadata:
  name: contoso-website
  namespace: {{ default "staging" .Release.Namespace }}
  annotations:
    kubernetes.io/ingress.class: addon-http-application-routing
spec:
  rules:
    - host: contoso.!DNS!
      http:
        paths:
          - backend:
              serviceName: contoso-website
              servicePort: http
            path: /

Any advise on how to re-write it and update it to recent versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant