Skip to content

Create Service for Access Logs

The Admin UI also runs the log collecting container as part of its deployment. To make this container accessible to deployed proxy servers we need to create internal service by running the following commands.

kubectl apply -f cloud-proxy-ui-logs-service.yaml --validate

The cloud-proxy-ui-logs-service.yaml file looks like the following.

apiVersion: v1
kind: Service
metadata:
  name: cloud-proxy-reports
spec:
  type: ClusterIP
  selector:
    app: cloud-proxy-ui
  ports:
    - port: 873
      targetPort: 873

To see the status of the created service run kubectl get services, the output should show our service cloud-proxy-reports is up and running.

# kubectl get services
NAME                  TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
cloud-proxy-reports   ClusterIP      10.100.74.34     <none>        873/TCP        4s
kubernetes            ClusterIP      10.96.0.1        <none>        443/TCP        33d