Welcome to the Linux Foundation Forum!

Lab 6 : Sequencing Application Deployments problem

Options
adrien6910
adrien6910 Posts: 10
edited May 2023 in LFS269 Class Forum

Hello,

I have a problem in the Lab 6. Continuous Deployment with Flux CD --> Sequencing Application Deployments

After doing the actions: **redis-dev **is not pushed to Kubernetes and i have the issues below.

failed to decode Kubernetes YAML from /tmp/kustomization-1240084352/clusters/dev/redis-kustomization.yaml: missing Resource metadata

I checked several times if I had not made a mistake, I did not find any.

My repository :
https://github.com/ADRH10/instavote
https://github.com/ADRH10/flux-infra

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.1", GitCommit:"4c9411232e10168d7b050c49a1b59f6df9d7ea4b", GitTreeState:"clean", BuildDate:"2023-04-14T13:21:19Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.3", GitCommit:"9e644106593f3f4aa98f8a84b23db5fa378900bd", GitTreeState:"clean", BuildDate:"2023-03-30T06:34:50Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}

$ flux version
flux: v2.0.0-rc.1
kustomize-controller: v1.0.0-rc.1
source-controller: v1.0.0-rc.1

$ kustomize version
v5.0.1

$ kind version
kind v0.18.0 go1.20.2 linux/amd64

Can you help me plz ?
Adrien,

Comments

  • marciocastelobranco3
    edited May 2023
    Options

    Hello Adriel, I got success by placing the heath
    clusters/dev/vote-dev-kustomization.yaml


    apiVersion: kustomize.toolkit.fluxcd.io/v1
    kind: Kustomization
    metadata:
    annotations:
    reconcile.fluxcd.io/requestedAt: "2023-05-20T14:28:33.135788098Z"
    name: vote-dev
    namespace: flux-system
    spec:
    healthChecks:
    - kind: Deployment
    name: vote
    namespace: instavote
    interval: 1m0s
    path: ./deploy/vote
    prune: true
    sourceRef:
    kind: GitRepository
    name: instavote
    targetNamespace: instavote
    timeout: 2m0s

  • marciocastelobranco3
    edited May 2023
    Options

    try removing the validation flag

    Flag --validation has been deprecated, this arg is no longer used, all resources are validated using server-side apply dry-run

    flux create kustomization redis-dev \
    --source=instavote \
    --path="./deploy/redis" \
    --prune=true \
    --interval=1m \
    --target-namespace=instavote \
    --health-check="Deployment/redis.instavote" \
    --export > redis-dev-kustomization.yaml

    flux create kustomization vote-dev \
    --source=instavote \
    --path="./deploy/vote" \
    --prune=true \
    --interval=1m \
    --target-namespace=instavote \
    --health-check="Deployment/vote.instavote" \
    --depends-on=redis-dev \
    --export > vote-dev-kustomization.yaml

  • luisviveropena
    luisviveropena Posts: 1,154
    Options

    Hi @adrien6910,

    I tried the lab and I didn't get the same issue than you. Perhaps it's because I'm trying with the updated version of the PDF labs, and this lab was updated on June 6.

    We are checking on this lab anyway.

    Regards,
    Luis.

  • adrien6910
    adrien6910 Posts: 10
    Options

    Hi,

    After passing the CKA and CKAD certifications. I took the training again and reproduced the same problem, I understood why: it was due to the flux bootstrap github ... command being incomplete due to an incomplete 1st copy-paste. After uninstalling flux then reinstalling and using the complete flux bootstrap github ... command, the problem was solved.

    Thank you for your help.
    Adrien.

  • luisviveropena
    luisviveropena Posts: 1,154
    Options

    Hi @adrien6910, so it wasn't related to the flux installation, but to copy paste operation.

    I'm glad it worked!

    Regards,
    Luis.

  • vjunior1981
    vjunior1981 Posts: 2
    edited August 2023
    Options

    @luisviveropena said:
    Hi @adrien6910,

    I tried the lab and I didn't get the same issue than you. Perhaps it's because I'm trying with the updated version of the PDF labs, and this lab was updated on June 6.

    We are checking on this lab anyway.

    Regards,
    Luis.

    Where can I get the updated version of the pdf files?

    Edit: Nevermind, just downloaded again and got the updated version :)

  • luisviveropena
    Options

    Hi @vjunior1981 ,

    That's good :)
    Just be sure you cleared the cache in the browser.

    Please let me know if the lab worked for you.

    Regards,
    Luis.

Categories

Upcoming Training