Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save voraviz/399c8f7b3dae4df9fa23daeab35b3833 to your computer and use it in GitHub Desktop.
Save voraviz/399c8f7b3dae4df9fa23daeab35b3833 to your computer and use it in GitHub Desktop.
#Get OpenShift Domain from Console's URL this default subdomain to "apps"
SUBDOMAIN=$(oc whoami --show-console | awk -F'apps.' '{print $2}')
DOMAIN="apps.${SUBDOMAIN}"
#Create Destination Rule
oc apply -f https://raw.githubusercontent.com/voraviz/openshift-service-mesh-ingress-mtls/main/config/frontend-destination-rule.yaml
#Create Gateway - replaced DOMAIN cluster to yaml
curl -s https://raw.githubusercontent.com/voraviz/openshift-service-mesh-ingress-mtls/main/config/gateway.yaml|sed 's/DOMAIN/'"$DOMAIN"'/'| oc apply -f -
#Create Virtual Service - replaced DOMAIN cluster to yaml
curl -s https://raw.githubusercontent.com/voraviz/openshift-service-mesh-ingress-mtls/main/config/frontend-virtual-service.yaml| sed 's/DOMAIN/'"$DOMAIN"'/' | oc apply -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment