github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/docs/user_docs/cli/kbcli_infra_create.md (about) 1 --- 2 title: kbcli infra create 3 --- 4 5 create kubernetes cluster. 6 7 ``` 8 kbcli infra create [flags] 9 ``` 10 11 ### Examples 12 13 ``` 14 # Create kubernetes cluster with specified config yaml 15 kbcli infra create -c cluster.yaml 16 17 # example cluster.yaml 18 cat cluster.yaml 19 metadata: 20 name: kb-k8s-test-cluster 21 user: 22 name: user1 23 privateKeyPath: ~/.ssh/test.pem 24 nodes: 25 - name: kb-infra-node-0 26 address: 1.1.1.1 27 internalAddress: 10.128.0.19 28 - name: kb-infra-node-1 29 address: 1.1.1.2 30 internalAddress: 10.128.0.20 31 - name: kb-infra-node-2 32 address: 1.1.1.3 33 internalAddress: 10.128.0.21 34 options: 35 hugePageFeature: 36 hugePageSize: 10GB 37 roleGroup: 38 etcd: 39 - kb-infra-node-0 40 - kb-infra-node-1 41 - kb-infra-node-2 42 master: 43 - kb-infra-node-0 44 worker: 45 - kb-infra-node-1 46 - kb-infra-node-2 47 48 kubernetes: 49 containerManager: containerd 50 # apis/kubeadm/types.Networking 51 networking: 52 plugin: cilium 53 dnsDomain: cluster.local 54 podSubnet: 10.233.64.0/18 55 serviceSubnet: 10.233.0.0/18 56 controlPlaneEndpoint: 57 domain: lb.kubeblocks.local 58 port: 6443 59 cri: 60 containerRuntimeType: "containerd" 61 containerRuntimeEndpoint: "unix:///run/containerd/containerd.sock" 62 sandBoxImage: "k8s.gcr.io/pause:3.8" 63 addons: 64 - name: openebs 65 namespace: kube-blocks 66 sources: 67 chart: 68 name: openebs 69 version: 3.7.0 70 repo: https://openebs.github.io/charts 71 options: 72 values: 73 - "localprovisioner.basePath=/mnt/disks" 74 - "localprovisioner.hostpathClass.isDefaultClass=true" 75 ``` 76 77 ### Options 78 79 ``` 80 -c, --config string Specify infra cluster config file. [option] 81 --container-runtime string Specify kubernetes container runtime. default is containerd (default "containerd") 82 --debug set debug mode 83 --etcd strings Specify etcd nodes 84 -h, --help help for create 85 --master strings Specify master nodes 86 --name string Specify kubernetes cluster name 87 --nodes strings List of machines on which kubernetes is installed. [require] 88 --output-kubeconfig string Specified output kubeconfig. [option] (default "$HOME/.kube/config") 89 -p, --password string Specify the password for the account to execute sudo. [option] 90 --private-key string The PrimaryKey for ssh to the remote machine. [option] 91 --private-key-path string Specify the file PrimaryKeyPath of ssh to the remote machine. default ~/.ssh/id_rsa. 92 --sandbox-image string Specified sandbox-image will not be used by the cri. [option] (default "k8s.gcr.io/pause:3.8") 93 -t, --timeout int Specify the ssh timeout.[option] (default 30) 94 -u, --user string Specify the account to access the remote server. [require] 95 --version string Specify install kubernetes version. default version is v1.26.5 (default "v1.26.5") 96 --worker strings Specify worker nodes 97 ``` 98 99 ### Options inherited from parent commands 100 101 ``` 102 --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. 103 --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. 104 --as-uid string UID to impersonate for the operation. 105 --cache-dir string Default cache directory (default "$HOME/.kube/cache") 106 --certificate-authority string Path to a cert file for the certificate authority 107 --client-certificate string Path to a client certificate file for TLS 108 --client-key string Path to a client key file for TLS 109 --cluster string The name of the kubeconfig cluster to use 110 --context string The name of the kubeconfig context to use 111 --disable-compression If true, opt-out of response compression for all requests to the server 112 --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure 113 --kubeconfig string Path to the kubeconfig file to use for CLI requests. 114 --match-server-version Require server version to match client version 115 -n, --namespace string If present, the namespace scope for this CLI request 116 --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") 117 -s, --server string The address and port of the Kubernetes API server 118 --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used 119 --token string Bearer token for authentication to the API server 120 ``` 121 122 ### SEE ALSO 123 124 * [kbcli infra](kbcli_infra.md) - infra command 125 126 #### Go Back to [CLI Overview](cli.md) Homepage. 127