Skip to content

Instantly share code, notes, and snippets.

@beriberikix
Last active March 31, 2020 21:32
Show Gist options
  • Save beriberikix/a827ec31f62705f13054895fa8cda0ad to your computer and use it in GitHub Desktop.
Save beriberikix/a827ec31f62705f13054895fa8cda0ad to your computer and use it in GitHub Desktop.
Knative on minikube with Kourier
export KNATIVE_VERSION="0.13.0"
# Not sure the minimum but this works for helloworld
minikube start --cpus=4 --memory=4096 --addons=ingress
# Install Knative Serving
kubectl apply --filename "https://github.com/knative/serving/releases/download/v$KNATIVE_VERSION/serving-crds.yaml"
kubectl apply --filename "https://github.com/knative/serving/releases/download/v$KNATIVE_VERSION/serving-core.yaml"
# Configure the magic xip.io DNS name
kubectl apply --filename "https://github.com/knative/serving/releases/download/v$KNATIVE_VERSION/serving-default-domain.yaml"
# Install and configure Kourier
kubectl apply --filename https://raw.githubusercontent.com/knative/serving/v$KNATIVE_VERSION/third_party/kourier-latest/kourier.yaml
kubectl patch configmap/config-network --namespace knative-serving --type merge --patch '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}'
# watch until all pods are ready
kubectl get pod -A -w
# open new tab to start the LB
minikube tunnel
# get public IP
kubectl get svc kourier -n kourier-system
# deploy helloworld from jonatasbaldin
kubectl apply -f https://gist.githubusercontent.com/jonatasbaldin/bc04de2e376be23f75bb5815041fdd61/raw/d2345ac9aa01d0f3c771e9b3d4a1421dd766e0f9/service.yaml
# get the URL, should look like http://helloworld-go.default.10.110.61.6.xip.io
kubectl get ksvc
# cURL the URL, should see Hello Go Sample v1!
curl http://helloworld-go.default.10.110.61.6.xip.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment