Install on Minikube

This guide walks you through the installation of the latest version of
Knative Serving using pre-built images and
demonstrates creating and deploying an image of a sample “hello world” app onto
the newly created Knative cluster.

If you prefer to install Istio manually, if your cloud provider doesn’t offer a
managed Istio installation, or if you’re installing Knative locally using
Minkube or similar, see the
Installing Istio for Knative guide.

Installing Knative

The following commands install all available Knative components as well as the
standard set of observability plugins. To customize your Knative installation,
see Performing a Custom Knative Installation.

If you are upgrading from Knative 0.3.x: Update your domain and static IP
address to be associated with the LoadBalancer istio-ingressgateway instead
of knative-ingressgateway. Then run the following to clean up leftover
resources:

If you have the Knative Eventing Sources component installed, you will also
need to delete the following resource before upgrading:

kubectl delete statefulset/controller-manager -n knative-sources

While the deletion of this resource during the upgrade process will not
prevent modifications to Eventing Source resources, those changes will not be
completed until the upgrade process finishes.

To install Knative, first install the CRDs by running the kubectl apply
command once with the -l knative.dev/crd-install=true flag. This prevents
race conditions during the install, which cause intermittent errors:

If you’d like to view the available sample apps and deploy one of your choosing,
head to the sample apps repo.

Note: When looking up the IP address to use for accessing your app, you need
to look up the NodePort for the istio-ingressgateway well as the IP address
used for Minikube. You can use the following command to look up the value to
use for the {IP_ADDRESS} placeholder used in the samples:

# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.INGRESSGATEWAY=knative-ingressgateway
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.# Use `istio-ingressgateway` instead, since `knative-ingressgateway`# will be removed in Knative v0.4.if kubectl get configmap config-istio -n knative-serving &> /dev/null;thenINGRESSGATEWAY=istio-ingressgateway
fiecho$(minikube ip):$(kubectl get svc $INGRESSGATEWAY --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')

Cleaning up

Delete the Kubernetes cluster along with Knative, Istio, and any deployed apps: