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

kubectl shows duplicate contexts docker-desktop and docker-for-desktop #4089

Closed
2 tasks done
tekumara opened this issue Dec 2, 2019 · 25 comments
Closed
2 tasks done

Comments

@tekumara
Copy link

tekumara commented Dec 2, 2019

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: 1D52253A-06BD-4ECA-8188-316BAD9AFDD9/20191202075540

Expected behavior

Only one kubernetes context is shown.

Actual behavior

Duplicate contexts are shown and I'm confused as to which one to use.

$ kubectl config get-contexts
CURRENT   NAME                 CLUSTER          AUTHINFO         NAMESPACE
*         docker-desktop       docker-desktop   docker-desktop
          docker-for-desktop   docker-desktop   docker-desktop

Information

  • macOS Version: 10.14.6 (18G1012)

Diagnostic logs

Docker for Mac: version... 2.1.0.5 (40693) stable

Steps to reproduce the behavior

  1. Install Docker on macOS (on a new mac)
  2. Run kubectl config get-contexts
@tekumara
Copy link
Author

tekumara commented Dec 2, 2019

Also occurs on Windows see docker/for-win#5089

@tekumara
Copy link
Author

tekumara commented Dec 2, 2019

Docker -> Kubernetes only shows the docker-desktop context

Screen Shot 2019-12-02 at 7 02 38 pm

@mjgallag
Copy link

mjgallag commented Dec 9, 2019

I have this issue too.

@adamalex
Copy link

Confirmed after new reset of disk image. The contexts are identical at least on my machine, so it doesn't matter which one you use. There should probably be only one of these unless there is a good reason to have both, but in the meantime it's just cosmetic.

@michaelsync
Copy link

michaelsync commented Feb 19, 2020

Any update on this issue? Is it something that will be fixed soon?

Edited: As I mentioned in this post docker/for-win#5089 (comment), I tried deleting docker-for-desktop context manually but it automatically come back after the restart. I tested only on Windows. but I think the mac version might have the same behivor.

@giladsh1
Copy link

same issue on MacOs version 2.2.0.3

@mlopezd
Copy link

mlopezd commented Feb 28, 2020

Still happens with the latest versions for MacOS:
Docker Desktop: 2.2.0.3
Kubernetes: 1.15.5

@kinowarrior
Copy link

Same with:

Docker Desktop: 2.2.1.0
Kubernetes: 1.15.5

@hiromaily
Copy link

+1

@davidygs
Copy link

davidygs commented Mar 14, 2020

same same

macos 10.15.3
Docker Desktop 2.2.0.4
Kubernetes 1.15.5

@Janaka-Steph
Copy link

kubectl config delete-context docker-for-desktop will delete the specified context from the kubeconfig

@mlopezd
Copy link

mlopezd commented Apr 1, 2020

kubectl config delete-context docker-for-desktop will delete the specified context from the kubeconfig

Yes but it shows up again after restart

@laballab
Copy link

laballab commented Apr 3, 2020

Same issue on MacOS 10.15.3 (19D76)

@adescalzo
Copy link

kubectl config delete-context docker-for-desktop will delete the specified context from the kubeconfig

Yes but it shows up again after restart

Same issue

@mattqzhang
Copy link

Same issue:
Mac version: 10.15.4
Docker desktop: 2.2.0.5
Kubernetes: 1.15.5

@thaJeztah
Copy link
Member

Thanks for reporting! This issue is tracked internally, but you can find more details in this issue in the "docker for windows" issue tracker; docker/for-win#5089

@IronCore864
Copy link

Any workaround?

@o6uoq
Copy link

o6uoq commented May 12, 2020

Any workaround?

Yes, ignore it! 🙈

@teebu
Copy link

teebu commented Jun 5, 2020

I too am confused by it. In the command line it shows both, but in the app it only shows one.

Windows 10
Docker for desktop: Version 2.3.0.3
Kubernetes: v1.16.5

CURRENT   NAME                 CLUSTER          AUTHINFO         NAMESPACE
          docker-desktop       docker-desktop   docker-desktop
*         docker-for-desktop   docker-desktop   docker-desktop

image

@ipleten
Copy link

ipleten commented Jun 26, 2020

We use 'docker-for-desktop' context for a lot of automation, We choose that one because it was recreated each time we delete it. So which one should be removed 'docker-desktop' or 'docker-for-desktop'? Considering that there are "docker for win", "docker for mac". I suppose that "docker for desktop" is quite logical to leave. ¯_(ツ)_/¯

@stephen-turner
Copy link
Contributor

This is fixed in the latest Edge release, 2.3.2.0. We have removed the legacy context name that was there for backwards compatibility.

@jakerobb
Copy link

We have removed the legacy context name that was there for backwards compatibility.

Fantastic. Which one is the legacy one? 🙂

@stephen-turner
Copy link
Contributor

Sorry, docker-for-desktop is the old one, docker-desktop is the new one that you should use.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Aug 14, 2020
@djs55
Copy link
Contributor

djs55 commented Sep 30, 2020

The change has now made it to the latest stable version 2.4.0.0 for Mac and Windows.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests