-
Notifications
You must be signed in to change notification settings - Fork 612
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
Minor issues with the k8s template #2992
Comments
Actual the sandbox was configured, so the problem seems to be with containerd 2.0 CRI and kubernetes 1.31
// SandboxImage returns the sandbox image used by the container runtime
func (runtime *CRIRuntime) SandboxImage() (string, error) {
ctx, cancel := defaultContext()
defer cancel()
status, err := runtime.impl.Status(ctx, runtime.runtimeService, true)
if err != nil {
return "", errors.Wrap(err, "failed to get runtime status")
}
infoConfig, ok := status.GetInfo()["config"]
if !ok {
return "", errors.Errorf("no 'config' field in CRI info: %+v", status)
}
type config struct {
SandboxImage string `json:"sandboxImage,omitempty"`
}
c := config{}
if err := json.Unmarshal([]byte(infoConfig), &c); err != nil {
return "", errors.Wrap(err, "failed to unmarshal CRI info config")
}
return c.SandboxImage, nil
} Maybe they shouldn't have used the semi-internal "config", but a proper CRI method to communicate it? |
The new config format (v3) is not documented upstream yet, they only do v2: https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd https://github.com/containerd/containerd/blob/main/docs/cri/config.md
Nice touch of documenting an ancient version.
Since it has been moved to "images", it is no longer visible in the "runtime" status. configByt, err := json.Marshal(c.config)
...
resp.Info = make(map[string]string)
resp.Info["config"] = string(configByt) |
Probably these things are never seen upstream, since |
Issues have been opened in the upstream projects, so nothing more to do in Lima... And it is only a couple of lines of log warnings now, who looks at those anyway right?
It does work fine, and the configuration is the correct one (despite all the false complaints)
anders@lima-k8s:~$ sudo containerd config dump
...
[plugins.'io.containerd.cri.v1.images'.pinned_images]
sandbox = 'registry.k8s.io/pause:3.10'
...
There are other known issues at startup anyway, like the kubelet crash-looping (because it is started too soon, before being configured and before the cluster networking has been set up - which is supposed to pushed from CNI to CRI) |
This output seems redundant as well, ideally
Again this is something for upstream, one would add a exist-only step (depending on the pull policy)... if data.DryRun() {
fmt.Println("[preflight] Would pull the required images (like 'kubeadm config images pull')")
return nil
}
// new code goes here:
// if preflight.RunImagesExistCheck(utilsexec.New(), data.Cfg(), data.IgnorePreflightErrors()) == nil {
// return nil
//}
fmt.Println("[preflight] Pulling images required for setting up a Kubernetes cluster")
fmt.Println("[preflight] This might take a minute or two, depending on the speed of your internet connection")
fmt.Println("[preflight] You can also perform this action beforehand using 'kubeadm config images pull'")
return preflight.RunPullImagesCheck(utilsexec.New(), data.Cfg(), data.IgnorePreflightErrors()) |
Description
Trying out k8s 1.32 RC, found some issues:
#2991
your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta3"
#2996
sandbox image is not configured properlydetected that the sandbox image "" of the container runtime is inconsistent with that used by kubeadm
containerd/containerd#11114
kubernetes/website#48976
EDIT: It did work OK, just complained in the logs.
Switching k8s versions involves hacking the yaml.
The text was updated successfully, but these errors were encountered: