Documentation error for powershell script of kubectl installation
Problem:
PowerShell script for windows does not work. An exception occurred once trying to download kebuctl.
Proposed Solution:
update script with download link from
$downloadlink = "($req.Links | where href -Match "kubectl.exe").href"
to "https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/windows/amd64/kubectl.exe" or set this text as a link on the page.
Page to Update:
https://kubernetes.io/docs/tasks/tools/install-kubectl/
1.12
Stack trace from powershell window
PS D:> & install-kubectl.ps1 -DownloadLOcation $HOME/.kube
==>Getting download link from https://kubernetes.io/docs/tasks/tools/install-kubectl/
Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.
At C:\Users\vladimir.shmidt\Documents\WindowsPowerShell\Scripts\install-kubectl.ps1:31 char:8
==>analyzing Downloadlink
==>starting Download from using Bitstransfer
Start-BitsTransfer : Cannot validate argument on parameter 'Source'. The argument is null or empty. Provide an argument
that is not null or empty, and then try the command again.
At C:\Users\vladimir.shmidt\Documents\WindowsPowerShell\Scripts\install-kubectl.ps1:43 char:20
Unblock-File : Cannot find path 'C:\Users\vladimir.shmidt.kube\kubectl.exe' because it does not exist.
At C:\Users\vladimir.shmidt\Documents\WindowsPowerShell\Scripts\install-kubectl.ps1:45 char:1
==>starting 'C:\Users\vladimir.shmidt.kube\kubectl.exe version'
. : The term 'C:\Users\vladimir.shmidt.kube\kubectl.exe' is not recognized as the name of a cmdlet, function, script f
ile, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct an
d try again.
At C:\Users\vladimir.shmidt\Documents\WindowsPowerShell\Scripts\install-kubectl.ps1:47 char:2
You can now start kubectl from C:\Users\vladimir.shmidt.kube\kubectl.exe
copy your remote kubernetes cluster information to C:\Users\vladimir.shmidt.kube/config
Facing exactly the same issue
Sounds like the install-kubectl.ps1 script from PSGallery is broken. Not sure how are we supposed to fix it. Should we remove the "Install with Powershell from PSGallery" section all together? We already have the curl way to download and install kubectl.exe on Windows (see later in that page).
install-kubectl.ps1 is trying to crawl docs page and find a link with cube installer but somebody removed it from the page so script is broken now
C:[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
then install
@petenys - I had to remove the C: but this fixed teh problem. Thanks
@bottkars, do you publish somewhere the source of the 'install-kubectl.ps1' script?
I can prepare the PR to resolve that.
The related issues
Will Update the Gallery Version
Von meinem iPhone gesendet
Am 16.01.2019 um 23:49 schrieb Wojciech Sciesinski <[email protected]notifications@github.com>:
The related issues
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/kubernetes/website/issues/10816#issuecomment-454974333, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH32HxuS6IPdLB7gnu0qZfK1K6QuopV6ks5vD6yHgaJpZM4YLjtj.
new version 1.7 of installer is published to Gallery. can be closed for now
@bottkars I think you might have uploaded the 1.6 code to the gallery for 1.7. The header still references 1.6 and the code looks exactly the same:
https://www.powershellgallery.com/packages/install-kubectl/1.7/Content/install-kubectl.ps1
<#PSScriptInfo
.VERSION 1.6
.GUID 32a11a36-f91c-4241-a11f-af0cf3e90f38
.AUTHOR Karsten.[email protected]
don´t trust that one.
please do "install-script install-kubectl -MinimumVersion 1.7 -force -verbose“
the script should be installed in $HOME/Documents/WindowsPowerShell/Scripts/install-kubectl.ps1
If so, do
ise -f $HOME/Documents/WindowsPowerShell/Scripts/install-kubectl.ps1
You will see it should be 1.7
Publish-Script does not allow to upload same version twice :-)
Am 22.01.2019 um 16:27 schrieb Barry Schneider <[email protected]notifications@github.com>:
@bottkarshttps://github.com/bottkars I think you might have uploaded the 1.6 code to the gallery for 1.7. The header still references 1.6 and the code looks exactly the same:
https://www.powershellgallery.com/packages/install-kubectl/1.7/Content/install-kubectl.ps1
<#PSScriptInfo
.VERSION 1.6
.GUID 32a11a36-f91c-4241-a11f-af0cf3e90f38
.AUTHOR Karsten.[email protected]Karsten.Bott@labbuildr.com
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/kubernetes/website/issues/10816#issuecomment-456440868, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH32H1CHJfu6VHnnzMvn8pYthI8QJUG4ks5vFy3vgaJpZM4YLjtj.
I've tested it, works correctly on W2K8 R2 and PowerShell 3.0.
IMHO, the issue can be closed now.
thanks for verifying Wojciech !
Am 23.01.2019 um 12:56 schrieb Wojciech Sciesinski <[email protected]notifications@github.com>:
I've tested it, works correctly on W2K8 R2 and PowerShell 3.0.
IMHO, the issue can be closed now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/kubernetes/website/issues/10816#issuecomment-456774966, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH32HzY9KNThH8tKP7ooXAEE_mYbMuJLks5vGE3ggaJpZM4YLjtj.
Version 1.7 is Still not working for windows 10.
@Aprilmei Could you please provide more information. what is the error message? code and screenshot would be helpful.
@Aprilmei Could you please provide more information. what is the error message? code and screenshot would be helpful.
Thanks, Barry. After I installed docker, the issue fixed. Not sure why.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
Most helpful comment
new version 1.7 of installer is published to Gallery. can be closed for now