Why http and not https? kubectl cluster-info "kubernetes master running"

12/15/2018

I've googled for hours and I can't seem to find the info. This might be a simple question... My question is this:

I have a big script to start up K8s. When everything is up and running and I do a kubectl cluster-info I get kubernetes master is running on http://.... EVERY example I read online says the result should be https://...

My question is what file/yaml/property/etc makes kubernetes master run http vs https?

I have both ports (80/443) defined in my kube-apiserver.yaml file. Do I have to get things working with the "insecure-port=0" in apiserver? Or can master run https without this?

-- hyperstack
https
kube-apiserver
kubernetes

1 Answer

12/15/2018

That command echoes whatever url kubectl is configured to speak to the apiserver on. kubectl config view displays the content of the kubeconfig file kubectl is using (specified in $KUBECONFIG, --kubeconfig, or ~/.kube/config by default)

-- Jordan Liggitt
Source: StackOverflow