Giter VIP home page Giter VIP logo

remote-kubernetes's Introduction

Remote - Kubernetes

The Remote - Kubernetes extension uses Okteto to move your development environment to Kubernetes.

Kubernetes, Okteto and VS Code make a great development environment because you can:

  • Launch reproducible development environment with all your tools in seconds.
  • Automatically synchronize your code between local and remote environments.
  • Eliminate integration issues by developing the same way code runs in production.
  • Keep using your favorite tools.
  • Forget about building images or redeploying containers to test your changes in Kubernetes.

The extension starts a development environment in your Kubernetes cluster by using https://github.com/okteto/okteto. Once the environment is ready, the extension prompts you to open it directly in VS Code using the Visual Studio Code Remote - SSH extension.

Requirements

  1. VS Code 1.88 or newer.
  2. Deploy access to a Kubernetes cluster.
  3. An OpenSSH compatible SSH client.

Installation

  1. Install VS Code and this extension.
  2. Install the Remote - SSH extension.
  3. Download and configure your kubeconfig file.

Getting started

There is a complete tutorial here. The steps can be summarized as follows:

  1. Clone https://github.com/okteto/vscode-remote-go
  2. Start VS Code
  3. Run the Okteto: Up command to launch your development environment in Kubernetes. When prompted, pick the okteto.yml manifest.
  4. After a few seconds, you'll be asked to select a host. Pick the vscode-remote-go.okteto entry from the dialog to launch your remote VS Code instance.
  5. Develop directly in Kubernetes from VS Code!

Questions and Feedback

Got questions? Have feedback?

  1. See the documentation
  2. Request features, upvote existing issues or report a problem.
  3. Contribute to our documentation.
  4. Submit a pull request 😎

Stay in Touch

Join the conversation in our online community. You can also reach out to @OktetoHQ on Twitter.

License

Remote - Kubernetes is licensed under the Apache 2.0 License.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

remote-kubernetes's People

Contributors

andreafalzetti avatar david9991 avatar dependabot[bot] avatar jlopezbarb avatar pchico83 avatar rberrelleza avatar rlamana avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

remote-kubernetes's Issues

"Unexpected token 'up' in expression or statement" when running "okteto up" via vscode

Describe the bug
"Okteto: up" via visual studio code throws error "Unexpected token 'up' in expression or statement." since the latest update.

"Okteto: Set the context for all the Okteto commands" via vscode does work as expected.

When I run the commands directly via a terminal (not via the vscode extensions "....\okteto.exe up") it works as expected

To Reproduce
Steps to reproduce the behavior:

  1. Run "Okteto: Up" via vscode: ctr-shift-p + "Okteto Up"
  2. Error is returned in the terminal (see screenshot)

Expected behavior
"up" runs via vscode extension in the same way as via the terminal

Screenshots
Working "okteto: set context .. "
image

Error "oketeto: up"
image

Desktop (please complete the following information):

  • OS: Windows10
  • Version: v0.4.1 (vscode) / 2.1.0 (okteto)
  • Default terminal: Powershell

Detect workdir if not specified in the manifest

Is your feature request related to a problem? Please describe.
If the workdir is not specified in the manifest, we should try to detect it instead of always going to /usr/src/app, since it might not be available in the container.

Additional context
we could get it from the SSH check we already do.

Extension fails to start

Describe the bug
Extension fails to start after installing for the first time

To Reproduce
Steps to reproduce the behavior:

  1. Installed extension.
  2. Re-opened VSCode.
  3. Try to run any of the Okteto ... commands, and get an error.

Expected behavior
The extension should start :)

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
VSCode details:

Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T15:04:31.999Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.19.0-6-amd64

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

