Closed fernandohackbart closed 7 years ago
cat > /root/bin/generate-minikube-proxy.sh <<EOF
#!/bin/bash
export MINIKUBE_IP=\`minikube ip\`
cat > /etc/nginx/vhosts.d/minikube.conf <<FINAL
upstream kubernetes {
server \${MINIKUBE_IP}:30000;
}
server {
server_name kubernetes_proxy;
listen 0.0.0.0:30000;
location / {
proxy_pass http://kubernetes/;
}
}
upstream jenkins {
server \${MINIKUBE_IP}:30010;
}
server {
server_name jenkins_proxy;
listen 0.0.0.0:30010;
location / {
proxy_pass http://jenkins/;
}
}
upstream kong{
server \${MINIKUBE_IP}:30020;
}
server {
server_name kong_proxy;
listen 0.0.0.0:30020;
location / {
proxy_pass http://kong/;
}
}
upstream kong_admin{
server \${MINIKUBE_IP}:30022;
}
server {
server_name kong_admin_proxy;
listen 0.0.0.0:30022;
location / {
proxy_pass http://kong_admin/;
}
}
FINAL
systemctl restart nginx
EOF
Yes this is weird but I want to be able to call the services from the network