[{"data":1,"prerenderedAt":722},["ShallowReactive",2],{"navigation_docs_en":3,"-en-shared-environments-connecting":175,"-en-shared-environments-connecting-surround":717},[4,35,64,86,108,135,150],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Quick Start",false,"/en/quick-start","en/1.quick-start",[10,15,20,25,30],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","/en/quick-start/introduction","en/1.quick-start/1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","/en/quick-start/installation","en/1.quick-start/2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Getting Started","/en/quick-start/getting-started","en/1.quick-start/3.getting-started","i-lucide-rocket",{"title":26,"path":27,"stem":28,"icon":29},"Docker Desktop Extension","/en/quick-start/docker-desktop-extension","en/1.quick-start/4.docker-desktop-extension","i-simple-icons-docker",{"title":31,"path":32,"stem":33,"icon":34},"CLI","/en/quick-start/cli","en/1.quick-start/5.cli","i-lucide-square-terminal",{"title":36,"path":37,"stem":38,"children":39,"page":6},"Local Environments","/en/local-environments","en/2.local-environments",[40,43,48,52,56,60],{"title":21,"path":41,"stem":42,"icon":24},"/en/local-environments/getting-started","en/2.local-environments/1.getting-started",{"title":44,"path":45,"stem":46,"icon":47},"Colima Kubernetes","/en/local-environments/colima","en/2.local-environments/2.colima","i-simple-icons-kubernetes",{"title":49,"path":50,"stem":51,"icon":29},"Docker Desktop Kubernetes (OSX)","/en/local-environments/docker-desktop-osx","en/2.local-environments/3.docker-desktop-osx",{"title":53,"path":54,"stem":55},"k3d","/en/local-environments/k3d","en/2.local-environments/4.k3d",{"title":57,"path":58,"stem":59},"kind","/en/local-environments/kind","en/2.local-environments/5.kind",{"title":61,"path":62,"stem":63},"minikube","/en/local-environments/minikube","en/2.local-environments/5.minikube",{"title":65,"path":66,"stem":67,"children":68,"page":6},"Shared Environments","/en/shared-environments","en/3.shared-environments",[69,72,76,81],{"title":21,"path":70,"stem":71,"icon":24},"/en/shared-environments/getting-started","en/3.shared-environments/1.getting-started",{"title":73,"path":74,"stem":75,"icon":19},"Installing Gefyra in a Cluster","/en/shared-environments/installation","en/3.shared-environments/2.installation",{"title":77,"path":78,"stem":79,"icon":80},"Managing Gefyra Clients","/en/shared-environments/clients","en/3.shared-environments/3.clients","i-lucide-computer",{"title":82,"path":83,"stem":84,"icon":85},"Connecting to Gefyra","/en/shared-environments/connecting","en/3.shared-environments/4.connecting","i-lucide-link",{"title":87,"path":88,"stem":89,"children":90,"page":6},"Remote K8s","/en/remote-k8s","en/4.remote-k8s",[91,94,99,104],{"title":21,"path":92,"stem":93,"icon":24},"/en/remote-k8s/getting-started","en/4.remote-k8s/1.getting-started",{"title":95,"path":96,"stem":97,"icon":98},"Google Cloud Platform (GCP)","/en/remote-k8s/gcp","en/4.remote-k8s/2.gcp","i-material-icon-theme:gcp",{"title":100,"path":101,"stem":102,"icon":103},"Elastic Kubernetes Service (EKS)","/en/remote-k8s/eks","en/4.remote-k8s/3.eks","i-simple-icons-amazoneks",{"title":105,"path":106,"stem":107,"icon":47},"SysEleven MetaKubde Kubernetes","/en/remote-k8s/sys11","en/4.remote-k8s/4.sys11",{"title":109,"path":110,"stem":111,"children":112,"page":6},"Use Cases and Demos","/en/usecases-and-demos","en/5.usecases-and-demos",[113,116,121,126,130],{"title":21,"path":114,"stem":115,"icon":24},"/en/usecases-and-demos/getting-started","en/5.usecases-and-demos/1.getting-started",{"title":117,"path":118,"stem":119,"icon":120},"Developing Go Applications with Gefyra","/en/usecases-and-demos/golang","en/5.usecases-and-demos/2.golang","i-simple-icons-go",{"title":122,"path":123,"stem":124,"icon":125},"OAuth2 Demo with a Sidecar","/en/usecases-and-demos/oauth2-demo","en/5.usecases-and-demos/3.oauth2-demo","i-devicon-plain:oauth",{"title":127,"path":128,"stem":129,"icon":98},"Remote Development on Google Kubernetes Engine","/en/usecases-and-demos/remote-gke","en/5.usecases-and-demos/4.remote-gke",{"title":131,"path":132,"stem":133,"icon":134},"Run an Ubuntu Container instance","/en/usecases-and-demos/ubuntu-in-namespace","en/5.usecases-and-demos/5.ubuntu-in-namespace","i-simple-icons-ubuntu",{"title":136,"path":137,"stem":138,"children":139,"page":6},"Technical Details","/en/technical-details","en/6.technical-details",[140,145],{"title":141,"path":142,"stem":143,"icon":144},"Architecture","/en/technical-details/architecture","en/6.technical-details/1.architecture","i-lucide-square-chevron-right",{"title":146,"path":147,"stem":148,"icon":149},"What is Gefyra?","/en/technical-details/what-is-gefyra","en/6.technical-details/2.what-is-gefyra","i-lucide-circle-question-mark",{"title":151,"path":152,"stem":153,"children":154,"page":6},"Information","/en/information","en/7.information",[155,160,165,170],{"title":156,"path":157,"stem":158,"icon":159},"Run vs. Bridge","/en/information/run-vs-bridge","en/7.information/1.run-vs-bridge","i-lucide-git-compare-arrows",{"title":161,"path":162,"stem":163,"icon":164},"What changed in Gefyra 2?","/en/information/v1-vs-v2","en/7.information/2.v1-vs-v2","i-lucide-history",{"title":166,"path":167,"stem":168,"icon":169},"Media","/en/information/media","en/7.information/3.media","i-lucide-play",{"title":171,"path":172,"stem":173,"icon":174},"About","/en/information/about","en/7.information/4.about","i-lucide-info",{"id":176,"title":82,"body":177,"description":710,"extension":711,"links":712,"meta":713,"navigation":714,"path":83,"seo":715,"stem":84,"__hash__":716},"docs_en/en/3.shared-environments/4.connecting.md",{"type":178,"value":179,"toc":700},"minimark",[180,188,193,215,219,232,237,254,262,392,399,417,424,442,448,464,471,480,484,487,530,544,548,551,565,575,582,592,596,606,613,636,639,686,689,693,696],[181,182,183,184],"tip",{},"If you have a Gefyra client file and want to connect to a shared Kubernetes cluster,\njust run ",[185,186,187],"code",{},"gefyra connections connect -f \u003Cfile>",[189,190,192],"h2",{"id":191},"prerequisites","Prerequisites",[194,195,196,205,208],"ul",{},[197,198,199,200,204],"li",{},"Gefyra is ",[201,202,203],"a",{"href":17},"available"," (at least in version 2.0.0)",[197,206,207],{},"A running Docker host on the machine that connects",[197,209,210,211],{},"A Gefyra ",[201,212,214],{"href":213},"/en/shared-environments/clients#a-default-client-file","client file",[189,216,218],{"id":217},"managing-connections","Managing connections",[220,221,222,223,226,227,231],"p",{},"Client connections to a Gefyra cluster are managed with the ",[185,224,225],{},"gefyra connections"," command group.\nThe connection itself consists of a file, that is located in a local user directory, and ",[228,229,230],"em",{},"usually"," a Docker container that acts as a VPN endpoint on a local machine.",[233,234,236],"h3",{"id":235},"connect","Connect",[238,239,240,241,244,245,248,249,253],"note",{},"You can only connect to a Gefyra cluster with a ",[201,242,214],{"href":243},"/en/shared-environments/clients#distributing-the-client-file",". If you don't have such a client file, either ",[201,246,247],{"href":74},"set up Gefyra in a Kubernetes cluster"," and create yourself ",[201,250,252],{"href":251},"/en/shared-environments/clients#creating-a-gefyra-client","a Gefyra client",", or find the responsible person and ask for access.",[220,255,256,257,261],{},"Establishing a connection (",[258,259,260],"strong",{},"for the first time",") to Gefyra works like this:",[263,264,269],"pre",{"className":265,"code":266,"language":267,"meta":268,"style":268},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","> gefyra connections connect -f myfancyclient.json\n\nCreating the cluster connection 'default' |   ▶▶▶▶▶▶▶          | / 0 in 28s\n\nConnection established with connection name 'default'. Run 'gefyra connections list' to see all connections.\n","sh","",[185,270,271,284,291,339,344],{"__ignoreMap":268},[272,273,276,280],"span",{"class":274,"line":275},"line",1,[272,277,279],{"class":278},"sMK4o",">",[272,281,283],{"class":282},"sTEyZ"," gefyra connections connect -f myfancyclient.json\n",[272,285,287],{"class":274,"line":286},2,[272,288,290],{"emptyLinePlaceholder":289},true,"\n",[272,292,294,298,302,305,308,311,314,317,320,323,326,329,333,336],{"class":274,"line":293},3,[272,295,297],{"class":296},"sBMFI","Creating",[272,299,301],{"class":300},"sfazB"," the",[272,303,304],{"class":300}," cluster",[272,306,307],{"class":300}," connection",[272,309,310],{"class":278}," '",[272,312,313],{"class":300},"default",[272,315,316],{"class":278},"'",[272,318,319],{"class":278}," |",[272,321,322],{"class":296},"   ▶▶▶▶▶▶▶",[272,324,325],{"class":278},"          |",[272,327,328],{"class":296}," /",[272,330,332],{"class":331},"sbssI"," 0",[272,334,335],{"class":300}," in",[272,337,338],{"class":300}," 28s\n",[272,340,342],{"class":274,"line":341},4,[272,343,290],{"emptyLinePlaceholder":289},[272,345,347,350,353,356,358,361,363,365,367,370,373,375,378,380,383,386,389],{"class":274,"line":346},5,[272,348,349],{"class":296},"Connection",[272,351,352],{"class":300}," established",[272,354,355],{"class":300}," with",[272,357,307],{"class":300},[272,359,360],{"class":300}," name",[272,362,310],{"class":278},[272,364,313],{"class":300},[272,366,316],{"class":278},[272,368,369],{"class":300},".",[272,371,372],{"class":300}," Run",[272,374,310],{"class":278},[272,376,377],{"class":300},"gefyra connections list",[272,379,316],{"class":278},[272,381,382],{"class":300}," to",[272,384,385],{"class":300}," see",[272,387,388],{"class":300}," all",[272,390,391],{"class":300}," connections.\n",[220,393,394,395,398],{},"This example assumes, there is a client that provides the client file ",[228,396,397],{},"myfancyclient.json",". A couple of things happened during this process:",[400,401,402,405,411,414],"ol",{},[197,403,404],{},"Gefyra fetched the ad-hoc VPN credentials for this connection",[197,406,407,408,410],{},"A container for the Gefyra connection with name ",[228,409,313],{}," has been started",[197,412,413],{},"A dedicated Docker network has been created",[197,415,416],{},"The connection was successfully checked",[220,418,419,420,423],{},"If you check your Docker host, you will find a container named ",[185,421,422],{},"gefyra-cargo-default"," running. That's the gateway into the cluster.",[425,426,427,428,431,432,434,435,437,438,369],"warning",{},"Since we didn't specify a ",[228,429,430],{},"connection name"," and there was no ",[228,433,313],{}," connection available before, creating it was successful. However, there is only one ",[228,436,313],{}," connection on a client machine. Additional connections must ",[201,439,441],{"href":440},"#connection-names","be assigned a name",[220,443,444,445,447],{},"Once you have a stopped connection, you don't need the client file anymore to connect. Just run the following with the ",[228,446,313],{}," connection:",[263,449,451],{"className":265,"code":450,"language":267,"meta":268,"style":268},"gefyra connections connect\n",[185,452,453],{"__ignoreMap":268},[272,454,455,458,461],{"class":274,"line":275},[272,456,457],{"class":296},"gefyra",[272,459,460],{"class":300}," connections",[272,462,463],{"class":300}," connect\n",[220,465,466,467,470],{},"The Gefyra connection will be back up in no time. Of course, if you do have multiple connections, you have to specify the connection name with the ",[185,468,469],{},"--connection-name"," option.",[425,472,473,474,476,477,479],{},"After you successfully connected a machine with a Gefyra cluster, the ",[228,475,214],{}," is typically superseded at that point. Gefyra stores the credentials from the file elsewhere, so a user doesn't have to handle the file. However, if you remove your connection and want to reconnect to the cluster (assuming the Gefyra client is still the same) you may connect to the cluster with that file again. Yet, you can also request a new one, which is safer than having a ",[228,478,214],{}," dangling.",[233,481,483],{"id":482},"listing-connections","Listing connections",[220,485,486],{},"To see all Gefyra connections on a local machine, please run the following:",[263,488,490],{"className":265,"code":489,"language":267,"meta":268,"style":268},"> gefyra connections list\n\nNAME     VERSION    CREATED                         STATUS\ndefault  2.0.0      2023-10-10T18:36:15.519969679Z  running\n",[185,491,492,499,503,517],{"__ignoreMap":268},[272,493,494,496],{"class":274,"line":275},[272,495,279],{"class":278},[272,497,498],{"class":282}," gefyra connections list\n",[272,500,501],{"class":274,"line":286},[272,502,290],{"emptyLinePlaceholder":289},[272,504,505,508,511,514],{"class":274,"line":293},[272,506,507],{"class":296},"NAME",[272,509,510],{"class":300},"     VERSION",[272,512,513],{"class":300},"    CREATED",[272,515,516],{"class":300},"                         STATUS\n",[272,518,519,521,524,527],{"class":274,"line":341},[272,520,313],{"class":296},[272,522,523],{"class":331},"  2.0.0",[272,525,526],{"class":300},"      2023-10-10T18:36:15.519969679Z",[272,528,529],{"class":300},"  running\n",[220,531,532,533,536,537,540,541,369],{},"You will find the status of all of your connections here. It can be ",[185,534,535],{},"running",", ",[185,538,539],{},"stopped"," or ",[185,542,543],{},"error",[233,545,547],{"id":546},"disconnect","Disconnect",[220,549,550],{},"To actively disconnect from the cluster, you run this command:",[263,552,554],{"className":265,"code":553,"language":267,"meta":268,"style":268},"gefyra connections stop\n",[185,555,556],{"__ignoreMap":268},[272,557,558,560,562],{"class":274,"line":275},[272,559,457],{"class":296},[272,561,460],{"class":300},[272,563,564],{"class":300}," stop\n",[220,566,567,568,570,571,574],{},"This assumes you have a ",[228,569,313],{}," connection currently running. If not, you have to provide a valid connection name with the ",[185,572,573],{},"[connection-name]"," argument.",[220,576,577,578,581],{},"You will find this connection to be stopped from the client's side. However, if you want to reconnect to the cluster, you can now run ",[185,579,580],{},"gefyra connections connect"," again. The connection process will be superfast this time.",[238,583,584,585,588,589,591],{},"If you want to delete a connection, and thus release the Gefyra client in the cluster, you can run ",[185,586,587],{},"gefyra connections remove",". If you want to reconnect later, you will need a ",[228,590,214],{}," again.",[233,593,595],{"id":594},"connection-names","Connection Names",[220,597,598,599,601,602,605],{},"You can assign (and have to) names to your connections if you have more than one. Almost all commands of the Gefyra CLI support the ",[185,600,469],{}," option to specify the connection a certain command is targeting. Most importantly, for ",[185,603,604],{},"gefyra run --connection-name"," you specify to which cluster a local container is connected.",[220,607,608,609,612],{},"To create a new connection with a name (in this example ",[185,610,611],{},"my-conn1","), please run the following to set up a connection with a given name:",[263,614,616],{"className":265,"code":615,"language":267,"meta":268,"style":268},"gefyra connections connect --connection-name my-conn1 ... \n",[185,617,618],{"__ignoreMap":268},[272,619,620,622,624,627,630,633],{"class":274,"line":275},[272,621,457],{"class":296},[272,623,460],{"class":300},[272,625,626],{"class":300}," connect",[272,628,629],{"class":300}," --connection-name",[272,631,632],{"class":300}," my-conn1",[272,634,635],{"class":300}," ...\n",[220,637,638],{},"The connection will show up in the connection list:",[263,640,642],{"className":265,"code":641,"language":267,"meta":268,"style":268},"> gefyra connections list\n\nNAME     VERSION    CREATED                         STATUS\ndefault  2.0.0      2023-10-10T18:36:15.519969679Z  running\nmy-conn1 2.0.1      2023-10-12T12:14:11.48715/726Z  running\n",[185,643,644,650,654,664,674],{"__ignoreMap":268},[272,645,646,648],{"class":274,"line":275},[272,647,279],{"class":278},[272,649,498],{"class":282},[272,651,652],{"class":274,"line":286},[272,653,290],{"emptyLinePlaceholder":289},[272,655,656,658,660,662],{"class":274,"line":293},[272,657,507],{"class":296},[272,659,510],{"class":300},[272,661,513],{"class":300},[272,663,516],{"class":300},[272,665,666,668,670,672],{"class":274,"line":341},[272,667,313],{"class":296},[272,669,523],{"class":331},[272,671,526],{"class":300},[272,673,529],{"class":300},[272,675,676,678,681,684],{"class":274,"line":346},[272,677,611],{"class":296},[272,679,680],{"class":331}," 2.0.1",[272,682,683],{"class":300},"      2023-10-12T12:14:11.48715/726Z",[272,685,529],{"class":300},[220,687,688],{},"You can manage connections based on the local names, i.e. halt the connection, reconnect, remove it, and run containers with it.",[189,690,692],{"id":691},"simultaneous-connections","Simultaneous Connections",[220,694,695],{},"As you can see above, it is possible to create a list of connections simultaneously. They can be individually managed, like started and stopped, even at the same time.\nIt is possible to have multiple connections to one cluster, too.",[697,698,699],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":268,"searchDepth":286,"depth":286,"links":701},[702,703,709],{"id":191,"depth":286,"text":192},{"id":217,"depth":286,"text":218,"children":704},[705,706,707,708],{"id":235,"depth":293,"text":236},{"id":482,"depth":293,"text":483},{"id":546,"depth":293,"text":547},{"id":594,"depth":293,"text":595},{"id":691,"depth":286,"text":692},"Connecting to a Gefyra-enabled Kubernetes cluster is the process of any Gefyra client to establish a networking connection based on Wireguard VPN to a cluster. It is a multistep process that involves the dynamic creation of connection credentials and IP-range negotiation between cluster and client. The network connection is persistent for the session, rock-solid and blazingly fast.","md",null,{},{"icon":85},{"title":82,"description":710},"zzD4iVepzeb9VQcJ8w3U1Zddo3pYprp5KJ9ZNgkQgv8",[718,720],{"title":77,"path":78,"stem":79,"description":719,"icon":80,"children":-1},"Gefyra introduces the concept of Gefyra Clients. These are objects to manage and distribute access to the cluster.",{"title":21,"path":92,"stem":93,"description":721,"icon":24,"children":-1},"This chapter contains guides on how to set up shared remote Kubernetes for Gefyra. These guides are for multiple clients use cases.",1775752109120]