[2020-02-13 14:56:51.510] [exthost] [error] Activating extension Okteto.remote-kubernetes failed due to an error:
[2020-02-13 14:56:51.510] [exthost] [error] Error: Command failed with exit code 2 (ENOENT): ( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :
spawnSync ( ENOENT
	at Object.spawnSync (internal/child_process.js:1041:20)
	at Object.spawnSync (child_process.js:615:24)
	at Function.e.exports.sync (/home/abecker/.vscode/extensions/okteto.remote-kubernetes-0.1.18/dist/extension.js:137:36038)
	at Function.e.exports.commandSync (/home/abecker/.vscode/extensions/okteto.remote-kubernetes-0.1.18/dist/extension.js:137:36726)
	at Object.t.protect (/home/abecker/.vscode/extensions/okteto.remote-kubernetes-0.1.18/dist/extension.js:310:73269)
	at Object.t.getOktetoId (/home/abecker/.vscode/extensions/okteto.remote-kubernetes-0.1.18/dist/extension.js:310:55876)
	at t.activate (/home/abecker/.vscode/extensions/okteto.remote-kubernetes-0.1.18/dist/extension.js:310:8718)
	at Function._callActivateOptional (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:695:911)
	at Function._callActivate (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:695:562)
	at /usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:694:651
	at async Promise.all (index 0)

Oketeto up not deploying to active context

Describe the bug
Hi, I have a dev and prod context in my kube config.
When I switch between dev and prod as the current-context, okteto up ignores this and always use the dev cluster.

To Reproduce
Steps to reproduce the behavior:

  1. Switch kube contexts (I use gcloud container clusters get-credentials ...)
  2. Run okteto up
  3. Switch again
  4. Run okteto up

Expected behavior
I expect it to use the active context?

Desktop (please complete the following information):

  • OS: Windows
  • Version 20H2

`Okteto: Install` fails on Windows

It fails with the following error, because VSCode doesn't have permission to write into system32

Error: failed to download https://downloads.okteto.com/cli/okteto-Windows-x86_64: EPERM: operation not permitted, open 'c:\windows\system32\okteto.exe'

Support paths with spaces

Describe the bug
On Windows, the HOME path can have spaces (e.g. C:\my first name.okteto). In order to support this we need to be able to escape the spaces. The challenge is that Powershell and the Windows Command Line have different ways of escaping, so we first need a solid way to detect the configured terminal, so we can escape things correctly.

Okteto: Up command failed: task didn't finish in 5 minutes: failed to add entry to your SSH config file

Describe the bug
Run okteto up

❯ /Users/alexk/.okteto-vscode/okteto up -f '/Users/alexk/workspace/vscode-remote-go/okteto.yml' --remote '22100' --loglevel=warn
✓ Development container activated
x couldn't connect to your development container: failed to add entry to your SSH config file

To Reproduce
Steps to reproduce the behavior:

  1. Run okteto up
  2. See an error

Based on https://medium.com/okteto/remote-kubernetes-development-in-visual-studio-code-with-okteto-8b96015b41a6

Expected behavior
Remote connection

Desktop (please complete the following information):

  • OS: Darwin alexmbp 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
  • okteto version 1.10.5

Additional context
❯ /Users/alexk/.okteto-vscode/okteto up -f '/Users/alexk/workspace/vscode-remote-go/okteto.yml' --remote '22100' --loglevel=debug
INFO[0000] started /Users/alexk/.okteto-vscode/okteto up -f /Users/alexk/workspace/vscode-remote-go/okteto.yml --remote 22100 --loglevel=debug
INFO[0000] /Users/alexk/.okteto/id_rsa_okteto.pub already present
INFO[0000] /Users/alexk/.okteto/id_rsa_okteto already present
INFO[0000] enabled remote mode
INFO[0000] '.stignore' exists in folder '/Users/alexk/workspace/vscode-remote-go'
INFO[0001] activating development container retry=false
INFO[0001] local syncthing intialized: gui -> 58177, sync -> 58178
INFO[0001] remote syncthing intialized: gui -> 58176, sync -> 58175
⠋ Activating your development container... INFO[0001] create deployment secrets
INFO[0001] updated okteto secret 'okteto-hello-world'
⠧ Activating your development container... INFO[0002] development container is not ready yet, will retry
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Pulling image "okteto/bin:1.2.18"
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Started container dev
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Successfully assigned default/hello-world-66b69548c5-jvfdm to minikube
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Successfully pulled image "okteto/golang:1" in 1m29.540092925s
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Successfully pulled image "okteto/bin:1.2.18" in 11.131672224s
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Pulling image "okteto/golang:1"
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Created container okteto-bin
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Created container dev
INFO[0002] pod hello-world-66b69548c5-jvfdm event: Started container okteto-bin
INFO[0002] dev pod hello-world-66b69548c5-jvfdm is now Running
INFO[0002] Development container activated
✓ Development container activated
INFO[0002] starting SSH port forwards
⠋ Connecting to your development container... INFO[0002] failed to add entry to your SSH config file: fail to update SSH config file /Users/alexk/.ssh/config: failed to create temporary config file: open /Users/alexk/.ssh/940613390: permission denied
INFO[0002] starting shutdown sequence
INFO[0002] sent cancellation signal
INFO[0002] stopping syncthing
INFO[0002] stopping forwarders
INFO[0002] stopped k8s forwarder
INFO[0002] stopped SSH forward manager
INFO[0002] completed shutdown sequence
INFO[0002] activate failed with: couldn't connect to your development container: failed to add entry to your SSH config file
INFO[0002] exit signal received due to error: couldn't connect to your development container: failed to add entry to your SSH config file
INFO[0002] couldn't connect to your development container: failed to add entry to your SSH config file
x couldn't connect to your development container: failed to add entry to your SSH config file

VSC/ plugin has no permission to create a file in userspace open /Users/alexk/.ssh/940613390: permission denied

Automatically open okteto terminal if Okteto:Up fails

Is your feature request related to a problem? Please describe.
I wrote the wrong image in the okteto manifests. Okteto:Up failed with a general error message, and it was hard to find the source of the issue.

Describe the solution you'd like
If Okteto:Up fails, the okteto terminal is automatically open and it is clear the error that happened.

Unable to Install in VS Code

Describe the bug
Unable to install "Remote - Kubernetes" extension from VS Code.

Notification Message:

Unable to install 'okteto.remote-kubernetes' extension because it is not compatible with the current version of VS Code (version 1.37.1).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'okteto.remote-kubernetes' extension from the extension marketplace in VSCode.
  2. Click on 'Install'
  3. See error

Desktop (please complete the following information):

  • OS: Manjaro Linux
  • Version: VS Code 1.37.1

Permission Access error when installing on Linux

If the user VSCode is running as can't write to /usr/local/bin, the install will fail.

Error: failed to download https://downloads.okteto.com/cli/okteto-Linux-x86_64: EACCES: permission denied, open '/usr/local/bin/okteto'

We should check for permission first, and if we can't write, try in a different location.

Automatically install extensions on start/connect

Is your feature request related to a problem? Please describe.
I'd like okteto to automatically install extensions on vscode remote

Additional context
VSCode supports this, so it might be a question of docs vs implementing it here. further research is needed.

Field selector not found

Describe the bug
The "selector" field is not supported in the okteto.yml using the vscode remote extension

x Invalid manifest:
- line 2: field selector not found
See https://okteto.com/docs/reference/manifest/ for details

When running okteto up from the command line (using the okteto.exe) it works as expected

To Reproduce

  1. add a selector to okteto.yml, e.g.:
    selector:
    app: vote
  2. run okteto up via visualstudio code

Expected behavior
The development container get's deployed in the existing deployment or creates a new deployment : deployment-okteto

Desktop (please complete the following information):

  • OS: Windows
  • Version vscode: 1.62.2 (latest)
  • Version remote-kubernetes: 0.3.4 (latest)

`okteto up` command not work with cmd shell

Describe the bug

invalid argument "'22100'" for "-r, --remote" flag: strconv.ParseInt: parsing "'22100'": invalid syntax and stopping.

To Reproduce
Steps to reproduce the behavior:

  1. Set the "terminal.integrated.shell.windows": "C:\WINDOWS\System32\cmd.exe", in settings.json of VSCode by Settings UI or editing file.
  2. Run the okteto up in vscode, using F1 hotkey.
  3. See error.

Expected behavior
Up work fine.

Screenshots

Desktop (please complete the following information):

  • OS: Win10 21H1

allow setting okteto CLI flags in extension settings

I'd like to be able to edit the extension settings to for example change the log level used by the ctrl+shift+p Okteto: Up commands e.g. -l=debug to see debug messages.

The UX could be similar to how the vs code Go extension allows you to set build flags:
image

Waiting for resources (Feature:1622) doesn't work from vscode extension

Describe the bug
Waiting for AKS resources does not work from VScode extension (it does work from powershell commandline) okteto/okteto#1622

error:
x Invalid manifest:
- line 5: cannot unmarshal !!map into time.Duration
See https://okteto.com/docs/reference/manifest for details

To Reproduce
Steps to reproduce the behavior:

  • OS: Windows
  • Okteto Version: 1.13.2
  • Remote kubernetes (Okteto) plugin: 0.3.1
  • Visual Studio Code version: 1.52.8
  1. Set timeout in okteto.yml:
    timeout:
    default: 3m
    resources: 6m
  2. run okteto up on a "full" kubernetes (AKS) cluster

Expected behavior

Okteto waits for resources like from the powershell command line:
"⠴ Insufficient cpu/memory in the cluster. Waiting for new nodes to come up..."

Additional context

The okteto vscode extention has default settings and looks for the okteto executable in the environment/path (which is latest/1.13.2). Looks like the vscode extension doesn't expect the timeout object in the okteto.yml maybe?

SSH connection unstable / reconnecting endlessly

Describe the bug

I can successfully deploy a development POD in our company cluster.

Remote-SSH also initially succeeds at establishing a connection. However it is very unstable, painfully slow at best and usually crashes within less than 1 minute.

To Reproduce
Steps to reproduce the behavior:

  1. Okteto: Up
  2. Wait for Remote-SSH window to open
  3. Wait a few seconds, or open a file for editing / a Terminal on the host pod
  4. I can then see a message reading: Setting up SSH Host python-data-streaming.okteto: (details) Initializing VS Code Server
  5. This is followed by the screenshot

image

Expected behavior
A responsive, stable connection to the pod

Desktop (please complete the following information):

  • OS: OSX 12.0.1
  • VSCode 1.63.2
  • Remote - Kubernetes v0.3.4, Remote - SSH v0.70.0

Manifest

name: python-data-streaming
image: okteto/python:3
context: ourk8scluster
namespace: ververica
command: bash
workdir: /code
sync:
  - ./code:/code
volumes:
- /root/.cache/pip
forward:
- 8080:8080
reverse:
- 9000:9000
autocreate: true
resources:
  requests:
    memory: "64Mi"
    cpu: "100m"
  limits:
    memory: "128Mi"
    cpu: "500m"
probes:
  liveness: true
  readiness: true
  startup: true

Logs

pod.log
vscode_output.log

Okteto:Up fails if current k8s context does not specify a namespace

Describe the bug
If my k8s context does not specify a namespace, Okteto:Up fails to load the k8s configuration.
For example, for local installations, the namespace is not specified in most cases, which means people is deploying to the default namespace.

To Reproduce

  1. Switch to a k8s context without namespace
  2. Okteto:Up

Screenshot 2019-09-20 at 10 10 00

Expected behavior
Okteto:Up should be executed in the default namespace

Okteto Install keeps redownload and reinstall

Describe the bug
Okteto Install command keeps redownloading and reinstalling the same.

To Reproduce

  1. ctrl + shitf + p

  2. Okteto Install

  3. Okteto Install

Expected behavior
Second time we run Okteto Install, it should check version (maybe +checksum) quickly without re-downloading and echo back already installed or similar.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04
  • VSCode: 1.48.2

cmd not found: space in user-profile

Describe the bug
Okteto Up is not working if the user profile has a space in it.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Windows account with a space in it
  2. Run Okteto Uo
  3. The error appears as shown on the screenshot

Expected behavior
The Extension handles spaces in filenames correctlz

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • VSCode 1.60.1
  • Remote Kubernetes 0.3.4

Configurable KUBECONFIG

It would be nice to have a way to set the KUBECONFIG in either okteto.yml or a plugin setting defined in VSCode's workspace settings.

One scenario is to have multiple kube config.yaml files for different purposes. Once in VSCode if KUBECONFIG wasn't set before the process started, one can set the KUBECONFIG environment variable in the integrated terminal, and use the okteto CLI in that integrated shell. But one cannot use the VSCode Remote Kubernetes extension because that extension has no way to know what the KUBECONFIG is.

If the extension were to read the KUBECONFIG from okteto.yml, or from VSCode workspace settings, then one could have multiple kube configs and still use this VSCode extension.

Also if KUBECONFIG was in okteto.yml rather than in VSCode workspace settings, the experience would be identical between using okteto CLI in a terminal, VSCode integrated terminal, or VSCode Remote extension. So I think there's some value in this configuration being inside okteto.yml rather than VSCode workspace settings.

Okteto Up fails to launch the remote SSH window

Describe the bug

Hey guys, I am getting ssh error during VSCode remote development setup. When i do Okteto Up, it setup my pod but the new VS code window is not able to get ssh connection
I am using okteto 1.3.4, eks, k8s 1.20, VS Code 1.64

Logs

14:04:25.805] Log Level: 2
[14:04:25.809] [email protected]
[14:04:25.809] darwin x64
[14:04:25.836] SSH Resolver called for "ssh-remote+ftu-conv-test.okteto", attempt 1
[14:04:25.837] "remote.SSH.useLocalServer": true
[14:04:25.838] "remote.SSH.path": undefined
[14:04:25.838] "remote.SSH.configFile": undefined
[14:04:25.839] "remote.SSH.useFlock": true
[14:04:25.839] "remote.SSH.lockfilesInTmp": false
[14:04:25.839] "remote.SSH.localServerDownload": auto
[14:04:25.840] "remote.SSH.remoteServerListenOnSocket": false
[14:04:25.840] "remote.SSH.showLoginTerminal": false
[14:04:25.840] "remote.SSH.defaultExtensions": []
[14:04:25.840] "remote.SSH.loglevel": 2
[14:04:25.841] SSH Resolver called for host: ftu-conv-test.okteto
[14:04:25.841] Setting up SSH remote "ftu-conv-test.okteto"
[14:04:25.846] Acquiring local install lock: /var/folders/bf/vgfwfyf16s52mn0py7s30x6h0000gp/T/vscode-remote-ssh-d23af3b0-install.lock
[14:04:25.863] Looking for existing server data file at /Users/dkumar11/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d23af3b0-b3318bc0524af3d74034b8bb8a64df0ccf35549a-0.66.0/data.json
[14:04:25.864] Using commit id "b3318bc0524af3d74034b8bb8a64df0ccf35549a" and quality "stable" for server
[14:04:25.870] Install and start server if needed
[14:04:25.878] PATH: /Users/dkumar11/.nvm/versions/node/v15.14.0/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/dkumar11/Documents/softwares/apache-maven-3.6.2/bin:/Users/dkumar11/go/bin:/Users/dkumar11/Documents/softwares/gradle-5.5/bin
[14:04:25.878] Checking ssh with "ssh -V"
[14:04:25.923] > OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021

[14:04:25.929] askpass server listening on /var/folders/bf/vgfwfyf16s52mn0py7s30x6h0000gp/T/vscode-ssh-askpass-c11aeb902e1d8248b4c31202419b7b676aad76a7.sock
[14:04:25.929] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/bf/vgfwfyf16s52mn0py7s30x6h0000gp/T/vscode-ssh-askpass-b61e897e905db1d49cfda83edfc8aab11e6766ca.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","62559","-o","ConnectTimeout=15","ftu-conv-test.okteto"],"dataFilePath":"/Users/dkumar11/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d23af3b0-b3318bc0524af3d74034b8bb8a64df0ccf35549a-0.66.0/data.json"}
[14:04:25.930] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/dkumar11/.vscode/extensions/ms-vscode-remote.remote-ssh-0.66.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer)","VSCODE_SSH_ASKPASS_MAIN":"/Users/dkumar11/.vscode/extensions/ms-vscode-remote.remote-ssh-0.66.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/bf/vgfwfyf16s52mn0py7s30x6h0000gp/T/vscode-ssh-askpass-c11aeb902e1d8248b4c31202419b7b676aad76a7.sock"}
[14:04:25.932] Spawned 24355
[14:04:26.174] > local-server-1> Spawned ssh, pid=24358
[14:04:26.192] stderr> OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021
[14:04:26.465] stderr> Unable to negotiate with ::1 port 22100: no matching host key type found. Their offer: ssh-rsa
[14:04:26.467] > local-server-1> ssh child died, shutting down
[14:04:26.474] Local server exit: 0
[14:04:26.474] Received install output: local-server-1> Spawned ssh, pid=24358
OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021
Unable to negotiate with ::1 port 22100: no matching host key type found. Their offer: ssh-rsa
local-server-1> ssh child died, shutting down

