好的,以下是 kubeadm init
命令的全部参数:
Usage:
kubeadm init [flags]
Flags:
--apiserver-advertise-address string The IP address the API Server will advertise it's listening on. Specify '0.0.0.0' to use the address of the default network interface. (default "192.168.49.2")
--apiserver-bind-port int32 The secure port for the API server to bind to (default 6443)
--cert-dir string The directory where the TLS certs are located (default "/etc/kubernetes/pki")
--config string Path to kubeadm config file.
--control-plane-endpoint string Endpoint for API server to advertise if different than default: 'advertiseAddress:port'
-h, --help help for init
--ignore-preflight-errors strings A list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.
--image-repository string Choose a container registry to pull control plane images from
--kubernetes-version string Choose a specific Kubernetes version for the control plane
--node-name string Specify the node name.
--pod-network-cidr string Specify range of IP addresses for the pod network in CIDR notation (default "10.244.0.0/16")
--service-cidr string Use alternative range of IP address for service VIPs in CIDR notation (defaults to pod network CIDR if unspecified). This is required when using overlay networking such as vxlan.
--service-dns-domain string Use alternative domain name for services, used as a suffix (e.g. svc.cluster.local) (default "cluster.local")
--skip-certificate-key-print Do not print the key used to encrypt the control-plane certificates on screen
--skip-phases strings List of phases to be skipped when running 'kubeadm init' (e.g. 'preFlight, certs'). The default phase which always runs is 'all'. Allowed values: [preflight certs kubelet-start bootstrap-control-plane control-plane-etcd etcd wait-control-plane addon-bootstrap upload-config]
--skip-token-print Do not print a token for TLS bootstrap of the control plane. WARNING: Your cluster may be vulnerable to attacks if you use this flag!
--token string Use an existing bootstrap token instead of creating a new one
--token-ttl duration The duration before the token expires (default 24h0m0s)
--v int Set the level of verbosity
其中,一些常用的参数包括:
--config
:指定 kubeadm 配置文件的路径。--pod-network-cidr
:指定 Pod 网络的 IP 地址段。--service-cidr
:指定 Service 网络的 IP 地址段。--apiserver-advertise-address
:指定 API Server 广告自己监听的 IP 地址。--control-plane-endpoint
:指定 API Server 的访问地址,如果不设置,则使用默认地址。--node-name
:指定节点名称。