Welcome to the new 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

  • serewiczserewicz Posts: 575

    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,

  • chiateleungchiateleung Posts: 8

    Oh thank you so much!

Sign In or Register to comment.