kubekey
kubekey copied to clipboard
Installation problems in offline mode
What is version of KubeKey has the issue?
3.0.7
What is your os environment?
CentOS 9
KubeKey config file
apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
name: sample
spec:
hosts:
- {name: node1, address: 192.168.8.20, internalAddress: 192.168.8.20, user: root, password: "A123123"}
roleGroups:
etcd:
- node1
control-plane:
- node1
worker:
- node1
registry:
- node1
controlPlaneEndpoint:
## Internal loadbalancer for apiservers
internalLoadbalancer: haproxy
domain: lb.kubesphere.local
address: ""
port: 6443
kubernetes:
version: v1.25.5
clusterName: cluster.local
autoRenewCerts: true
containerManager: containerd
etcd:
type: kubekey
network:
plugin: calico
kubePodsCIDR: 10.233.64.0/18
kubeServiceCIDR: 10.233.0.0/18
## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
multusCNI:
enabled: false
registry:
privateRegistry: dockerhub.kubekey.local
registryMirrors: []
insecureRegistries: []
addons: []
A clear and concise description of what happend.
Execute the following command line kk init registry -f k8s.yaml -a kubekey.tar.gz kk create cluster - f k8s.yaml - a kubekey.tar.gz
Installation failed with error message
Relevant log output
pull image failed: Failed to exec command: sudo -E /bin/bash -c "env PATH=$PATH crictl pull dockerhub.kubekey.local/kubesphere/pause:3.8"
E0304 11:52:19.930866 15585 remote_image.go:238] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"dockerhub.kubekey.local/kubesphere/pause:3.8\": failed to resolve reference \"dockerhub.kubekey.local/kubesphere/pause:3.8\": failed to do request: Head \"https://dockerhub.kubekey.local/v2/kubesphere/pause/manifests/3.8\": x509: certificate signed by unknown authority" image="dockerhub.kubekey.local/kubesphere/pause:3.8"
FATA[0000] pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "dockerhub.kubekey.local/kubesphere/pause:3.8": failed to resolve reference "dockerhub.kubekey.local/kubesphere/pause:3.8": failed to do request: Head "https://dockerhub.kubekey.local/v2/kubesphere/pause/manifests/3.8": x509: certificate signed by unknown authority: Process exited with status 1
Additional information
No response
find bugs , add text into /etc/containerd/config.toml file, restart containerd service
[plugins."io.containerd.grpc.v1.cri".registry.configs]
[plugins."io.containerd.grpc.v1.cri".registry.configs."dockerhub.kubekey.local".tls]
ca_file = "/etc/docker/certs.d/dockerhub.kubekey.local/dockerhub.kubekey.local.cert"
howto add config.toml config to kubekey config
howto add config.toml config to kubekey config
run command "kk create cluster - f k8s.yaml - a kubekey.tar.gz" until error , the file config.toml created
PR welcome
Modify registry
in config-sample.yaml
as below might solve the problem:
registry:
type: harbor
auths:
"dockerhub.kubekey.local":
username: admin
password: Harbor12345
certsPath: "/etc/docker/certs.d/dockerhub.kubekey.local"
privateRegistry: "dockerhub.kubekey.local"
namespaceOverride: "kubesphereio"
registryMirrors: []
insecureRegistries: []
I get error "unable to sign certificate: must specify a CommonName" with ./kk init registry -f k8s.yaml -a kubesphere.tar.gz when i try to install offline, solved with Taurus-Le modification.
I get error "unable to sign certificate: must specify a CommonName" with ./kk init registry -f k8s.yaml -a kubesphere.tar.gz when i try to install offline, solved with Taurus-Le modification.
same issue , sloved ths