How to set a reserve proxy on k8s? [Video]

David Xu
2021-02-02 14:42

Setting a reserve proxy for Artifactory on k8s


Video Transcription

Hello, my name is David from JFrog support. In this video, I will show you how to set up a reverse proxy for Artifactory and Kubernetes. Artifactory can serve as a home or docker repository, but in order for this to happen, it often needs a reverse proxy to rewrite docker APIs to HTTP for Artifactory.

In artifact where we have a HDP reverse proxy generator. As you see here, I selected engine X and provided some settings and I can view the configuration that’s auto-generated by Artifactory. Let’s hold onto these values.

Now, what you see I’ve done here is I’ve converted this into a YAML. I simply mapped the corresponding values for SSL’s and the rewrites into YAML format. This will later go into the values [inaudible 00:01:03] YAML for the helm chart.

Now that we have the Internet’s configuration in YAML format, all we have to do is add this to the helm chart. The obvious benefit of this one is, this allows you to have a very consistent, reproducible configuration that can be deployed at any time. So if we navigate down, we see underneath engine X there’s an Artifactory conf section, simply copy and paste, which overrides this section. To implement this change, all we have to do is simply run a helm install.

Alternatively, we can create a config map. How this is done is first we just get the native configuration from the Artifactory, as we see here, and save it in a location. We will then run a command to create a ConfigMap. I want to see that this is going to be in our namespace David X test, and this config map already exists. So to implement this config map, all we have to do is use this helm set command. So this will perform a home upgrade and it will set the config map to a config map that we generated. And there we go.

So these are two ways that we can go change the reverse proxy settings on Artifactory. The second one obviously lets you perform the change on a fly, but may not be persistent. Whereas, the first one allows you to reproduce the configurations and save it across all the [inaudible 00:03:10] .

That was my video on how to set up a reverse proxy for Artifactory on Kubernetes. Thanks for watching, and I hope you enjoyed it. Feel free to leave your comments, feedback or questions in the comment section below.