Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8s CoreDNS #36080

Open
charleswan opened this issue Dec 7, 2024 · 3 comments
Open

K8s CoreDNS #36080

charleswan opened this issue Dec 7, 2024 · 3 comments
Labels
question Further information is requested

Comments

@charleswan
Copy link

I encountered an issue that shows the following. Does anyone know how to resolve it?

$ sudo kubeadm init --pod-network-cidr=192.168.0.0/16 --apiserver-advertise-address=172.31.89.68 --node-name master --image-repository k8s-gcr.m.daocloud.io
I1207 03:09:13.901235    2663 version.go:256] remote version is much newer: v1.31.3; falling back to: stable-1.29
[init] Using Kubernetes version: v1.29.11
[preflight] Running pre-flight checks
    [WARNING Hostname]: hostname "master" could not be reached
    [WARNING Hostname]: hostname "master": lookup master on 127.0.0.53:53: server misbehaving
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
W1207 03:09:44.196963    2663 checks.go:835] detected that the sandbox image "registry.k8s.io/pause:3.8" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "k8s-gcr.m.daocloud.io/pause:3.9" as the CRI sandbox image.
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR ImagePull]: failed to pull image k8s-gcr.m.daocloud.io/coredns:v1.11.1: output: E1207 03:09:44.171636    2753 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = InvalidArgument desc = failed to pull and unpack image \"k8s-gcr.m.daocloud.io/coredns:v1.11.1\": Target.MediaType must be set: invalid argument" image="k8s-gcr.m.daocloud.io/coredns:v1.11.1"
time="2024-12-07T03:09:44Z" level=fatal msg="pulling image: rpc error: code = InvalidArgument desc = failed to pull and unpack image \"k8s-gcr.m.daocloud.io/coredns:v1.11.1\": Target.MediaType must be set: invalid argument"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
Copy link
Contributor

github-actions bot commented Dec 7, 2024

Hi @charleswan,
感谢您的反馈!
我们会尽快跟进.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

@wzshiming
Copy link
Member

wzshiming commented Dec 9, 2024

It's a coredns problem, its changed paths and tag styles you need to confirm the exact path, then retag
这是coredns 的问题 其不仅仅换过路径明还改过tag的风格 你需要确认准确的路径, 然后 retag

gcrane ls --json registry.k8s.io/coredns | jq .
{
"name": "k8s-artifacts-prod/images/coredns",
"child": [
"coredns"
],
"tags": [
"1.0.1",
"1.0.1__amd64_linux",
"1.0.1__arm64_linux",
"1.0.1__arm_linux",
"1.0.1__ppc64le_linux",
"1.0.1__s390x_linux",
"1.0.6",
"1.0.6__amd64_linux",
"1.0.6__arm64_linux",
"1.0.6__arm_linux",
"1.0.6__ppc64le_linux",
"1.0.6__s390x_linux",
"1.1.3",
"1.1.3__amd64_linux",
"1.1.3__arm64_linux",
"1.1.3__arm_linux",
"1.1.3__ppc64le_linux",
"1.1.3__s390x_linux",
"1.2.2",
"1.2.3",
"1.2.4",
"1.2.6",
"1.3.0",
"1.3.1",
"1.5.0",
"1.6.2",
"1.6.5",
"1.6.6",
"1.6.7",
"1.7.0"
],
}
gcrane ls --json registry.k8s.io/coredns/coredns | jq .
{
"name": "k8s-artifacts-prod/images/coredns/coredns",
"child": [],
"tags": [
"sha256-017727efcfeb7d053af68e51436ce8e65edbc6ca573720afb4f79c8594036955.sig",
"sha256-1eeb4c7316bacb1d4c8ead65571cd92dd21e27359f0d4917f1a5822a73b75db1.sig",
"sha256-40384aa1f5ea6bfdc77997d243aec73da05f27aed0c5e9d65bfa98933c519d97.sig",
"sha256-4190b960ea90e017631e3e1a38eea28e98e057ab60d57d47b3db6e5cf77436f7.sig",
"sha256-8e352a029d304ca7431c6507b56800636c321cb52289686a581ab70aaa8a2e2a.sig",
"sha256-9caabbf6238b189a65d0d6e6ac138de60d6a1c419e5a341fbbb7c78382559c6e.sig",
"sha256-a0ead06651cf580044aeb0a0feba63591858fb2e43ade8c9dea45a6a89ae7e5e.sig",
"sha256-b82e294de6be763f73ae71266c8f5466e7e03c69f3a1de96efd570284d35bb18.sig",
"sha256-cc3ebb05fbdba439d2d69813f162aa204b027098c8244fb3156e6e7c0f31c548.sig",
"v1.10.0",
"v1.10.1",
"v1.11.0",
"v1.11.1",
"v1.11.3",
"v1.11.4",
"v1.12.0",
"v1.6.6",
"v1.6.7",
"v1.6.9",
"v1.7.0",
"v1.7.1",
"v1.8.0",
"v1.8.3",
"v1.8.4",
"v1.8.5",
"v1.8.6",
"v1.9.3",
"v1.9.4"
],

@wzshiming wzshiming changed the title Target.MediaType must be set: invalid argument K8s CoreDNS Dec 9, 2024
@wzshiming wzshiming added the question Further information is requested label Dec 9, 2024
@pacoxu
Copy link
Member

pacoxu commented Jan 3, 2025

kubernetes/kubeadm#2714 (comment)

apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
clusterName: kubernetes
dns:
  imageRepository: k8s.m.daocloud.io/coredns
imageRepository: k8s.m.daocloud.io
kubernetesVersion: 1.25.0
networking:
  dnsDomain: cluster.local
  serviceSubnet: 10.96.0.0/12
scheduler: {}

In kubeadm, dns.imageRepository should be specified separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants