0

I've enabled kubernetes in the docker desktop. Created a cluster using kind. I was checking a kubectl config file and saw that docker's ports doesn't match to the it:

This is a my config file, I've cut certificates values.

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: https://kubernetes.docker.internal:6443
  name: docker-desktop
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: https://127.0.0.1:63594
  name: kind-kind
contexts:
- context:
    cluster: docker-desktop
    user: docker-desktop
  name: docker-desktop
- context:
    cluster: kind-kind
    user: kind-kind
  name: kind-kind
current-context: kind-kind
kind: Config
preferences: {}
users:
- name: docker-desktop
  user:
    client-certificate-data: DATA+OMITTED
    client-key-data: DATA+OMITTED
- name: kind-kind
  user:
    client-certificate-data: DATA+OMITTED
    client-key-data: DATA+OMITTED

While ports in my container aren't the same:

CONTAINER ID   IMAGE                  COMMAND                  CREATED          STATUS          PORTS
        NAMES
b411fd6e5416   kindest/node:v1.25.3   "/usr/local/bin/entr…"   28 minutes ago   Up 28 minutes   127.0.0.1:64280->6443/tcp   kind-control-plane

I understand that the port and the certificate can be manually changed, but I'm sure there is a better way.

I really be glad to see a better solution allowing to solve it once

0 Answers0