config-default.sh 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #!/bin/bash
  2. # Copyright 2015 The Kubernetes Authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ## Contains configuration values for the Ubuntu cluster
  16. # Define all your cluster nodes, MASTER node comes first"
  17. # And separated with blank space like <user_1@ip_1> <user_2@ip_2> <user_3@ip_3>
  18. export nodes=${nodes:-"vcap@10.10.103.250 vcap@10.10.103.162 vcap@10.10.103.223"}
  19. # Define all your nodes role: a(master) or i(minion) or ai(both master and minion),
  20. # Roles must be the same order with the nodes.
  21. roles=${roles:-"ai i i"}
  22. # If it practically impossible to set an array as an environment variable
  23. # from a script, so assume variable is a string then convert it to an array
  24. export roles_array=($roles)
  25. # Define minion numbers
  26. export NUM_NODES=${NUM_NODES:-3}
  27. # define the IP range used for service cluster IPs.
  28. # according to rfc 1918 ref: https://tools.ietf.org/html/rfc1918 choose a private ip range here.
  29. export SERVICE_CLUSTER_IP_RANGE=${SERVICE_CLUSTER_IP_RANGE:-192.168.3.0/24} # formerly PORTAL_NET
  30. # define the IP range used for flannel overlay network, should not conflict with above SERVICE_CLUSTER_IP_RANGE
  31. # The Ubuntu scripting supports two ways of networking: Flannel and
  32. # CNI. To use CNI: (1) put a CNI configuration file, whose basename
  33. # is the configured network type plus ".conf", somewhere on the driver
  34. # machine (the one running `kube-up.sh`) and set CNI_PLUGIN_CONF to a
  35. # pathname of that file, (2) put one or more executable binaries on
  36. # the driver machine and set CNI_PLUGIN_EXES to a space-separated list
  37. # of their pathnames, and (3) set CNI_KUBELET_TRIGGER to identify an
  38. # appropriate service on which to trigger the start and stop of the
  39. # kubelet on non-master machines. For (1) and (2) the pathnames may
  40. # be relative, in which case they are relative to kubernetes/cluster.
  41. # If either of CNI_PLUGIN_CONF or CNI_PLUGIN_EXES is undefined or has
  42. # a zero length value then Flannel will be used instead of CNI.
  43. export CNI_PLUGIN_CONF CNI_PLUGIN_EXES CNI_KUBELET_TRIGGER
  44. CNI_PLUGIN_CONF=${CNI_PLUGIN_CONF:-""}
  45. CNI_PLUGIN_EXES=${CNI_PLUGIN_EXES:-""}
  46. CNI_KUBELET_TRIGGER=${CNI_KUBELET_TRIGGER:-networking}
  47. # Flannel networking is used if CNI networking is not. The following
  48. # variable defines the CIDR block from which cluster addresses are
  49. # drawn.
  50. export FLANNEL_NET=${FLANNEL_NET:-172.16.0.0/16}
  51. # Optionally add other contents to the Flannel configuration JSON
  52. # object normally stored in etcd as /coreos.com/network/config. Use
  53. # JSON syntax suitable for insertion into a JSON object constructor
  54. # after other field name:value pairs. For example:
  55. # FLANNEL_OTHER_NET_CONFIG=', "SubnetMin": "172.16.10.0", "SubnetMax": "172.16.90.0"'
  56. export FLANNEL_OTHER_NET_CONFIG
  57. FLANNEL_OTHER_NET_CONFIG=''
  58. # Admission Controllers to invoke prior to persisting objects in cluster
  59. # If we included ResourceQuota, we should keep it at the end of the list to prevent incremeting quota usage prematurely.
  60. export ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,ServiceAccount,SecurityContextDeny,DefaultStorageClass,ResourceQuota
  61. # Path to the config file or directory of files of kubelet
  62. export KUBELET_CONFIG=${KUBELET_CONFIG:-""}
  63. # A port range to reserve for services with NodePort visibility
  64. SERVICE_NODE_PORT_RANGE=${SERVICE_NODE_PORT_RANGE:-"30000-32767"}
  65. # Optional: Enable node logging.
  66. ENABLE_NODE_LOGGING=false
  67. LOGGING_DESTINATION=${LOGGING_DESTINATION:-elasticsearch}
  68. # Optional: When set to true, Elasticsearch and Kibana will be setup as part of the cluster bring up.
  69. ENABLE_CLUSTER_LOGGING=false
  70. ELASTICSEARCH_LOGGING_REPLICAS=${ELASTICSEARCH_LOGGING_REPLICAS:-1}
  71. # Optional: When set to true, heapster, Influxdb and Grafana will be setup as part of the cluster bring up.
  72. ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-true}"
  73. # Extra options to set on the Docker command line. This is useful for setting
  74. # --insecure-registry for local registries.
  75. DOCKER_OPTS=${DOCKER_OPTS:-""}
  76. # Extra options to set on the kube-proxy command line. This is useful
  77. # for selecting the iptables proxy-mode, for example.
  78. KUBE_PROXY_EXTRA_OPTS=${KUBE_PROXY_EXTRA_OPTS:-""}
  79. # Optional: Install cluster DNS.
  80. ENABLE_CLUSTER_DNS="${KUBE_ENABLE_CLUSTER_DNS:-true}"
  81. # DNS_SERVER_IP must be a IP in SERVICE_CLUSTER_IP_RANGE
  82. DNS_SERVER_IP=${DNS_SERVER_IP:-"192.168.3.10"}
  83. DNS_DOMAIN=${DNS_DOMAIN:-"cluster.local"}
  84. DNS_REPLICAS=${DNS_REPLICAS:-1}
  85. # Optional: Install Kubernetes UI
  86. ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"
  87. # Optional: Enable setting flags for kube-apiserver to turn on behavior in active-dev
  88. #RUNTIME_CONFIG=""
  89. # Optional: Add http or https proxy when download easy-rsa.
  90. # Add environment variable separated with blank space like "http_proxy=http://10.x.x.x:8080 https_proxy=https://10.x.x.x:8443"
  91. PROXY_SETTING=${PROXY_SETTING:-""}
  92. # Optional: Allows kublet/kube-api to be run in privileged mode
  93. ALLOW_PRIVILEGED=${ALLOW_PRIVILEGED:-"false"}
  94. DEBUG=${DEBUG:-"false"}
  95. # Add SSH_OPTS: Add this to config ssh port
  96. SSH_OPTS="-oPort=22 -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oLogLevel=ERROR"