aboutsummaryrefslogblamecommitdiffstats
path: root/kubernetes/squid/squid-proxy-deployment.yaml
blob: 3c6f5c56f54a35168ded5754bf1b88d5bb5a4c94 (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                   
         


              

                







                   
                                           
              




                                            
                               
              


                                   







                     
                



                    

                          


                    

                          
apiVersion: apps/v1
kind: Deployment
metadata:
  name: squid
  labels:
    app: squid
spec:
  replicas: 1
  selector:
    matchLabels:
      app: squid
  template:
    metadata:
      labels:
        app: squid
    spec:
      containers:
      - name: squid
        image: ubuntu/squid:4.10-20.04_beta
        ports:
          - containerPort: 80
        volumeMounts:
          - name: squid-conf
            mountPath: /etc/squid/squid.conf
            readOnly: true
            subPath: squid.conf
      volumes:
        - name: squid-conf
          configMap:
            name: squid-config-file
---
apiVersion: v1
kind: Service
metadata:
  name: squid-service
spec:
  selector:
    app: squid
  type: NodePort
  ports:
    - protocol: UDP
      port: 80
      targetPort: 80
      nodePort: 30880
      name: "squid-udp-80"
    - protocol: TCP
      port: 80
      targetPort: 80
      nodePort: 30880
      name: "squid-tcp-80"