Welcome to the Linux Foundation Forum!

Lab 4.2 step 10

Hi,
I keep having the following error message when I run the command kubectl create -f hog.yaml to recreate the hog deployment:

Error from server (BadRequest): error when creating "hog.yaml": Deployment in version "v1" cannot be handled as a Deployment: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP][-+]?[0-9])$'

Can someone help with this?

Thank you

Best Answer

  • Posts: 1
    edited September 2023 Answer ✓

    The document's identation can be confusing. Here is the correct one for someone who stumbles upon this problem:


    1. resources:
    2. limits:
    3. cpu: "1"
    4. memory: "4Gi"
    5. requests:
    6. cpu: "0.5"
    7. memory: "500Mi"
    8. args:
    9. - -cpus
    10. - "2"
    11. - -mem-total
    12. - "950Mi"
    13. - -mem-alloc-size
    14. - "100Mi"
    15. - -mem-alloc-sleep
    16. - "1s"

Answers

  • Posts: 2

    I fixed the problem. My indentation was not correct.

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