RKE1 Example YAML

Below is an example RKE template configuration file for reference.

The YAML in the RKE template uses the same customization that is used when you create an RKE cluster. However, since the YAML is within the context of a Rancher provisioned RKE cluster, the customization from the RKE docs needs to be nested under the rancher_kubernetes_engine directive.

  1. #
  2. # Cluster Config
  3. #
  4. docker_root_dir: /var/lib/docker
  5. enable_cluster_alerting: false
  6. # This setting is not enforced. Clusters
  7. # created with this sample template
  8. # would have alerting turned off by default,
  9. # but end users could still turn alerting
  10. # on or off.
  11. enable_cluster_monitoring: true
  12. # This setting is not enforced. Clusters
  13. # created with this sample template
  14. # would have monitoring turned on
  15. # by default, but end users could still
  16. # turn monitoring on or off.
  17. enable_network_policy: false
  18. local_cluster_auth_endpoint:
  19. enabled: true
  20. #
  21. # Rancher Config
  22. #
  23. rancher_kubernetes_engine_config: # Your RKE template config goes here.
  24. addon_job_timeout: 30
  25. authentication:
  26. strategy: x509
  27. ignore_docker_version: true
  28. #
  29. # # Currently only nginx ingress provider is supported.
  30. # # To disable ingress controller, set `provider: none`
  31. # # To enable ingress on specific nodes, use the node_selector, eg:
  32. # provider: nginx
  33. # node_selector:
  34. # app: ingress
  35. #
  36. ingress:
  37. provider: nginx
  38. kubernetes_version: v1.15.3-rancher3-1
  39. monitoring:
  40. provider: metrics-server
  41. #
  42. # If you are using calico on AWS
  43. #
  44. # network:
  45. # plugin: calico
  46. # calico_network_provider:
  47. # cloud_provider: aws
  48. #
  49. # # To specify flannel interface
  50. #
  51. # network:
  52. # plugin: flannel
  53. # flannel_network_provider:
  54. # iface: eth1
  55. #
  56. # # To specify flannel interface for canal plugin
  57. #
  58. # network:
  59. # plugin: canal
  60. # canal_network_provider:
  61. # iface: eth1
  62. #
  63. network:
  64. options:
  65. flannel_backend_type: vxlan
  66. plugin: canal
  67. #
  68. # services:
  69. # kube-api:
  70. # service_cluster_ip_range: 10.43.0.0/16
  71. # kube-controller:
  72. # cluster_cidr: 10.42.0.0/16
  73. # service_cluster_ip_range: 10.43.0.0/16
  74. # kubelet:
  75. # cluster_domain: cluster.local
  76. # cluster_dns_server: 10.43.0.10
  77. #
  78. services:
  79. etcd:
  80. backup_config:
  81. enabled: true
  82. interval_hours: 12
  83. retention: 6
  84. safe_timestamp: false
  85. creation: 12h
  86. extra_args:
  87. election-timeout: 5000
  88. heartbeat-interval: 500
  89. gid: 0
  90. retention: 72h
  91. snapshot: false
  92. uid: 0
  93. kube_api:
  94. always_pull_images: false
  95. pod_security_policy: false
  96. service_node_port_range: 30000-32767
  97. ssh_agent_auth: false
  98. windows_prefered_cluster: false