Skip to content

Instantly share code, notes, and snippets.

@abdennour
abdennour / README.md
Last active June 19, 2024 10:38
Nginx Reverse Proxy for Nexus Docker Registries

Overview

This is a solution of a common problem with Nexus Docker repositories. The administrator has to expose port for "pull", another port for "push", other ports for each hosted repository. This solution is about leveraging Nginx reverse proxy to avoid using these ports.

How it works ?

Given :

  • Nexus hostname is "nexus.example.com"
  • Nexus web port is 8081
@longtian
longtian / export.sh
Last active March 1, 2023 07:53
kubernetes 导出 pkcs12 证书的脚本
CONFIG="/root/.kube/config"
echo -n $(cat $CONFIG | grep certificate-authority-data | cut -d: -f2) | base64 -d > my-ca-cert.crt
echo -n $(cat $CONFIG | grep client-certificate-data | cut -d: -f2) | base64 -d > my-client.crt
echo -n $(cat $CONFIG | grep client-key-data | cut -d: -f2) | base64 -d > my-client.key
openssl pkcs12 -export -out k8s.pfx -inkey my-client.key -in my-client.crt -certfile my-ca-cert.crt