Press "Enter" to skip to content

Kubernetes 配置pod使用代理上网

apiVersion: v1
kind: Pod
metadata:
  name: uses-proxy
spec:
  containers:
  - name: uses-proxy
    image: myimage
    env:
    - name: HTTP_PROXY
      value: "http://proxy.example.com:8080"
    - name: HTTPS_PROXY
      value: "http://proxy.example.com:8080"
    - name: NO_PROXY
      value: "localhost,127.0.0.1,.example.com"

参考资料:

https://saturncloud.io/blog/configuring-proxy-settings-for-docker-and-kubernetes-a-guide/

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注