Kubectl errors are generated while trying to interact with PKS clusters
search cancel

Kubectl errors are generated while trying to interact with PKS clusters

book

Article ID: 316776

calendar_today

Updated On:

Products

VMware Cloud PKS

Issue/Introduction

Symptoms:
  • kubetcl get nodes fails with error similar to the following
error: the server doesn't have a resource type "nodes"
  • kubectl version fails with error similar to the following:

    Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.4", GitCommit:"f49fa022dbe63faafd0da106ef7e05a29721d3f1", GitTreeState:"clean", BuildDate:"2018-12-14T07:10:00Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
    error: You must be logged in to the server (the server has asked for the client to provide credentials)
  • kubectl clusterinfo fails with error similar to the following:

    error: the server doesn't have a resource type "services"


Environment

VMware PKS 1.x

Resolution

This issue can occur when an incorrect  hostname is supplied in the PKS certificate. Re-generating the PKS api certificate with correct name and apply changes on the PKS tile will resolve the issue.