puppetlabs / puppetlabs-kubernetes

This module install and configures a Kubernetes cluster
Apache License 2.0
92 stars 135 forks source link

parameter 'XXXX' expects a String value, got Undef #345

Closed olevole closed 5 years ago

olevole commented 5 years ago

I try to use a simple configuration:

  class {'kubernetes':
    controller => true,
  }

got:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Kubernetes]:
  parameter 'etcd_ca_key' expects a String value, got Undef
  parameter 'etcd_ca_crt' expects a String value, got Undef
  parameter 'etcdclient_key' expects a String value, got Undef
  parameter 'etcdclient_crt' expects a String value, got Undef
  parameter 'api_server_count' expects an Integer value, got Undef
  parameter 'kubernetes_ca_crt' expects a String value, got Undef
  parameter 'kubernetes_ca_key' expects a String value, got Undef
  parameter 'kubernetes_front_proxy_ca_crt' expects a String value, got Undef
  parameter 'kubernetes_front_proxy_ca_key' expects a String value, got Undef
  parameter 'token' expects a String value, got Undef
  parameter 'discovery_token_hash' expects a String value, got Undef
  parameter 'sa_pub' expects a String value, got Undef
  parameter 'sa_key' expects a String value, got Undef (file: /etc/puppetlabs/code/environments/production/modules/k8smaster_node/manifests/init.pp, line: 16, column: 3) on node k8smaster1.fbs.com

Expected Behavior

Expected k8s controller

Steps to Reproduce

Steps to reproduce the behavior:

  1. Install clean CentOS ( CentOS Linux release 7.7.1908 (Core) )
  2. Install kubernetes/docker puppet module
  3. Add to manifest:
class { 'docker':
    dns => '8.8.8.8',
    ip_forward      => true,
    iptables        => true,
    ip_masq         => true,
}
class {'kubernetes':
    controller => true,
}
  1. apply config (puppet apply, puppet agent -t)

Environment

carabasdaniel commented 5 years ago

Hi @olevole, to use the puppetlabs-kubernetes module those parameters need to be provided in the configuration. You can use the kubetool docker image to generate a basic configuration if you want to test it out.

olevole commented 5 years ago

Thz!