If your security policy requires you to run your pods in least privilege mode, the realtheorycollector pod might encounter an error as the pod has insufficient privileges to bind to port 80. You might see an error such as:
listen tcp :80: bind: permission denied
This can occur anytime a pod attempts to bind to a well-known or reserved port, which is typically any port between 1-1024. A similar error can also occur if you are using side-car containers that might bind to port 80, causing a conflict. In these cases, it is advantageous to bind the RealTheory collector to a different port by updating the realtheorycollector container spec within the deployment manifest to reflect your preferred port.
realtheorycollector container.-env section:1- name: THEORY_WEBSERVER_PORT2 value: "<preferred port>"
Where <preferred port> is the port you prefer to use.
ports section to include the new port number:1ports:2- containerPort: <preferred port>
port section in livenessProbe, readinessProbe, and startupProbe to reflect the new port:1livenessProbe:2 failureThreshold: 53 httpGet:4 path: theory/api/v1/collector/health5 port: <preferred port>6 scheme: HTTP7 periodSeconds: 608 timeoutSeconds: 5
1readinessProbe:2 failureThreshold: 53 httpGet:4 path: theory/api/v1/collector/health5 port: <preferred port>6 scheme: HTTP7 periodSeconds: 608 timeoutSeconds: 5
1startupProbe:2 failureThreshold: 203 httpGet:4 path: theory/api/v1/collector/health5 port: <preferred port>6 scheme: HTTP7 initialDelaySeconds: 308 periodSeconds: 159 timeoutSeconds: 5
kubectl apply -f your-deployment.yamlOn This Page
Search for a command to run...