ECR images / Dockerfile in lieu of image

This project is great and I want to use your VSCode extension to do remote development. I currently have a Dockerfile that's used to build a devcontainer with vscode server running inside it. Your VSCode extension allows users to provide an image name and I wanted to know whether:

  1. I can provide my Dockerfile instead of image. Can you share an example?
  2. If I can't use my Dockerfile, then I suppose I could push an image to AWS ECR but I'm not sure if your offering allows pulling images that aren't in Docker Hub

How can someone in my position get going with your project? It will be a game changer but I can only use my own Dockerfile.

create manifest command doesn't work on 0.4.1

Describe the bug
Running the Create Manifest command fails on 0.4.1

To Reproduce
This is happening because 'okteto init' now always asks questions to the user. we need to find a way to automate this since this command doesn't expect interaction from the user.

The other option is to update the command so that it shows the terminal and asks questions to the user.

Unknown flag: --loglevel

Describe the bug
okteto up failed


okteto.exe up -f 'c:\Users\admin\Desktop\okteto-learn\vscode-remote-go\okteto.yml' --remote 22100 --loglevel=warn
Usage:
  okteto.exe up [svc] [flags]

Flags:
  -c, --context string     context where the up command is executed
  -d, --deploy             Force execution of the commands in the 'deploy' section of the okteto manifest (defaults to 'false')
  -f, --file string        path to the manifest file
  -h, --help               help for up
  -n, --namespace string   namespace where the up command is executed
  -r, --remote int         configures remote execution on the specified port
      --reset              reset the file synchronization database

Global Flags:
  -l, --log-level string    amount of information outputted (debug, info, warn, error) (default "warn")
      --log-output string   output format for logs (tty, plain, json) (default "tty")

 x  Unknown flag: --loglevel

Additional context
okteto new version? new flag?

channel 2: open failed: unknown channel type: unsupported channel type

Hi,

I get the error from the subject when trying to use the VSCode extension to a private cluster.

Describe the bug

The connection to the remote fails with the following error:

[15:19:05.598] > Warning: Permanently added '[localhost]:50192' (RSA) to the list of known hosts.
> SSH_AUTH_SOCK=/tmp/auth-agent926329077/listener.sock
> Connected to SSH Host - Please do not close this terminal
> channel 2: open failed: unknown channel type: unsupported channel type
> channel 2: open failed: unknown channel type: unsupported channel type
> channel 2: open failed: unknown channel type: unsupported channel type

To Reproduce

  1. Install okteto in vscode
  2. clone the Okteto hello-world repo
  3. Run Okteto Up
  4. I also tried with a reduced okteto.yml with less capabilities:
name: hello-world
image: okteto/golang:1.16
autocreate: true
workdir: /okteto
command: ["bash"]

Result

  1. The deployment is launched
  2. Okteto opens a new VSCode window that connects successfully until the error shown above occurs
  3. The deployment works fine. kubectl exec -ti hello-world -- bash is also successful
  4. In the local VSCode window there are no errors:
PS C:\Users\StefanFritsch\Documents\spielwiese\vscode-remote-go> C:\Users\StefanFritsch\AppData\Local\Programs\okteto.exe up -f 'c:\Users\StefanFritsch\Documents\vscode-remote-go\okteto.yml' --remote '22100' --loglevel=warn
 +  Persistent volume successfully attached
 +  Images successfully pulled
 +  Files synchronized
    Context:  default
    Namespace: hello-world
    Name:      hello-world   

Expected behavior

A successful connection

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 21H1

Thank you,
Stefan

Use source maps so we can properly debug errors reported in telemetry

Currently, all errors reported in our telemetry are based on the transpiled and minified Javascript. Sentry has a mode where you can register your code with them on release, and they'll get you the typescript errors. We should set that up so it's easier to figure out what's going on when an error is raised to telemetry.

Fail if bash is not available

VS Remote SSH needs bash to be present. if not available in the dev env, the extension should fail the okteto up command and notify the user.

Okteto up - VSCode can't open SSH session DNS issues

Describe the bug
After using the Okteto Up command through VSCode with Remote - Kubernetes extension I'm not able to establish SSH connection to the remote dev pod.

Here is the log:

[22:44:01.341] Log Level: 2
[22:44:01.341] [email protected]
[22:44:01.341] darwin arm64
[22:44:01.349] SSH Resolver called for "ssh-remote+hello-world.okteto", attempt 1
[22:44:01.350] "remote.SSH.useLocalServer": true
[22:44:01.350] "remote.SSH.path": undefined
[22:44:01.350] "remote.SSH.configFile": /var/folders/8p/54xm_ynj44b_b4_f3cm5d_fh0000gn/T/gitpod_ssh_config-30476-aq7axS9QKiop
[22:44:01.350] "remote.SSH.useFlock": true
[22:44:01.351] "remote.SSH.lockfilesInTmp": false
[22:44:01.351] "remote.SSH.localServerDownload": auto
[22:44:01.351] "remote.SSH.remoteServerListenOnSocket": false
[22:44:01.351] "remote.SSH.showLoginTerminal": false
[22:44:01.352] "remote.SSH.defaultExtensions": ["gitpod.gitpod-remote-ssh"]
[22:44:01.352] "remote.SSH.loglevel": 2
[22:44:01.352] "remote.SSH.enableDynamicForwarding": true
[22:44:01.352] "remote.SSH.enableRemoteCommand": false
[22:44:01.352] "remote.SSH.serverPickPortsFromRange": {}
[22:44:01.353] "remote.SSH.serverInstallPath": {}
[22:44:01.355] SSH Resolver called for host: hello-world.okteto
[22:44:01.355] Setting up SSH remote "hello-world.okteto"
[22:44:01.357] Acquiring local install lock: /var/folders/8p/54xm_ynj44b_b4_f3cm5d_fh0000gn/T/vscode-remote-ssh-0619bc04-install.lock
[22:44:01.361] Looking for existing server data file at /Users/r.ferrer/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-0619bc04-c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1-0.76.1/data.json
[22:44:01.362] Using commit id "c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1" and quality "stable" for server
[22:44:01.364] Install and start server if needed
[22:44:01.367] PATH: /opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/opt/mysql-client/bin:/opt/homebrew/opt/libpq/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin/
[22:44:01.367] Checking ssh with "ssh -V"
[22:44:01.376] > OpenSSH_8.6p1, LibreSSL 2.8.3

