PageSourceSearch

https://www.twingate.com/docs-assets/ac4686d/docs/component---src-…s-kubectl-index-mdx-ee06efd9e199d1596ada.js

js twingate.com collected 2026-10-01 08:51:27 UTC 8,903 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunktwingate_homepage=self.webpackChunktwingate_homepage||[]).push([[8675],{45745:function(e,t,n){n.r(t),n.d(t,{Head:function(){return P},default:function(){return L}});var l=n(96540),a=n(28453);function o(e){const t=Object.assign({h2:"h2",a:"a",span:"span",code:"code",blockquote:"blockquote",p:"p",strong:"strong",ol:"ol",li:"li",pre:"pre"},(0,a.RP)(),e.components);return l.createElement(l.Fragment,null,l.createElement(t.h2,{id:"securely-manage-a-k8s-cluster-using-kubectl",style:{position:"relative"}},l.createElement(t.a,{href:"#securely-manage-a-k8s-cluster-using-kubectl","aria-label":"securely manage a k8s cluster using kubectl permalink",className:"remark-autolink-anchor before"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3771 7.86873C14.1377 7.10819 15.3708 7.10819 16.1313 7.86873C16.8918 8.62927 16.8918 9.86235 16.1313 10.6229L14.2952 12.459C14.0417 12.7125 14.0417 13.1235 14.2952 13.3771C14.5487 13.6306 14.9597 13.6306 15.2132 13.3771L17.0493 11.5409C18.3169 10.2734 18.3169 8.21824 17.0493 6.95068C15.7818 5.68311 13.7266 5.68311 12.4591 6.95068L10.623 8.78678C10.3695 9.0403 10.3695 9.45132 10.623 9.70484C10.8765 9.95835 11.2875 9.95835 11.541 9.70484L13.3771 7.86873Z" fill="#A1A1AA"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.1639 13.8361C9.9104 13.5826 9.9104 13.1716 10.1639 12.9181L12.9181 10.1639C13.1716 9.9104 13.5826 9.9104 13.8361 10.1639C14.0896 10.4174 14.0896 10.8285 13.8361 11.082L11.082 13.8361C10.8285 14.0896 10.4174 14.0896 10.1639 13.8361Z" fill="#A1A1AA"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7.86873 13.3771C7.10819 14.1377 7.10819 15.3707 7.86873 16.1313C8.62927 16.8918 9.86235 16.8918 10.6229 16.1313L12.459 14.2952C12.7125 14.0417 13.1235 14.0417 13.3771 14.2952C13.6306 14.5487 13.6306 14.9597 13.3771 15.2132L11.5409 17.0493C10.2734 18.3169 8.21824 18.3169 6.95068 17.0493C5.68311 15.7818 5.68311 13.7266 6.95068 12.4591L8.78678 10.623C9.0403 10.3694 9.45132 10.3694 9.70484 10.623C9.95835 10.8765 9.95835 11.2875 9.70484 11.541L7.86873 13.3771Z" fill="#A1A1AA"/></svg>'}})),"Securely manage a K8s cluster using ",l.createElement(t.code,null,"kubectl")),"\n",l.createElement(t.blockquote,null,"\n",l.createElement(t.p,null,l.createElement(t.strong,null,"Use case"),": You’d like to use Twingate to manage services on a K8S Cluster using ",l.createElement(t.code,null,"kubectl")," without exposing your cluster’s API endpoint to the public Internet."),"\n"),"\n",l.createElement(t.ol,null,"\n",l.createElement(t.li,null,l.createElement(t.strong,null,l.createElement(t.a,{href:"/docs-assets/ac4686d/docs/connectors"},"Deploy Connector(s)")," outside the target K8s cluster"),". This Connector will be used to secure access to your cluster’s API endpoint. The only requirement is that the Connector must have network access to the API endpoint. Neither the Connector nor the API endpoint should be accessible from the public Internet."),"\n",l.createElement(t.li,null,l.createElement(t.strong,null,"Create a ",l.createElement(t.a,{href:"/docs-assets/ac4686d/docs/resources"},"new Twingate Resource")," with the cluster’s API endpoint address")," (eg. ",l.createElement(t.code,null,"10.1.1.15"),"). This will allow ",l.createElement(t.code,null,"kubectl")," to connect to the API endpoint while connected to Twingate."),"\n",l.createElement(t.li,null,"On your local machine where you are using ",l.createElement(t.code,null,"kubectl"),", ",l.createElement(t.strong,null,"modify your ",l.createElement(t.code,null,"kubectl")," configuration to connect to the API endpoint address you configured in the previous step"),". Although this address is not directly accessible from your local machine, while connected to Twingate, we will automatically proxy traffic to the API endpoint via the Connector you deployed in the first step."),"\n"),"\n",l.createElement(t.pre,null,l.createElement(t.code,{className:"language-bash"},"# Example kubectl config command\n# 10.1.1.15 is an example private K8s API endpoint defined as a Resource in Twingate\n\nkubectl config set-cluster example-cluster --server=https://10.1.1.15\n")),"\n",l.createElement(t.p,null,"As long as you are connected to Twingate, and you are authorized to access to the K8s cluster’s API endpoint Resource, you will be able to use ",l.createElement(t.code,null,"kubectl")," to manage your K8s cluster securely without setting up a separate K8s proxy."))}var i=function(e){void 0===e&&(e={});const{wrapper:t}=Object.assign({},(0,a.RP)(),e.components);return t?l.createElement(t,e,l.createElement(o,e)):o(e)}
1,r=n(35309),s=n(71623),c=n(84343),u=n(48291),d=n(17816),p=n(75131),m=n(22792),h=n(43611),g=n(63377),x=n(42452),f=n(1805),v=n(2976),b=n(64190),w=n(83900),C=n(43285),k=n(22009),y=n(28789),j=n(61540),E=n(21145),A=n(16204),I=n(35935),T=n(74848);function P(e){var t,n,l,a,o,i;const{data:r,location:c,pageContext:d}=e,{mdx:m,docsSocialImage:h}=r,g=null==m||null===(t=m.frontmatter)||void 0===t?void 0:t.title,x=(null==m||null===(n=m.frontmatter)||void 0===n?void 0:n.description)||(null==m||null===(l=m.frontmatter)||void 0===l?void 0:l.subtitle),f=null==m||null===(a=m.frontmatter)||void 0===a?void 0:a.keywords,{docsMetadata:v}=(0,A.M)(),b=x||(null==v?void 0:v.description),w=(0,I.f)((0,p.Z)(m),null!==(o=d.navigationTree)&&void 0!==o?o:[],g),k=w.length>1;return(0,T.jsxs)(C.k,{title:g,description:b,keywords:f,pathname:c.pathname,image:null==h||null===(i=h.childImageSharp)||void 0===i?void 0:i.original,children:[(0,T.jsx)(s.d,{mdx:m,pathname:c.pathname,description:b,hasBreadcrumb:k}),(0,T.jsx)(u.g,{path:w,pathname:c.pathname})]})}function S(e){var t,n,l;const{children:a,data:o,pageContext:i,location:s}=e,{mdx:u}=o,{navigationTree:C}=i,A=(0,k._)(),P=null==u?void 0:u.frontmatter,S="two-column"===(null==P||null===(t=P.docs)||void 0===t?void 0:t.layout),L=`https://www.twingate.com${s.pathname}`;let O=null!==(n=null==P||null===(l=P.docs)||void 0===l?void 0:l.aiPrompt)&&void 0!==n?n:`Take a look at this page: ${L} and walk me through it`;O.includes("{{url}}")&&(O=O.replace("{{url}}",L));const R=[{id:"open-chatgpt",icon:(0,T.jsx)(y.IconChatGPT,{}),label:"Open in ChatGPT",description:"Ask questions about this page",href:`https://chatgpt.com/?hints=search&q=${encodeURIComponent(O)}`},{id:"open-claude",icon:(0,T.jsx)(j.IconClaude,{}),label:"Open in Claude",description:"Ask questions about this page",href:`https://claude.ai/new?q=${encodeURIComponent(O)}`}],q=(0,p.Z)(u),B=null==P?void 0:P.title,K=(0,I.f)(q,C,B),{isVideoOverlayOpen:M}=A;return(0,T.jsx)(k.jx,{value:A,children:(0,T.jsxs)(g.P,{children:[(0,T.jsx)(E.R,{currentPath:K,navItems:C,pathname:s.pathname,visibility:["visible","visible","hidden"],height:["auto","auto",0]}),(0,T.jsx)(f.a,{as:"section",paddingTopSpacing:[3,4,6],paddingBottomSpacing:[4,0],boxSizing:"content-box",children:(0,T.jsx)(v.m,{maxWidth:"xl",disableGutters:!0,children:(0,T.jsxs)(b.x,{gridGap:["0","0","2rem","4rem","6rem","9rem"],gridTemplateColumns:["repeat(12, 1fr)","repeat(12, 1fr)","248px minmax(0, 1fr) 240px","248px minmax(0, 1fr) 240px","248px minmax(0, 1fr) 240px"],children:[(0,T.jsx)(f.a,{display:["none","none","block"],gridColumn:"1 / span 1",height:"calc(100vh - 5rem - 3rem)",overflow:"auto",position:"sticky",top:"7rem",children:(0,T.jsx)(m.S,{overflow:"hidden",pathname:s.pathname,items:C,paddingRightSpacing:[0,0],paddingBottomSpacing:2})}),(0,T.jsxs)(f.a,{gridColumn:["1 / span 12","1 / span 12","2 / span 2",S?"2 / span 2":"2 / span 1"],style:{maxWidth:"840px"},children:[(0,T.jsxs)(f.a,{display:"flex",flexDirection:["column-reverse","row","row","column"],justifyContent:["flex-start","space-between","space-between","flex-start"],marginBottomSpacing:[2,3,2,0],children:[(0,T.jsx)(f.a,{children:(0,T.jsx)(r.n,{mdx:u,path:K})}),!S&&(0,T.jsx)(f.a,{display:["block","block","block","none"],marginTopSpacing:[1,2,5],children:(0,T.jsx)(x.W,{items:R,triggerLabel:"Open with AI"})})]}),M&&(0,T.jsx)(f.a,{position:"absolute",width:"100%",height:"100%",left:"0",right:"0",top:"0",children:(0,T.jsx)(h.O,{})}),a&&(0,T.jsx)(f.a,{marginTopSpacing:4,marginBottomSpacing:7,children:(0,T.jsx)(w.b,{children:a})}),(0,T.jsx)(c.n,{mdx:u})]}),!S&&(0,T.jsx)(f.a,{display:["none","none","none","block"],gridColumn:"3 / span 1",children:(0,T.jsxs)(f.a,{position:"sticky",top:"7rem",children:[(0,T.jsx)(f.a,{marginBottomSpacing:3,marginTopSpacing:1,children:(0,T.jsx)(x.W,{items:R,triggerLabel:"Open with AI"})}),(0,T.jsx)(d.M,{mdx:u,locationHash:s.hash})]})})]})})})]})})}function L(e){return l.createElement(S,e,l.createElement(i,e))}}}]);
2//# sourceMappingURL=component---src-templates-docs-mdx-page-template-tsx-content-file-path-content-docs-2-private-access-7-kubernetes-k-8-s-kubectl-index-mdx-ee06efd9e199d1596ada.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.