Comments (6)
thanks for reporting! ya, we'll likely need to redo the registry support for the new containerd
from ctlptl.
With the change there aren't actually any changes that need to happen on the ctlptl side and it actually simplifies the repo updates that are done after the cluster is created. I'm trying to get the fix for this landed and I've been testing locally with ctlptl to make sure it's relatively easy.
from ctlptl.
we do edit it a bit ourselves (see: https://github.com/tilt-dev/ctlptl/blob/main/pkg/cluster/admin_minikube.go#L206) but i will keep an eye out for your minikube change!
from ctlptl.
I put in a PR for the minikube things kubernetes/minikube#14482.
Also, I think if you look at the blame on that line in admin_minikube.go
you'll see my name so I have some understanding around the changes that are needed here. This fix should simplify all of that away for the most part because the --insecure-registry
flag for minikube will actually setup a working registry for ctlptl. The sed command won't be applied because that section of the containerd configuration was removed so it won't find a string match to make the change against.
from ctlptl.
now that minikube v1.27 is out, i'm going to take a pass at trying to get the registry working again.
from ctlptl.
This worked for me this morning. Built locally and then tilt up
came up with running pods without any other changes.
The updates on the minikube
side remove the need for additional updating by ctlptl
on startup and just work out of the box now.
diff --git a/pkg/cluster/admin_minikube.go b/pkg/cluster/admin_minikube.go
index ef850b2..10b142c 100644
--- a/pkg/cluster/admin_minikube.go
+++ b/pkg/cluster/admin_minikube.go
@@ -21,6 +21,7 @@ import (
// minikube v1.26 completely changes the api for changing the registry
var v1_26 = semver.MustParse("1.26.0")
+var v1_27 = semver.MustParse("1.27.0")
// minikubeAdmin uses the minikube CLI to manipulate a minikube cluster,
// once the underlying machine has been setup.
@@ -86,7 +87,10 @@ func (a *minikubeAdmin) Create(ctx context.Context, desired *api.Cluster, regist
if err != nil {
return err
}
- isRegistryApi2 := v.GTE(v1_26)
+ isRegistryApi2 := false
+ if v.GTE(v1_26) && v.LT(v1_27) {
+ isRegistryApi2 = true
+ }
clusterName := desired.Name
if registry != nil {
@@ -135,12 +139,13 @@ func (a *minikubeAdmin) Create(ctx context.Context, desired *api.Cluster, regist
}
// https://github.com/tilt-dev/ctlptl/issues/239
+ // Skip minikube versions 1.26.0 and 1.26.1
if registry != nil {
if isRegistryApi2 {
return fmt.Errorf(
"Error: Local registries are broken in minikube v1.26.\n" +
"See: https://github.com/kubernetes/minikube/issues/14480 .\n" +
- "Please downgrade to minikube v1.25 until it's fixed.")
+ "Please upgrade to minikube v1.27.")
}
args = append(args, "--insecure-registry", fmt.Sprintf("%s:%d", registry.Name, registry.Status.ContainerPort))
}
~/go/bin/ctlptl create cluster minikube --registry=ctlptl-registry --kubernetes-version=v1.23.10
😄 minikube v1.27.0 on Darwin 12.6
✨ Using the docker driver based on user configuration
📌 Using Docker Desktop driver with root privileges
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
🔥 Creating docker container (CPUs=2, Memory=8100MB) ...
📦 Preparing Kubernetes v1.23.10 on containerd 1.6.8 ...
▪ kubelet.max-pods=500
▪ kubelet.cni-conf-dir=/etc/cni/net.mk
▪ Generating certificates and keys ...
▪ Booting up control plane ...
▪ Configuring RBAC rules ...
🔗 Configuring CNI (Container Networking Interface) ...
🔎 Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟 Enabled addons: storage-provisioner, default-storageclass
❗ /usr/local/bin/kubectl is version 1.25.1, which may have incompatibilites with Kubernetes 1.23.10.
▪ Want kubectl v1.23.10? Try 'minikube kubectl -- get pods -A'
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
Switched to context "minikube".
🔌 Connected cluster minikube to registry ctlptl-registry at localhost:50947
👐 Push images to the cluster like 'docker push localhost:50947/alpine'
cluster.ctlptl.dev/minikube created
from ctlptl.
Related Issues (20)
- Linux install fails HOT 3
- ctlptl does not work when containerd integration is enabled HOT 1
- Modification with `ctlptl docker-desktop set` results in `status code 400` HOT 1
- Support for ingress with kind HOT 1
- Registry support for htpasswd
- Support Kind v0.19.0 HOT 1
- K3D schema upgrade to v1alpha5 Simple. HOT 1
- Support minikube addons HOT 2
- Unable to set up registry with minikube HOT 10
- ctlptl doesn't authenticate requests when creating registry HOT 2
- ctlptl get registries -oname do not return a list of registry names
- ctlptl get registries -oname do return prefixed names HOT 1
- Support MiniKube with different drivers HOT 1
- kind containerd config patch should be updated HOT 2
- K3d config file formating HOT 4
- Registry not reachable with fixed port HOT 2
- ctlptl v0.8.25 has broken cluster config with containerdConfigPatches HOT 3
- should kind be called as a library and not via exec HOT 2
- feat: another container image using ctlptl only HOT 1
- Update kind to 0.22.0 so Kubernetes 1.29 is available
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctlptl.