Welcome to the Linux Foundation Forum!

Lab 4.2 step 10

Options

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

  • suricata
    suricata Posts: 1
    edited September 2023 Answer ✓
    Options

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


        resources:
          limits:
            cpu: "1"
            memory: "4Gi"
          requests:
            cpu: "0.5"
            memory: "500Mi"
        args:
        - -cpus
        - "2"
        - -mem-total
        - "950Mi"
        - -mem-alloc-size
        - "100Mi"
        - -mem-alloc-sleep
        - "1s"
    

Answers

  • ckeumo
    ckeumo Posts: 2
    Options

    I fixed the problem. My indentation was not correct.

Categories

Upcoming Training