1"use strict";(self.webpackChunk_okteto_website_docs=self.webpackChunk_okteto_website_docs||[]).push([[6428],{12455:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"core/credentials/environment-variables","title":"Environment Variables","description":"Specify your credentials using environment variables","source":"@site/src/content/core/credentials/environment-variables.mdx","sourceDirName":"core/credentials","slug":"/core/credentials/environment-variables","permalink":"/docs/1.49/core/credentials/environment-variables","draft":false,"unlisted":false,"editUrl":"https://github.com/okteto/docs/edit/main/src/content/core/credentials/environment-variables.mdx","tags":[],"version":"current","frontMatter":{"title":"Environment Variables","description":"Specify your credentials using environment variables","sidebar_label":"Environment Variables","id":"environment-variables"},"sidebar":"docs","previous":{"title":"Personal Access Tokens","permalink":"/docs/1.49/core/credentials/personal-access-tokens"},"next":{"title":"Automatic SSL","permalink":"/docs/1.49/core/endpoints/automatic-ssl"}}');var r=s(74848),t=s(28453);const o={title:"Environment Variables",description:"Specify your credentials using environment variables",sidebar_label:"Environment Variables",id:"environment-variables"},a=void 0,c={},l=[{value:"Reserved Variables",id:"reserved-variables",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Environment Variables provide another way to specify your credentials. This is the recommended method when scripting tasks or when ",(0,r.jsx)(n.a,{href:"/docs/1.49/previews/",children:"creating Preview Environments"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"The supported environment variables are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"OKTETO_TOKEN"}),": Specifies the ",(0,r.jsx)(n.a,{href:"/docs/1.49/core/credentials/personal-access-tokens",children:"Personal Access Token"})," or ",(0,r.jsx)(n.a,{href:"/docs/1.49/admin/dashboard#admin-access-tokens",children:"Admin Access Token"})," to use (Required)"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"OKTETO_CONTEXT"}),": Specifies the Okteto URL (Required)"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"OKTETO_NAMESPACE"}),": Specifies the Namespace to use. If missing, it defaults to the Namespace of the current context (Optional)"]}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["You can use the ",(0,r.jsx)(n.code,{children:".env"})," file to store your credentials. See ",(0,r.jsx)(n.a,{href:"/docs/1.49/core/okteto-variables",children:"Okteto Variables"})," to learn more."]})}),"\n",(0,r.jsx)(n.h2,{id:"reserved-variables",children:"Reserved Variables"}),"\n",(0,r.jsx)(n.p,{children:"Certain variable names are reserved for use by the Okteto Platform only. These reserved variables can be used within the supported settings mentioned above but should not be used outside of them."}),"\n",(0,r.jsx)(n.p,{children:"This applies to:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Admin Variables"}),"\n",(0,r.jsx)(n.li,{children:"User Variables"}),"\n",(0,r.jsx)(n.li,{children:"Catalog Variables"}),"\n",(0,r.jsx)(n.li,{children:"Variables defined at deployment time"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The reserved variable names are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"OKTETO_NAMESPACE"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"OKTETO_CONTEXT"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"OKTETO_TOKEN"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"OKTETO_URL"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var i=s(96540);const r={},t=i.createContext(r);function o(e){const n=i.useContext(t);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]);
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.