[22:44:01.377] Using SSH config file "/var/folders/8p/54xm_ynj44b_b4_f3cm5d_fh0000gn/T/gitpod_ssh_config-30476-aq7axS9QKiop"
[22:44:01.378] askpass server listening on /var/folders/8p/54xm_ynj44b_b4_f3cm5d_fh0000gn/T/vscode-ssh-askpass-3579ebdfe701590cfb864b0063122ea4ce1848f5.sock
[22:44:01.378] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/8p/54xm_ynj44b_b4_f3cm5d_fh0000gn/T/vscode-ssh-askpass-60ba9181d846f4ad8366a349cc0ab0ff12ba36e9.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","60570","-o","ConnectTimeout=15","-F","/var/folders/8p/54xm_ynj44b_b4_f3cm5d_fh0000gn/T/gitpod_ssh_config-30476-aq7axS9QKiop","hello-world.okteto"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/r.ferrer/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-0619bc04-c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1-0.76.1/data.json"}
[22:44:01.378] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.H8tcTsh62i/Listeners","SHELL":"/opt/homebrew/bin/fish","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/8p/54xm_ynj44b_b4_f3cm5d_fh0000gn/T/vscode-ssh-askpass-3579ebdfe701590cfb864b0063122ea4ce1848f5.sock"}
[22:44:01.379] Spawned 41870
[22:44:01.436] > local-server-1> Spawned ssh, pid=41876
[22:44:01.440] stderr> OpenSSH_8.6p1, LibreSSL 2.8.3
[22:44:01.442] stderr> ssh: Could not resolve hostname hello-world.okteto: nodename nor servname provided, or not known
[22:44:01.443] > local-server-1> ssh child died, shutting down
[22:44:01.444] Local server exit: 0
[22:44:01.444] Received install output: local-server-1> Spawned ssh, pid=41876
OpenSSH_8.6p1, LibreSSL 2.8.3
ssh: Could not resolve hostname hello-world.okteto: nodename nor servname provided, or not known
local-server-1> ssh child died, shutting down

