Skip to content
Snippets Groups Projects
vars.md 6.80 KiB

Configurable Parameters in Kubespray

Generic Ansible variables

You can view facts gathered by Ansible automatically here.

Some variables of note include:

  • ansible_user: user to connect to via SSH
  • ansible_default_ipv4.address: IP address Ansible automatically chooses. Generated based on the output from the command ip -4 route get 8.8.8.8

Common vars that are used in Kubespray

  • calico_version - Specify version of Calico to use
  • calico_cni_version - Specify version of Calico CNI plugin to use
  • docker_version - Specify version of Docker to used (should be quoted string)
  • etcd_version - Specify version of ETCD to use
  • ipip - Enables Calico ipip encapsulation by default
  • hyperkube_image_repo - Specify the Docker repository where Hyperkube resides
  • hyperkube_image_tag - Specify the Docker tag where Hyperkube resides
  • kube_network_plugin - Sets k8s network plugin (default Calico)
  • kube_proxy_mode - Changes k8s proxy mode to iptables mode
  • kube_version - Specify a given Kubernetes hyperkube version
  • searchdomains - Array of DNS domains to search when looking up hostnames
  • nameservers - Array of nameservers to use for DNS lookup

Addressing variables

  • ip - IP to use for binding services (host var)
  • access_ip - IP for other hosts to use to connect to. Often required when deploying from a cloud, such as OpenStack or GCE and you have separate public/floating and private IPs.
  • ansible_default_ipv4.address - Not Kubespray-specific, but it is used if ip and access_ip are undefined
  • loadbalancer_apiserver - If defined, all hosts will connect to this address instead of localhost for kube-masters and kube-master[0] for kube-nodes. See more details in the HA guide.
  • loadbalancer_apiserver_localhost - makes all hosts to connect to the apiserver internally load balanced endpoint. Mutual exclusive to the loadbalancer_apiserver. See more details in the HA guide.

Cluster variables