Skip to content

Instantly share code, notes, and snippets.

@lioneltchami
Created July 25, 2022 08:18
Show Gist options
  • Select an option

  • Save lioneltchami/89919ab229ee17d9db900d127a5c3a20 to your computer and use it in GitHub Desktop.

Select an option

Save lioneltchami/89919ab229ee17d9db900d127a5c3a20 to your computer and use it in GitHub Desktop.
$ helm install nginx nginx
NAME: nginx
LAST DEPLOYED: Mon Mar 14 12:01:46 2022
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=nginx,app.kubernetes.io/instance=nginx" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment