polipo和tor kubernetes部署之间的通信

时间:2019-03-14 11:14:10

标签: kubernetes yaml tor polipo

我在哪里可以在Kubernetes部署文件中添加socksParentProxy来与polipo和tor进行通信。我已经创建了tor服务tor:9150和tor部署。这是我的YAML文件:

apiVersion: apps/v1beta1 
kind: Deployment
metadata:
    name: polipo-deployment
    labels: 
        app: myauto
spec:
    selector:
        matchLabels:
          name: polipo-pod
          app: myauto
    template:
        metadata:
            name: polipo-deployment
            labels:
                name: polipo-pod
                app: myauto
        spec:
           containers:
              - env:
                    - name: socksParentProxy
                      value: tor:9150
                name: polipo
                image: 'clue/polipo'
                ports: 
                  - containerPort: 8123  
    replicas: 1

1 个答案:

答案 0 :(得分:0)

documentation一样,您应该使用args

containers:
    name: polipo
    image: 'clue/polipo'
    args: ["socksParentProxy=tor:9150"]
    ports: 
        - containerPort: 8123