Kubermatic seed deploy issues

Hi all, I’m working rn with kubermatic-ce, and have some issue, which i don’t understand how to solve:
So i’m deploying everything until seed manifest, everything is working, but when i’m trying to apply seed manifest it shows error above:

Error from server: error when creating “seed.example.yaml”: admission webhook “seeds.kubermatic.io” denied the request: failed to get client for seed “kubermatic”: failed to load kubeconfig: couldn’t get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string “json:“apiVersion,omitempty””; Kind string “json:“kind,omitempty”” }

encode kubeconfig doing by: echo kubeconfig | base64.

seed.yaml:

apiVersion: v1
kind: Secret
metadata:
name: kubeconfig-us-east-1
namespace: kubermatic
type: Opaque
data:
kubeconfig:

apiVersion: kubermatic.k8s.io/v1
kind: Seed
metadata:
name: kubermatic
namespace: kubermatic
spec:

these two fields are only informational

country: DE
location: EU (Frankfurt)

List of datacenters where this seed cluster is allowed to create clusters in

In this example, user cluster will be deployed in eu-central-1 on AWS.

datacenters:
aws-us-east-1a:
country: US
location: N.Virginia
spec:
aws:
images: null
region: us-east-1
enforceAuditLogging: false
enforcePodSecurityPolicy: false

reference to the kubeconfig to use when connecting to this seed cluster

kubeconfig:
name: kubeconfig-us-east-1
namespace: kubermatic

Could you help me please?

Thanks!

Hi there,

it looks like your code samples got a big mangled when posting them here. Can you paste your (anonymized, of course) Seed and kubeconfig Secret somewhere?

Hi @alcatana,

You said you used this command:

echo kubeconfig | base64

Note that GNU base64 by default introduces newlines that should not be copied into the manifest in order not to break the YAML file.

You could do the following:

or if you are using GNU base64:

cat ${KUBECONFIG} | base64 -w 0