Defined Type: k8s::kubeconfig

Defined in:
modules/k8s/manifests/kubeconfig.pp

Overview

Parameters:

  • master_host (String)
  • username (String)
  • token (String)
  • namespace (Optional[String]) (defaults to: undef)
  • mode (Stdlib::Filemode) (defaults to: '0400')
  • owner (String) (defaults to: 'root')
  • group (String) (defaults to: 'root')


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'modules/k8s/manifests/kubeconfig.pp', line 1

define k8s::kubeconfig(
    String $master_host,
    String $username,
    String $token,
    Optional[String] $namespace=undef,
    Stdlib::Filemode $mode='0400',
    String $owner='root',
    String $group='root',
) {
    file { $title:
        ensure  => present,
        content => template('k8s/kubeconfig-client.yaml.erb'),
        owner   => $owner,
        group   => $group,
        mode    => $mode,
        require => File['/etc/kubernetes'],
    }
}