# Deploying a Knative Service | |
$ kn service create hello --image gcr.io/knative-samples/helloworld-go --port 8080 --env TARGET=World | |
# How to get your minikube IP and the port that the istio-ingressgateway is listening on. | |
$ minikube ip | |
$ kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name==\"http2\")].nodePort}' | |
# How to Get the Host header information of your knative service | |
With the default settings, Knative will generate an accessible URL for your service, hence the example.com domain name. The naming convention can be customized to your liking, along with other settings, but that’s beyond the scope of what we are trying to do. | |
$ kubectl get ksvc hello --output=custom-columns=NAME:.metadata.name,URL:.status.url | |
# How to create use curl with the host header to test the route. The first request may take a little bit longer than you would expect. | |
$ curl -H "Host: <your URL without http://>" http://<minikube IP>:<istio-ingressgatway PORT> | |
or | |
$ curl -H "Host: airwavetech-helloworld.airwave-deploy.example.com" http://192.168.79.129:30827 -v -i | |
$ curl -H "Host: hello.default.svc.cluster.local" http://10.107.112.173:31961 -v -i | |
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND