kubectl

Kubernetes 1.8 dashboard configurations fails with error “no kind ”Role“ is registered for version ”rbac.authorization.k8s.io/v1"

[亡魂溺海] 提交于 2020-01-25 09:34:06
问题 I have issue with kubernetes dashboard installation, appreciate your comments and solutions. ERROR: unable to decode "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": no kind "Role" is registered for version "rbac.authorization.k8s.io/v1" unable to decode "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": no kind "RoleBinding" is registered for version "rbac

Kubernetes service doesn't expose external port

戏子无情 提交于 2020-01-25 06:44:09
问题 I am trying to host my first dotnet core application locally on Kubernetes. Everything is working fine but when I am trying to create service using z_service.yml file it doesn't expose port 8099 for accessing it externally in browser . $> kubectl apply -f .\z_service.yml service/amazing-app-service created However if I run $> kubectl port-forward amazing-app 8099:80 command then it works and I can access the web application in browser with http://localhost:8099/ this is how services dashboard

Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod network

梦想的初衷 提交于 2020-01-24 10:41:25
问题 Issue Redis POD creation on k8s(v1.10) cluster and POD creation stuck at "ContainerCreating" Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 30m default-scheduler Successfully assigned redis to k8snode02 Normal SuccessfulMountVolume 30m kubelet, k8snode02 MountVolume.SetUp succeeded for volume "default-token-f8tcg" Warning FailedCreatePodSandBox 5m (x1202 over 30m) kubelet, k8snode02 Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni

Minikube not starting on Ubuntu, throwing errors

蹲街弑〆低调 提交于 2020-01-24 04:30:19
问题 I'm running Ubuntu 17.04 (zesty) on a Dell XPS 13 (3854 MB of RAM and Intel Core i5-5200U CPU @ 2.20GHz) and trying to start up Minikube, but I'm getting a couple errors when I try to start it up. ➜ minikube version minikube version: v0.22.3 ➜ kubectl version Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux

Getting “Unable to recognize \”hello-k8s.yml\“: Unauthorized” error when running kubectl apply -f hello-k8s.yml in CodeBuild phase

戏子无情 提交于 2020-01-22 02:30:08
问题 I am new to Kubernetes and trying to create a AWS CodePipeline to deploy service to EKS stack. I am following this tutorial I have followed all the steps including creating a role and adding permissions, so that CodeBuild will be able to talk with EKS. The issue I am facing right now is when CodePipeline runs, it is failing for below command in the CodeBuild phase. kubectl apply -f hello-k8s.yml and giving this error [Container] 2019/12/04 07:41:43 Running command kubectl apply -f hello-k8s

Create a deployment from a pod in kubernetes

好久不见. 提交于 2020-01-17 07:28:08
问题 For a use case I need to create deployments from a pod when a script is being executed from inside the pod. I am using google container engine for my cluster. How to configure the container inside the pod to be able to run commands like kubectl create deployment.yaml? P.S A bit clueless about it at the moment. 回答1: Your container is going to need to have kubectl available. There are some container images available, personally I can't vouch for any of them. Personally I'd probably build my own

kubectl - format the resource quota values in json format

南笙酒味 提交于 2020-01-16 19:10:28
问题 One way to get the resource quota values in kubernetes is to use the following command >kubectl describe resourcequotas Name: default-quota Namespace: my-namespace Resource Used Hard -------- ---- ---- configmaps 19 100 limits.cpu 13810m 18 limits.memory 25890Mi 36Gi But issue is this display all the values in text file format. Anyone knows how I can get in json format! Of course, I can parse the output and get the individual entry and construct the json. kubectl describe quota | grep limits

kubectl - format the resource quota values in json format

和自甴很熟 提交于 2020-01-16 19:10:27
问题 One way to get the resource quota values in kubernetes is to use the following command >kubectl describe resourcequotas Name: default-quota Namespace: my-namespace Resource Used Hard -------- ---- ---- configmaps 19 100 limits.cpu 13810m 18 limits.memory 25890Mi 36Gi But issue is this display all the values in text file format. Anyone knows how I can get in json format! Of course, I can parse the output and get the individual entry and construct the json. kubectl describe quota | grep limits

kubectl - format the resource quota values in json format

a 夏天 提交于 2020-01-16 19:10:06
问题 One way to get the resource quota values in kubernetes is to use the following command >kubectl describe resourcequotas Name: default-quota Namespace: my-namespace Resource Used Hard -------- ---- ---- configmaps 19 100 limits.cpu 13810m 18 limits.memory 25890Mi 36Gi But issue is this display all the values in text file format. Anyone knows how I can get in json format! Of course, I can parse the output and get the individual entry and construct the json. kubectl describe quota | grep limits

TLS handshake timeout with kubernetes in GKE

爷,独闯天下 提交于 2020-01-13 03:40:26
问题 I've created a cluster on Google Kubernetes Engine (previously Google Container Engine) and installed the Google Cloud SDK and the Kubernetes tools with it on my Windows machine. It worked well for some time, and, out of nowhere, it stopped working. Every command I'm issuing with kubectl provokes the following: Unable to connect to the server: net/http: TLS handshake timeout I've searched Google, the Kubernetes Github Issues, Stack Overflow, Server Fault ... without success. I've tried the