Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KubeletServiceTempl = template.Must(template.New("kubeletService").Parse( dedent.Dedent(`[Unit] Description=kubelet: The Kubernetes Node Agent Documentation=http://kubernetes.io/docs/ [Service] ExecStart=/usr/local/bin/kubelet Restart=always StartLimitInterval=0 RestartSec=10 [Install] WantedBy=multi-user.target `))) KubeletEnvTempl = template.Must(template.New("kubeletEnv").Parse( dedent.Dedent(`# Note: This dropin only works with kubeadm and kubelet v1.11+ [Service] Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml" # This is a file that "kubeadm init" and "kubeadm join" generate at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env # This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use # the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file. EnvironmentFile=-/etc/default/kubelet ExecStart= ExecStart=/usr/local/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS `))) )
View Source
var KubeadmCfgTempl = template.Must(template.New("kubeadmCfg").Parse( dedent.Dedent(`--- apiVersion: kubeadm.k8s.io/v1beta2 kind: ClusterConfiguration etcd: external: endpoints: {{- range .ExternalEtcd.Endpoints }} - {{ . }} {{- end }} caFile: {{ .ExternalEtcd.CaFile }} certFile: {{ .ExternalEtcd.CertFile }} keyFile: {{ .ExternalEtcd.KeyFile }} dns: type: CoreDNS imageRepository: coredns imageTag: 1.6.0 imageRepository: {{ .ImageRepo }} kubernetesVersion: {{ .Version }} certificatesDir: /etc/kubernetes/pki clusterName: {{ .ClusterName }} controlPlaneEndpoint: {{ .ControlPlaneEndpoint }} networking: dnsDomain: {{ .ClusterName }} podSubnet: {{ .PodSubnet }} serviceSubnet: {{ .ServiceSubnet }} apiServer: extraArgs: authorization-mode: Node,RBAC timeoutForControlPlane: 4m0s certSANs: {{- range .CertSANs }} - {{ . }} {{- end }} --- apiVersion: kubeproxy.config.k8s.io/v1alpha1 kind: KubeProxyConfiguration bindAddress: 0.0.0.0 clientConnection: acceptContentTypes: burst: 10 contentType: application/vnd.kubernetes.protobuf kubeconfig: qps: 5 clusterCIDR: {{ .PodSubnet }} configSyncPeriod: 15m0s conntrack: maxPerCore: 32768 min: 131072 tcpCloseWaitTimeout: 1h0m0s tcpEstablishedTimeout: 24h0m0s enableProfiling: False healthzBindAddress: 0.0.0.0:10256 iptables: masqueradeAll: False masqueradeBit: 14 minSyncPeriod: 0s syncPeriod: 30s ipvs: excludeCIDRs: [] minSyncPeriod: 0s scheduler: rr syncPeriod: 30s strictARP: False metricsBindAddress: 127.0.0.1:10249 mode: ipvs nodePortAddresses: [] oomScoreAdj: -999 portRange: udpIdleTimeout: 250ms `)))
Functions ¶
func GenerateKubeadmFiles ¶
func GenerateKubeadmFiles(cfg *cluster.ClusterCfg)
func GenerateKubeletFiles ¶
func GenerateKubeletFiles()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.