vmware-tanzu / community-edition

VMware Tanzu Community Edition is no longer an actively maintained project. Code is available for historical purposes only.
https://tanzucommunityedition.io/
Apache License 2.0
1.34k stars 308 forks source link

base64.decode: illegal base64 data at input byte 0 Error: unable to set up management cluster #4036

Closed snehalbiche closed 1 year ago

snehalbiche commented 2 years ago

Bug Report

tanzu@tkgbootstrap:~$ tanzu management-cluster create tanzumgmt --file tkg-mgmt-cluster.yaml -v 6 compatibility file (/home/tanzu/.config/tanzu/tkg/compatibility/tkg-compatibility.yaml) already exists, skipping download BOM files inside /home/cisco/.config/tanzu/tkg/bom already exists, skipping download CEIP Opt-in status: false

Validating the pre-requisites... Identity Provider not configured. Some authentication features won't work. WARNING: key is not a string: %!s(int=1)WARNING: key is not a string: %!s(int=1)Checking if VSPHERE_CONTROL_PLANE_ENDPOINT 10.14.7.200 is already in use

Setting up management cluster... Validating configuration... Using infrastructure provider vsphere:v1.0.2 Generating cluster configuration... WARNING: key is not a string: %!s(int=1)WARNING: key is not a string: %!s(int=1)Error: unable to set up management cluster: unable to build management cluster configuration: unable to get template:

Expected Behavior

Tanzu management cluster deployed scussessfully

Steps to Reproduce the Bug

  1. configure harbor
  2. install tanzu cli version v0.11.2
  3. add below parameters to config file

TKG_CUSTOM_IMAGE_REPOSITORY: tkgbootstrap.tanzu.lab/tkg TKG_CUSTOM_IMAGE_REPOSITORY_SKIP_TLS_VERIFY: "False" TKG_CUSTOM_IMAGE_REPOSITORY_CA_CERTIFICATE: ""

  1. run command tanzu management-cluster create tanzumgmt --file tkg-mgmt-cluster.yaml -v 6

need help to identify issues with the certificate, the same certificate worked to copy images to the harbor registry.

Screenshots or additional information and context

Environment Details

Diagnostics and log bundle

stmcginnis commented 2 years ago

The WARNING: key is not a string: %!s(int=1)WARNING: key is not a string: %!s(int=1) message is a harmless error and can be ignored. That has been fixed but not made it into a release yet.

The base64.decode: illegal base64 data at input byte 0 looks to be the cause of the failure. Did you modify any of the ytt overlay files? It looks like there is something in there that isn't properly formatted.

stmcginnis commented 2 years ago

Though this earlier message also looks concerning: VSPHERE_CONTROL_PLANE_ENDPOINT 10.14.7.200 is already in use

stmcginnis commented 2 years ago

Could you also provide the content of tkg-mgmt-cluster.yaml, redacting anything sensitive.

snehalbiche commented 2 years ago

Images missing in publish images script added manually.

imgpkg copy -i projects.registry.vmware.com/tkg/cert-manager-controller:v1.5.3_vmware.2 --to-repo tkgbootstrap.tanzu.lab/tkg/cert-manager-controller imgpkg copy -i projects.registry.vmware.com/tkg/cert-manager-cainjector:v1.5.3_vmware.2 --to-repo tkgbootstrap.tanzu.lab/tkg/cert-manager-cainjector imgpkg copy -i projects.registry.vmware.com/tkg/cert-manager-webhook:v1.5.3_vmware.2 --to-repo tkgbootstrap.tanzu.lab/tkg/cert-manager-webhook imgpkg copy -i projects.registry.vmware.com/tkg/cluster-api/kubeadm-bootstrap-controller:v1.0.1_vmware.1 --to-repo tkgbootstrap.tanzu.lab/tkg/cluster-api/kubeadm-bootstrap-controller imgpkg copy -i projects.registry.vmware.com/tkg/cluster-api/kubeadm-control-plane-controller:v1.0.1_vmware.1 --to-repo tkgbootstrap.tanzu.lab/tkg/cluster-api/kubeadm-control-plane-controller imgpkg copy -i projects.registry.vmware.com/tkg/cluster-api/cluster-api-controller:v1.0.1_vmware.1 --to-repo tkgbootstrap.tanzu.lab/tkg/cluster-api/cluster-api-controller imgpkg copy -i projects.registry.vmware.com/tkg/cluster-api/cluster-api-vsphere-controller:v1.0.2_vmware.1 --to-repo tkgbootstrap.tanzu.lab/tkg/cluster-api/cluster-api-vsphere-controller

github-actions[bot] commented 2 years ago

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.