Welcome to the Linux Foundation Forum!

Issues with completing Lab 1-C

Running Ubuntu version 18.04, Kubernetes version 1.17

When I go to the part of running the "kubectl apply -f fluent/fluentd-ds.yaml" command. I get an error.

See screenshot for the config and error message.

Note that I have changed the apiVersion: "extensions/v1beta1" to "apiVersion: apps/v1" as well since it was also producing an error.

Need help since I am stuck on this.... Thanks.

Comments

  • edited March 2020

    Hi Joel,

    From what I can see, the volumes array under the Daemonset is nested under the container entry. You'll need to correct the spacing and move it back so the volumes array and its nested entries are in line with containers

    Here is a correct spec for your spacing (make sure you create the fluentd-config configmap before applying it):

    1. apiVersion: apps/v1
    2. kind: DaemonSet
    3. metadata:
    4. name: fluentd-ds
    5. labels:
    6. k8s-app: fluentd-logging
    7. version: v1
    8. spec:
    9. selector:
    10. matchLabels:
    11. k8s-app: fluentd-logging
    12. template:
    13. metadata:
    14. labels:
    15. k8s-app: fluentd-logging
    16. version: v1
    17. spec:
    18. tolerations:
    19. - key: node-role.kubernetes.io/master
    20. effect: NoSchedule
    21. terminationGracePeriodSeconds: 30
    22. containers:
    23. - name: fluentd-ds
    24. image: fluent/fluentd:latest
    25. resources:
    26. limits:
    27. memory: 200Mi
    28. env:
    29. - name: FLUENTD_CONF
    30. value: "fluentd-kube.conf"
    31. volumeMounts:
    32. - name: fluentd-conf
    33. mountPath: /fluentd/etc
    34. volumes:
    35. - name: fluentd-conf
    36. configMap:
    37. name: fluentd-config

    Other corrections/changes include:

    • Changed the apiGroup is set to apps/v1
    • Added the following block to the spec:
    1. selector:
    2. matchLabels:
    3. k8s-app: fluentd-logging
    • Changed to the fluent/fluentd:latest image. fluent/fluentd:stable is no longer being updated.

    Thank you for the report!

  • Hi Christian,

    It worked! Thanks! Was able to complete my module.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training