Welcome to the Linux Foundation Forum!

Lab 5.1 - curl XPOST has error of "the server does not allow this method on the requested resource"

Hi I can run the "curl --cert ./client.pem --key ./client-key.pem -cacert ./ca.pem https://:6443/api/v1/pods" GET command, but not the XPOST command, it shows a 405 error code with "the server does not allow this method on the requested resource", how can I solve the problem? Thanks!



Comments

  • Posts: 1,000

    Hello,
    It looks like you are missing part of the path to the resource. If you look closer at the step it should be https://k8smaster:6443/api/v1/namespaces/default/pods. You are reusing the URL from when you first looks at the API. You would put the pod into a particular namespace.
    Regards,

  • Oh thank you so much!

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