How to connect VSCode with Workspace?I'm using kubernetes templates. Anyone have guide?
.
24 Replies
IDEs - Coder v2 main docs
Learn how to use your IDE of choice with Coder
Could not establish connection to our workspace. Could you please advise me about fix it?thank
Have you downloaded the CLI binary for your platform (https://github.com/coder/coder/releases) and run
coder config-ssh
?GitHub
Releases · coder/coder
A tool that provisions remote development environments via Terraform - coder/coder
IDEs - Coder v2 main docs
Learn how to use your IDE of choice with Coder
@Cian coder is install and I can ssh from my terminal but cannot connect from VSCode
Is
tar
available in your workspace?Could this be one of the reasons?
That looks like a smoking gun to me. What are the perms on that folder?
@Cian I have deploy coder on K8s and this is a folder of workspace
Can you show the YAML for your workspace's PersistentVolumeClaim?
you can see @Cian
Sorry, coffee hasn't kicked in yet. The
fsGroup
would be specified in the spec.SecurityContext
of your pod.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/Kubernetes
Configure a Security Context for a Pod or Container
A security context defines privilege and access control settings for a Pod or Container. Security context settings include, but are not limited to:
Discretionary Access Control: Permission to access an object, like a file, is based on user ID (UID) and group ID (GID).
Security Enhanced Linux (SELinux): Objects are assigned security labels.
Runni...
What kind of storageClass are you using?
this is my storageclass @Cian
I'm using helm to deploy coder pod
So this is using the local-static-provisioner (https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) correct?
GitHub
GitHub - kubernetes-sigs/sig-storage-local-static-provisioner: Stat...
Static provisioner of local volumes. Contribute to kubernetes-sigs/sig-storage-local-static-provisioner development by creating an account on GitHub.
@Cian I run command "chown -R 1000:1000 my-folder" and then it working well
Yes, that will fix the issue temporarily
My guess is that you would need to set
fsGroup
on your pod spec, and then hopefully Kubernetes would do that for youYes, I think so that 👍
Btw how can I connect with git or source control ?
Do you mean just cloning repositories to your workspace, or do you mean GitHub login with OAuth?
Coder generates an SSH key for you, you can get it from your.coder.instance/settings/ssh-keys and then add it to GitHub or wherever you need
Do you have a guide for both? thank
GitHub auth: https://coder.com/docs/coder-oss/latest/admin/auth#github
User SSH key: https://coder.com/docs/coder-oss/latest/secrets#ssh-keys
Secrets - Coder v2 main docs
Learn how to use secrets in your workspace
Authentication - Coder v2 main docs
Learn how to set up authentication using GitHub or OpenID Connect
@Cian How to version control of git project if I update source code on VSCode? And how to commit on git repo?
It should "just work" with regular Git commands. Coder sets the
GIT_SSH_COMMAND
for you so you end up using your Git SSH key inside the workspace