kubesphere/kubekey

kk create manifest default

Open

#1,931 opened on Jul 21, 2023

View on GitHub
 (1 comment) (1 reaction) (1 assignee)Go (820 forks)auto 404
good first issue

Repository metrics

Stars
 (2,815 stars)
PR merge metrics
 (Avg merge 20d 9h) (31 merged PRs in 30d)

Description

Your current KubeKey version

kk version: &version.Info{Major:"3", Minor:"0", GitVersion:"v3.0.8", GitCommit:"2698dfbc5781a0fdf3ba587797676dd91c9f8274", GitTreeState:"clean", BuildDate:"2023-07-14T01:14:55Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}

Describe this feature

./kk create manifest --with-kubernetes v1.23.1 -f default.manifest.1.23.1.yaml ./kk create manifest --with-kubernetes v1.24.1 -f default.manifest.1.24.1.yaml ./kk create manifest --with-kubernetes v1.25.1 -f default.manifest.1.25.1.yaml ./kk create manifest --with-kubernetes v1.26.1 -f default.manifest.1.26.1.yaml ./kk create manifest --with-kubernetes v1.27.1-f default.manifest.1.27.1.yaml ......

Describe the solution you'd like

When using Kubekey to create a Kubernetes cluster, you can customize the cluster parameters through the manifest.yaml file. for example: Specify a different version of Kubernetes KubeSphere will use a newer stable version by default, but manifest can be used to specify other versions, such as:

yaml
kubernetes:
version: v1.23.10

This will create a specified version of the Kubernetes cluster. Manifest can customize the specific parameters of each component of Kubernetes, such as etcd and docker, to customize the cluster configuration. I installed kubernetes offline, so whether the version filled in the manifest.yaml is correct or not is related to the success of the installation of kubernetes. And people don't always want to use the default stable version. For example, I want to install 1.23.6. I don't know what the default compatible component is. I found the following command from the Internet: yum install kubeadm-1.23.6 -y; kubeadm config images list

k8s.gcr.io/kube-apiserver:v1.23.6
k8s.gcr.io/kube-controller-manager:v1.23.6
k8s.gcr.io/kube-scheduler:v1.23.6
k8s.gcr.io/kube-proxy:v1.23.6
k8s.gcr.io/pause:3.6
k8s.gcr.io/etcd:3.5.1-0
k8s.gcr.io/coredns/coredns:v1.8.6

I think manifest.yaml is probably the most important file in the offline installation process. The official document is only one sentence: On the online host, run the following command and copy content in the [manifest-example](https://github.com/kubesphere/kubekey/blob/master/docs/manifest-example.md). This obviously can't help you understand how to create a manifest. In particular, what parameters can be used in manifest.yaml and what functions can be realized are very important. I spent a lot of time adjusting the parameters of the configuration file: manifest.yml.It will be very useful if there are default manifest configuration files for each version of k8s.

I think the offline installation documents need to be updated.Sometimes a well-written document may be more important than your well-written code. I want to add default configuration parameters, just like kubeadm above, and execute./kk create manifest-with-kubernetes v1.23.6 to output related component versions and generate manifest.yaml

Additional information

No response

Contributor guide