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

[Bug]: If using --kind-config it must include networking config #367

Closed
abangser opened this issue Aug 26, 2024 · 1 comment · Fixed by #377
Closed

[Bug]: If using --kind-config it must include networking config #367

abangser opened this issue Aug 26, 2024 · 1 comment · Fixed by #377
Labels
bug Something isn't working

Comments

@abangser
Copy link

abangser commented Aug 26, 2024

What is your environment, configuration, and command?

Environment: Local

Configuration:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    extraMounts:
      - containerPath: /var/lib/kubelet/config.json
        hostPath: /Users/abbybangser/.docker/config.json

Command:

$ ./idpbuilder create --kind-config ./kind-platform-config.yaml

What did you do and What did you see instead?

I tried to use kind config flag, but in doing so seemed to remove some key features that are auto populated otherwise. Namely the extraPortMapping which provides the networking between services and likely the kubeadmConfigPatches and containerdConfigPatches config is necessary too for the networking.

I would ideally see these default values still used, but even just documenting what is necessary if you do provide your own config could work for now.

Additional Information. Logs.

idpbuilder version:

$ ./idpbuilder version
idpbuilder 0.7.0-nightly.20240815 go1.21.3 darwin/arm64

Full kind config:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    extraMounts:
      - containerPath: /var/lib/kubelet/config.json
        hostPath: /Users/abbybangser/.docker/config.json

Top of logs for my run:

$ ./idpbuilder create --kind-config ./kind-platform-config.yaml
time=2024-08-26T20:57:59.620+01:00 level=INFO msg="Creating kind cluster" logger=setup
time=2024-08-26T20:57:59.632+01:00 level=INFO msg="Runtime detected" logger=setup provider=docker
########################### Our kind config ############################
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    image: kindest/node:v1.27.3
    extraMounts:
      - containerPath: /var/lib/kubelet/config.json
        hostPath: /Users/abbybangser/.docker/config.json

#########################   config end    ############################

Top of logs for a run without kind config:

$ ./idpbuilder create --kube-version v1.27.3
time=2024-08-26T20:55:37.619+01:00 level=INFO msg="Creating kind cluster" logger=setup
time=2024-08-26T20:55:37.635+01:00 level=INFO msg="Runtime detected" logger=setup provider=docker
########################### Our kind config ############################
# Kind kubernetes release images https://github.com/kubernetes-sigs/kind/releases
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  image: "kindest/node:v1.27.3"
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 443
    hostPort: 8443
    protocol: TCP

containerdConfigPatches:
- |-
  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."gitea.cnoe.localtest.me:8443"]
    endpoint = ["https://gitea.cnoe.localtest.me"]
  [plugins."io.containerd.grpc.v1.cri".registry.configs."gitea.cnoe.localtest.me".tls]
    insecure_skip_verify = true

#########################   config end    ############################
@abangser abangser added the bug Something isn't working label Aug 26, 2024
@abangser abangser changed the title [Bug]: If using --kind-config it must include exposing port 443 to 8443 [Bug]: If using --kind-config it must include networking config Aug 26, 2024
@nabuskey
Copy link
Collaborator

Thanks for reporting this. I just opened a PR to address the extra port mapping part. #368

I'd say kubeadmConfigPatches is also needed since this is for the ingress-nginx controller. We should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@abangser @nabuskey and others