I followed this guide and everything started running.
kubectl get pods --namespace=knative-serving -w
NAME READY STATUS RESTARTS AGE
activator-f98dc8dc8-r6qlg 0/2 PodInitializing 0 5m
autoscaler-7787cd648-4lwdg 2/2 Running 0 5m
controller-55f7988d59-d8zwd 1/1 Running 0 5m
webhook-5b844dfbd5-7bz84 1/1 Running 0 5m
activator-f98dc8dc8-r6qlg 2/2 Running 0 5m
After a few seconds, kubectl
commands are failing with the following error.
kubectl get nodes
Unable to connect to the server: net/http: TLS handshake timeout
Is it possible to install knative
on docker for mac kubernetes cluster?
My kubernetes version:
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-18T11:37:06Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:05:37Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"
Yes, it's absolutely possible to run Knative on Docker for Mac. I've assembled specific instructions in the upstream documentation repository.
Make sure you update Docker for Mac to be on one of the later versions. Knative meanwhile needs Kubernetes 1.12+.
Knative provides a set of middleware components that are essential to build modern, source-centric, and container-based applications that can run anywhere: on premises, in the cloud, or even in a third-party data center. Knative components are built on Kubernetes and codify the best practices shared by successful real-world Kubernetes-based frameworks. It enables developers to focus just on writing interesting code, without worrying about the “boring but difficult” parts of building, deploying, and managing an application.
Back to your question.
It is possible to use Knative on Docker containers mananaged by Kubernetes on MacOS environment. You may try to install it on Minikube.
minikube start --memory=8192 --cpus=4 \ --kubernetes-version=v1.10.5 \ --vm-driver=hyperkit \ --bootstrapper=kubeadm \
--extra-config=controller-manager.cluster-signing-cert-file="/var/lib/localkube/certs/ca.crt" \
--extra-config=controller-manager.cluster-signing-key-file="/var/lib/localkube/certs/ca.key" \
--extra-config=apiserver.admission-control="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook"
curl -L https://raw.githubusercontent.com/knative/serving/v0.1.1/third_party/istio-0.8.0/istio.yaml \ | sed 's/LoadBalancer/NodePort/' \ | kubectl apply -f -
kubectl label namespace default istio-injection=enabled
kubectl get pods -n istio-system --watch
curl -L https://github.com/knative/serving/releases/download/v0.1.1/release-lite.yaml \ | sed 's/LoadBalancer/NodePort/' \ | kubectl apply -f -
kubectl get pods -n knative-serving --watch