kubectl

Kubernetes - The connection to the server localhost:8080 was refused - did you specify the right host or port?

瘦欲@ 提交于 2019-12-10 13:08:24
问题 I just finished installing kubectl via Ubuntu 64 (Linux) . I followed the online Kubernetes guide, but I've had an error with the host. After the first step (install kubectl), when I checked the kubectl version, this was the message (I didn't yet install and deploy the minikube because I've not the connection according to this problem): root@ubuntu:~# kubectl version Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920",

Unable to run Kubernetes (kubectl) and Minikube on windows 10. Unable to connect to the server: dial tcp [::1]:8080: connectex:

痴心易碎 提交于 2019-12-10 11:39:11
问题 Here's the full error Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it. Here's my Kubectl config view apiVersion: v1 clusters: [] contexts: - context: cluster: "" user: "" name: dev current-context: dev kind: Config preferences: {} users: [] I'm running Minikube start . It's stuck on Starting VM... In Hyper-V Manager, I have minikube VM running. 回答1: Check out "Minikube on Windows 10 with Hyper-V" by

Kubernetes RBAC unable to upgrade connection: Forbidden (user=system:anonymous, verb=create, resource=nodes, subresource=proxy)

心已入冬 提交于 2019-12-10 08:24:41
问题 I'm running Kubernetes 1.6.2 with RBAC enabled. I've created a user kube-admin that has the following Cluster Role binding kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: name: k8s-admin subjects: - kind: User name: kube-admin apiGroup: rbac.authorization.k8s.io roleRef: kind: ClusterRole name: cluster-admin apiGroup: rbac.authorization.k8s.io When I attempt to kubectl exec into a running pod I get the following error. kubectl -n kube-system exec -it

Downgrade kubectl version to match minikube k8s version

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 01:49:54
问题 I started minikube with k8s version 1.5.2 and I would like to downgrade my kubectl so that it is also 1.5.2. Currently when I run kubectl version I get: Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T19:32:12Z", GoVersion:"go1.9", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:

Kubernetes Pod fails with CrashLoopBackOff

我怕爱的太早我们不能终老 提交于 2019-12-10 01:14:18
问题 I 'm Following this guide in order to set up a pod using minikube and pull an image from a private repository hosted at: hub.docker.com When trying to set up a pod to pull the image i see CrashLoopBackoff pod config: apiVersion: v1 kind: Pod metadata: name: private-reg spec: containers: - name: private-reg-container image: ha/prod:latest imagePullSecrets: - name: regsecret output of "get pod" kubectl get pod private-reg NAME READY STATUS RESTARTS AGE private-reg 0/1 CrashLoopBackOff 5 4m As

How to upgrade kubectl client version

喜欢而已 提交于 2019-12-09 04:39:36
问题 I want to upgrade the kubectl client version to 1.11.3. I executed brew install kubernetes-cli but the version doesnt seem to be updating. Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.7", GitCommit:"0c38c362511b20a098d7cd855f1314dad92c2780", GitTreeState:"clean", BuildDate:"2018-08-20T10:09:03Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.4", GitCommit:

Kubectl always returns a error: yaml: mapping values are not allowed in this context

僤鯓⒐⒋嵵緔 提交于 2019-12-08 16:29:03
问题 Kubectl command alway returns this error yaml: line 2: mapping values are not allowed in this context. Even when i call normal version command, config command, etc. Not sure whats causing this. tessact@tessact-sys-1:~$ kubectl version Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:48:38Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} error: yaml: line 2:

Is it possible to access the Kubernetes API via https ingress?

落花浮王杯 提交于 2019-12-08 08:07:45
问题 I was trying unsuccessfully access Kubernetes API via HTTPS ingress and now started to wonder if that is possible at all? Any working detailed guide for a direct remote access (without using ssh -> kubectl proxy to avoid user management on Kubernetes node) would be appreciated. :) UPDATE: Just to make more clear. This is bare metal on premise deployment (NO GCE, AWZ, Azure or any other) and there is intension that some environments will be totally offline (which will add additional issues

kubectl command disconnects after few minutes of idle time

与世无争的帅哥 提交于 2019-12-08 07:12:53
问题 We noticed when we exec -it to connect into a pod, after certain idle time the connection get destroyed. Is there any option to leave the connection open longer? I see there is an open PR, but wondering if there is any workaround for this issue. 回答1: The short answer is no. And that's why: Enabling TCP keepalive for console connections TCP keepalive is a TCP option that causes packets to be exchanged over a connection even if there is no traffic to transport. It should be enabled on both ends

GCE/GKE Kubectl: the server doesn't have a resource type “services”

空扰寡人 提交于 2019-12-08 03:54:40
问题 I have two kubernetes clusters on google container engine but on seperate google accounts (one using my company's email and another using my personal email). I attempted to switch from one cluster to another. I did this by: Logging in with my other email address $ gcloud init Getting new kubectl credentials gcloud container cluster get-credentials Test to see if connected to new cluster $ kubectl get po However, I was still not able to get the kubernetes resources in the cluster. The error I