kubectl get node --namespace istio-system --output 'jsonpath={.items[0].status.addresses[0].address}'
kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}'
export HOST_IP=$(kubectl get node --namespace istio-system --output 'jsonpath={.items[0].status.addresses[0].address}')
export HOST_PORT=$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
export KNATIVE_INGRESS=$HOST_IP:$HOST_PORT
kubectl create ns knative-build-kaniko-domain
kubectl apply -f https://raw.githubusercontent.com/knative/build-templates/master/kaniko/kaniko.yaml -n knative-build-kaniko-domain
kubectl apply -f secret.yml
kubectl apply -f sa-build-bot.yml
kubectl apply -f service.yml
watch -n 1 -t kubectl get pod,deploy,svc,serving -n knative-build-kaniko-domain
kubectl get route knative-build-kaniko-demo --output=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain -n knative-build-kaniko-domain
kubectl get route knative-build-kaniko-demo --output jsonpath='{.status.domain}' -n knative-build-kaniko-domain
kubectl get route knative-build-kaniko-demo --output go-template --template='{{.status.domain}}{{"\n"}}' -n knative-build-kaniko-domain
export HOST_FQDN=$(kubectl get route knative-build-kaniko-demo --output jsonpath='{.status.domain}' -n knative-build-kaniko-domain)
echo $HOST_FQDN $KNATIVE_INGRESS
curl -H "Host: $HOST_FQDN" http://$KNATIVE_INGRESS/ -w "\n"
for i in {1..10} ; do curl -H "Host: $HOST_FQDN" http://$KNATIVE_INGRESS/ -w "\n" ; done;
kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' -n knative-build-kaniko-domain
export POD_NAME=$(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
curl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME/proxy/
echo Name of the Pod: $POD_NAME
kail -d knative-build-kaniko-demo -n knative-build-kaniko-domain -c user-container
Based on the official Knative documentation, licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License