[22:44:01.445] Resolver error: Error: Could not resolve hostname
at Function.Offline (/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:586092)
at /Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:583388
at Object.t.handleInstallOutput (/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:583875)
at Object.e [as tryInstallWithLocalServer] (/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:625033)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:644084
at async Object.t.withShowDetailsEvent (/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:647831)
at async /Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:623505
at async b (/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:620011)
at async Object.t.resolveWithLocalServer (/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:623120)
at async Object.t.resolve (/Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:645441)
at async /Users/r.ferrer/.vscode/extensions/ms-vscode-remote.remote-ssh-0.76.1/out/extension.js:1:722872
[22:44:01.447] ------

Expected behavior
Establish the SSH Connection to the pod and start working on it.

Desktop (please complete the following information):

  • OS: MacOs X Monterey 12.2.1 on M1

support posix shells in Windows

Is your feature request related to a problem? Please describe.
If a user has git-bash as the default terminal on VSCode, the okteto up command won't be able to start.

okteto up : wrong command line

When using command palette : okteto up
/C/... rather than C:/
/e/... rather than E:/
No quotes around lile path with a spca in it

See screen capture below

PS E:\Mes Documents_Dev logiciel\vscode-remote-go> /C/Users/tsv38/AppData/Local/Programs/okteto.exe up -f /e/Mes Documents/_Dev logiciel/vscode-remote-go/okteto.yml --remote 22100
/C/Users/tsv38/AppData/Local/Programs/okteto.exe : Le terme «/C/Users/tsv38/AppData/Local/Programs/okteto.exe» n'est pas reconnu comme nom d'applet de commande,
fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès est correct et
réessayez.
Au caractère Ligne:1 : 1

  • /C/Users/tsv38/AppData/Local/Programs/okteto.exe up -f /e/Mes Documen ...
  •   + CategoryInfo          : ObjectNotFound: (/C/Users/tsv38/...rams/okteto.exe:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException**Describe the bug**
    

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

The remote window fails to start if `scp` is not installed in the dev image

Describe the bug
The remote-ssh extension is now using SCP to copy the vscode server to the remote dev container. If scp is not available, the command hangs and eventually it fails.
image

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/okteto/python-getting-started
  2. Execute the okteto: up command in VSCode

Expected behavior
The remote window should open

Additional context
The current workaround is to install openssh-client in the dev file.

Connecting to the remote on Fedora 33 fails with publickey error

Describe the bug
On Fedora 33, the configured SSH host for the Okteto remote will not connect via VSCode because the SSH key is rejected.

Running the command ssh <okteto-host-name> -vvvv shows output like the following:

debug1: Offering public key: /home/USER/.okteto/id_rsa_okteto RSA 
SHA256:wUa7qj5C853m..................63jYMO31+CpydNU explicit
debug1: send_pubkey_test: no mutual signature algorithm

The problem, according to https://confluence.atlassian.com/bitbucketserverkb/ssh-rsa-key-rejected-with-message-no-mutual-signature-algorithm-1026057701.html, is that ssh-rsa keys are now rejected by default.

A workaround is to add PubkeyAcceptedKeyTypes +ssh-rsa to the host's config. A fix is to generate the key with a different algorithm.

In fact, running the command

ssh-keygen -t ed25519 -C "" -f id_rsa_okteto

On ${HOME}/.okteto generates a valid SSH key that seems to give no problems.

To Reproduce
Steps to reproduce the behavior:

  1. Create a remote Okteto environment manifest
  2. Use Okteto: Up from VSCode's command palette
  3. Wait for the container to build
  4. Wait for the SSH window to connect
  5. VSCode complains that publickey authentication was denied
  6. Try connecting via ssh <okteto-remote-name>

Expected behavior
The new window should connect to the SSH remote host.

Screenshots
None

Desktop (please complete the following information):

  • OS: Fedora 33

Get error when doing okteto up

I am using version 0.20 on windows 10 running Kubernetes in docker desktop.
Remote SSH extension is installed.

When I execute okteto up I receive the following error:

C:\Users\steve.curran\AppData\Local\Programs\okteto.exe up -f 'c:\AKS Development\AKSGo\ACM\okteto.yml' --remote '22100' --loglevel=verbose
Exception 0xc0000005 0x0 0x7ffc3f910fff 0x21bff2b0000
PC=0x21bff2b0000

syscall.loadsystemlibrary(0xc00004d920, 0xc0000496c0, 0xc0000496c0, 0x20)
runtime/syscall_windows.go:136 +0xe7
syscall.LoadDLL(0x26afe26, 0xb, 0xc000084000, 0xc00005c000, 0xc0000d5ac0)
syscall/dll_windows.go:81 +0x16a
syscall.(*LazyDLL).Load(0xc0000041a0, 0x0, 0x0)
syscall/dll_windows.go:245 +0xc8
syscall.(*LazyProc).Find(0xc0000a3b00, 0x0, 0x0)
syscall/dll_windows.go:300 +0xbf
syscall.(*LazyProc).mustFind(...)
syscall/dll_windows.go:318
syscall.(*LazyProc).Addr(...)
syscall/dll_windows.go:327
syscall.GetUserProfileDirectory(0x160, 0xc0000e2340, 0xc0000d5ba0, 0xc0000e2340, 0x21bd9dcb4e0)
syscall/zsyscall_windows.go:1910 +0x3e
syscall.Token.GetUserProfileDirectory(0x160, 0xc000046ed0, 0x2c, 0x0, 0x0)
syscall/security_windows.go:368 +0x8f
os/user.current(0x0, 0x0, 0x0)
os/user/lookup_windows.go:217 +0x1c7
os/user.Current.func1()
os/user/lookup.go:15 +0x29
sync.(*Once).doSlow(0x40bae40, 0x2859570)
sync/once.go:66 +0xf7
sync.(*Once).Do(...)
sync/once.go:57
os/user.Current(0xc00004f8d0, 0xa, 0x26335d5)
os/user/lookup.go:15 +0x105
k8s.io/klog.init.1()
k8s.io/[email protected]/klog_file.go:58 +0x4b

goroutine 6 [chan receive]:
k8s.io/klog.(*loggingT).flushDaemon(0x40bc1a0)
k8s.io/[email protected]/klog.go:1010 +0x92
created by k8s.io/klog.init.0
k8s.io/[email protected]/klog.go:411 +0xdd
rax 0x7ffc3cd25894
rbx 0x7ffc3cd25892
rcx 0x41
rdi 0xffffffffffbadd11
rsi 0x0
rbp 0x0
rsp 0x705e3fefc0
r8 0x0
r9 0x0
r10 0x0
r11 0x97c
r12 0xc000007a
r13 0x0
r14 0x7ffc3cd25894
r15 0x7ffc3f710000
rip 0x21bff2b0000
rflags 0x10202
cs 0x33
fs 0x53
gs 0x2b

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.