8 lines
2.6 KiB
HTML
8 lines
2.6 KiB
HTML
<html><head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>6. Namespace</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="multi_spring-cloud-kubernetes.html" title="Spring Cloud Kubernetes"><link rel="up" href="multi__security_configurations_inside_kubernetes.html" title="Part VII. Security Configurations inside Kubernetes"><link rel="prev" href="multi__security_configurations_inside_kubernetes.html" title="Part VII. Security Configurations inside Kubernetes"><link rel="next" href="multi__service_account.html" title="7. Service Account"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6. Namespace</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__security_configurations_inside_kubernetes.html">Prev</a> </td><th width="60%" align="center">Part VII. Security Configurations inside Kubernetes</th><td width="20%" align="right"> <a accesskey="n" href="multi__service_account.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="_namespace" href="#_namespace"></a>6. Namespace</h2></div></div></div><p>Most of the components provided in this project need to know the namespace. For Kubernetes (1.3+) the namespace is made available to pod as part of the service account secret and automatically detected by the client.
|
|
For earlier version it needs to be specified as an env var to the pod. A quick way to do this is:</p><pre class="literallayout">env:
|
|
- name: "KUBERNETES_NAMESPACE"
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: "metadata.namespace"</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__security_configurations_inside_kubernetes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="multi__security_configurations_inside_kubernetes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="multi__service_account.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part VII. Security Configurations inside Kubernetes </td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-kubernetes.html">Home</a></td><td width="40%" align="right" valign="top"> 7. Service Account</td></tr></table></div></body></html> |