kubernetes-sigs / kind

Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
13.01k stars 1.51k forks source link

I created kind cluster with extramappings for 3080 and I want to change it to 30080, without deleting and recreating cluster. How to do that? #3668

Closed udayrt closed 1 week ago

udayrt commented 1 week ago

I created kind cluster with extramappings for 3080 and I want to change it to 30080, without deleting and recreating cluster. How to do that?

kind update command is not accpting --name argument.

stmcginnis commented 1 week ago

For something like this I believe you will need to delete and recreate the cluster.

udayrt commented 1 week ago

that's a head ache right, to recreate for every option. Because in a day or two if I need one more port. Then delete and recreate is very hard to use

tao12345666333 commented 1 week ago

If you are using Linux, you can directly use the IP of the container (nodes).

Otherwise, it is recommended that you recreate the cluster.

udayrt commented 1 week ago

Nodeport right you mean to say.i am using Ubuntu only, can you share how to use that

On Fri, 21 Jun, 2024, 9:22 pm Jintao Zhang, @.***> wrote:

If you are using Linux, you can directly use the IP of the container (nodes).

Otherwise, it is recommended that you recreate the cluster.

— Reply to this email directly, view it on GitHub https://github.com/kubernetes-sigs/kind/issues/3668#issuecomment-2183012393, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFGHHBKBVZ4EQZKEKPAT2D3ZIRD5PAVCNFSM6AAAAABJVQWKTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGAYTEMZZGM . You are receiving this because you authored the thread.Message ID: @.***>

BenTheElder commented 1 week ago

that's a head ache right, to recreate for every option. Because in a day or two if I need one more port. Then delete and recreate is very hard to use

Docker doesn't support this sort of mutation. You can route traffic into the cluster by some other means, but if you want to change anything provided by kind config you'll have to recreate. We've put a lot of work into making it as quick as reasonably possible while still offering standard Kubernetes.

udayrt commented 1 week ago

I understand. Also when I am trying to expose kube api for metrics. I wasn't able to do so. By following below steps, it is not getting the secret token created.

repositories:
  - name: stable
    url: https://charts.helm.sh/stable

releases:
  - name: metrics-server
    namespace: kube-system
    chart: stable/metrics-server
    version: 2.11.4
    values:
      - args:
          - --kubelet-insecure-tls
          - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname

Even if we generate manually,it is not accessing the service. The nodeport is already in extra mappings.

Please suggest.

On Fri, 21 Jun, 2024, 10:42 pm Benjamin Elder, @.***> wrote:

that's a head ache right, to recreate for every option. Because in a day or two if I need one more port. Then delete and recreate is very hard to use

Docker doesn't support this sort of mutation. You can route traffic into the cluster by some other means, but if you want to change anything provided by kind config you'll have to recreate. We've put a lot of work into making it as quick as reasonably possible while still offering standard Kubernetes.

— Reply to this email directly, view it on GitHub https://github.com/kubernetes-sigs/kind/issues/3668#issuecomment-2183132156, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFGHHBLLZRTDF2MITBNFEJDZIRNGZAVCNFSM6AAAAABJVQWKTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGEZTEMJVGY . You are receiving this because you authored the thread.Message ID: @.***>

BenTheElder commented 1 week ago

Sorry but that's not enough context and that is out of scope for this project.