question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tye fails to resolve kubectl installation on Windows

See original GitHub issue

Describe the bug

Tye fails to resolve the kubectl installation when kubectl is installed through the PowerShell script on Windows 10.

To Reproduce

  1. Install kubectl through the PowerShell script -
> Install-Script -Name 'install-kubectl' -Scope CurrentUser -Force
> install-kubectl.ps1 
  1. Verify kubectl installation
> kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"windows/amd64"}
  1. install Tye dotnet tool install -g Microsoft.Tye --version "0.6.0-alpha.21070.5"

  2. create a new project and add it to the solution -

> mkdir microservice
> cd microservice
> dotnet new razor -n frontend
> dotnet new sln
> dotnet sln add frontend
  1. Try deploying the tye application tye deploy --interactive

  2. Notice the error -

> tye deploy --interactive
Loading Application Details...
Verifying kubectl installation...
Drats! 'deploy' failed:
        Cannot apply manifests because kubectl is not installed.

Further technical details

  • tye --version
> tye --version
0.6.0-alpha.21070.5+a42e4463943e3136dbd1de38474d8d62b802797c
  • If possible rerun the command with -v debug and include the output
> tye deploy --interactive -v debug
Loading Application Details...
Restoring and evaluating projects
Resolved metadata for service backend at C:\Users\prsangli\source\repos\TyeDemo\microservice\backend\obj\Debug\net6.0\MicrosoftTye.ProjectMetadata.txt
Resolved metadata for service frontend at C:\Users\prsangli\source\repos\TyeDemo\microservice\frontend\obj\Debug\net6.0\MicrosoftTye.ProjectMetadata.txt
Restore and project evaluation took: 1651.1614ms
Found application version: 1.0.0
RunCommand=C:\Users\prsangli\source\repos\TyeDemo\microservice\backend\bin\Debug\net6.0\backend.exe
RunArguments=
TargetPath=C:\Users\prsangli\source\repos\TyeDemo\microservice\backend\bin\Debug\net6.0\backend.dll
PublishDir=bin\Debug\net6.0\publish\
AssemblyName=backend
IntermediateOutputPath=obj\Debug\net6.0\
Found target framework: net6.0
Parsed target framework name: net
Parsed target framework version: 6.0
Found shared frameworks: Microsoft.NETCore.App, Microsoft.AspNetCore.App
IsAspNet=True
Evaluation Took: 3.233ms
Found application version: 1.0.0
RunCommand=C:\Users\prsangli\source\repos\TyeDemo\microservice\frontend\bin\Debug\net6.0\frontend.exe
RunArguments=
TargetPath=C:\Users\prsangli\source\repos\TyeDemo\microservice\frontend\bin\Debug\net6.0\frontend.dll
PublishDir=bin\Debug\net6.0\publish\
AssemblyName=frontend
IntermediateOutputPath=obj\Debug\net6.0\
Found target framework: net6.0
Parsed target framework name: net
Parsed target framework version: 6.0
Found shared frameworks: Microsoft.NETCore.App, Microsoft.AspNetCore.App
IsAspNet=True
Evaluation Took: 1.0221ms
Verifying kubectl installation...
Drats! 'deploy' failed:
        Cannot apply manifests because kubectl is not installed.
  • The platform (Linux/macOS/Windows) Windows

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
angellaacommented, Mar 1, 2021

Installing Docker Desktop and Enabling Kubernetes in the UI made the “tye deploy” to successfully detect kubectl

0reactions
andreatosatocommented, Sep 25, 2021

@angellaa Can you explain you case? I have installed minik8s and Docker Desktop with Kubernetes.

Where is “UI”?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while installing kubectl in Windows 10
Its an issue with the execuable being not found in the path. PS D:\chocoloate_tmpdir> kubectl version Program 'kubectl.exe' failed to run: The ......
Read more >
Install and Set Up kubectl on Windows
Verify the plugin is successfully installed. If you do not see an error, it means the plugin is successfully installed.
Read more >
Kubectl Command Not Found
kubectl is not installed locally: One of the most frequent reasons command not found issues occur is that the tool is not installed;...
Read more >
Solving the 'kubectl run: command not found' Issue
This blog post will guide you through the steps to resolve this issue, ensuring your Kubernetes operations run smoothly.
Read more >
Unable to start kubernetes on docker desktop win 10 pro
Had an apparantly same issue today (Win 10 Pro, Docker Desktop - edge release) and fixed it by renaming the pki folder and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found