apiVersion: v1
kind: Pod
metadata:
  name: squid
  labels:
    name: squid
spec:
  containers:
    - name: squid
      image: sameersbn/squid:3.5.27-2
      ports:
        - containerPort: 3128
          protocol: TCP
      volumeMounts:
        - mountPath: /var/spool/squid
          name: data
        # add config file to persist the required config 
        - mountPath: /etc/squid/squid.conf
          name: config
  volumes:
    - name: data
      hostPath:
      # directory location on host
        path: /srv/docker/squid/cache
        type: Directory
    - name: config
      hostPath:
      # file location on host
        path: /srv/docker/squid/squid.conf
        type: File

