1

I have installed Jenkins X on kubernetes. I want to change the default installation and secure the Jenkins url, so that it will be not accessible to the public.

Can I change it to some port, or some way to have a firewall for only few IPs allow to access the Jenkins URL.

  • You can use an ingress controller as the entry point into the Kubernetes cluster. That way, you can control the pattern of the URL, port, etc. Another thing that might help is to change the port number of the Jenkins service on K8s. That way, if it is not the default, would be difficult to find out. Hope this helps. – Karthik Venkatesan Mar 5 at 5:41
  • This sounds less like securing the service than obscuring it. Closing off access except for a whitelist, or changing the port doesn't mean that access to it on those allowed paths will be any more secure. Perhaps change the title of the question? What aspect are you more interested in here? – Bruce Becker Aug 2 at 6:26
1

In my experience, the easiest way to do this is to put Jenkins behind an SSL-terminating proxy, such as Apache or Nginx. You can also configure SSL within Jenkins itself, but I've found that using a proxy is usually a lot easier to set up and manage with regards to SSL.

  • You mention an SSL terminating proxy which is indeed a good way of securing the service (as the title of the question implies), but the body of the question refers more to how to configure K8s to allow traffic only from allowed places. I think Karthik's comment is more relevant - perhaps you can merge the two? – Bruce Becker Aug 2 at 6:28
  • Yeah, I agree. Reading my answer now, I feel like I must've been looking at a different question when writing this answer. What I wrote doesn't really address OP's question. – jayhendren Aug 2 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.