ファイル
sample-env.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<span class="na">apiVersion</span><span class="pi">:</span> <span class="s">v1</span> <span class="na">kind</span><span class="pi">:</span> <span class="s">Pod</span> <span class="na">metadata</span><span class="pi">:</span> <span class="na">name</span><span class="pi">:</span> <span class="s">sample-env</span> <span class="na">labels</span><span class="pi">:</span> <span class="na">app</span><span class="pi">:</span> <span class="s">sammple-app</span> <span class="na">spec</span><span class="pi">:</span> <span class="na">containers</span><span class="pi">:</span> <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">nginx-container</span> <span class="na">image</span><span class="pi">:</span> <span class="s">nginx:1.16</span> <span class="na">env</span><span class="pi">:</span> <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">MAX_CONNECTION</span> <span class="na">value</span><span class="pi">:</span> <span class="s2">"</span><span class="s">100"</span> |
動作確認
1 |
kubectl apply -f sample-env.yaml |
1 2 |
yuta:~ $ kubectl exec -it sample-env -- env | grep MAX_CONNECTION MAX_CONNECTION=100 |