PKS cluster creation fails with unquoted '\' must be followed in the kube-apiserver logs
book
Article ID: 298553
calendar_today
Updated On:
Products
VMware Tanzu Kubernetes Grid Integrated Edition
Issue/Introduction
Symptoms:
After pks create-cluster <cluster-name> has failed use pks cluster <cluster-name> to identify the bosh task.
Bosh task fails with the error below
3365 error Tue Jun 19 17:40:14 UTC 2018 Tue Jun 19 17:48:43 UTC 2018 pivotal-container-service-1105d4b4ca6f4f2955bd service-instance_b866a8ec-be25-48b8-8c45-53ef0218113f create deployment 'master/9e47e96e-7e84-45cc-8db0-4e2830d054b2 (0)' is not running after update. Review logs for failed jobs: kube-apiserver
bosh ssh in to the Kubernetes master vm and below error can be seen under /var/vcap/sys/log/kube-apiserver/kube-apiserver.stderr.log
I0611 16:23:10.081483 15839 cloudprovider.go:59] --external-hostname was not specified. Trying to get it from the cloud provider. error setting the external host value: "vsphere" cloud provider could not be initialized: could not init cloud provider "vsphere": 3:6: unquoted '\' must be followed by new line
Environment
Cause
PKS currently only supports User Principal Name (UPN) format. The above error occurs when username under bosh director and PKS tile are in the backslash format i.e domain\username. The username in backslash format passes the tile's validation but causes failure later during cluster creation.
Resolution
Change the username under bosh director tile and PKS tile to UPN format, <username>@<domain>. Example - [email protected].