Minikube

I get error message “runtime error: index out of range [0] with length 0” when I try to start minikube

别等时光非礼了梦想. 提交于 2021-01-29 18:56:58
问题 Maybe this a newbie question, I am installing minikube. When I try to start minikube ( minikube start --vm-driver hyperv --hyperv-virtual-switch "MiniKube" --alsologtostderr -v=8 --memory=2000 ) I see an error message in the log ( panic: runtime error: index out of range [0] with length 0 ): I0410 07:24:15.123609 1724 main.go:110] libmachine: [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @(Get-Module -ListAvailable hyper-v).Name | Get

Launching Minikube as normal User on Windows 10

女生的网名这么多〃 提交于 2021-01-29 14:46:23
问题 I'm trying to run minikube with hyperv without open an Administrator powershell. Is there any way? I'm doing this: choco install minikube minikube.exe start --vm-driver "hyperv" If I try to launch minikube start from a normal powershell it gives me this message: X hyperv does not appear to be installed 回答1: This issue occurs when you didn't install Hyper-V or it wasn't installed properly due to Windows updates or some environment issues. You can check if Hyper-V works properly if you will

Connecting to API with Angular Webapp using Minikube and Kubernetes

萝らか妹 提交于 2021-01-29 09:24:52
问题 I'm trying to learn Kubernetes and would like to create a simple example of an Angular frontend in a Docker container connecting to a .NET Core API also on a Docker container. I am able to successfully create both the API and the frontend and can see the result on the browse but struggle to retrieve information from the API on the frontend. As the IP of the API changes I can't hardcode those values in the Angular app before building the image but using the DNS name doesn't seem to work either

Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io…i/o timeout

点点圈 提交于 2021-01-29 02:31:44
问题 I was trying to pull an image from docker.io, but I'm getting this error, recently I have changed my DNS I'm not sure is that the reason...I executed minikube ssh and I executed docker pull then I got this error Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:32905->10.0.2.3:53: i/o timeout My Env -: Docker version -: 19.03.1 minikube version -: 1.2.0 ubuntu version -: 18.04 This is my resolv.conf.d -->

why kubernete pod reports `Insufficient memory` even if there are free memory on the host?

亡梦爱人 提交于 2021-01-28 20:01:07
问题 I am running minikube v1.15.1 on MacOS and installed helm v3.4.1 . I run helm install elasticsearch elastic/elasticsearch --set resources.requests.memory=2Gi --set resources.limits.memory=4Gi --set replicas=1 to install elasticsearch on k8s cluster. The pod elasticsearch-master-0 is deployed but it is in pending status. When I run kubectl describe pod elasticsearch-master-0 it gives me below warning: Warning FailedScheduling 61s (x2 over 2m30s) default-scheduler 0/1 nodes are available: 1

Connecting to an external database from an app deployed in Kubernetes

佐手、 提交于 2021-01-28 12:15:44
问题 I'm deploying a Spring Boot app in minikube that connects to a database running on the host. Following the 12 factor app recommendations I use environment variables for the necessary configuration: SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver SPRING_DATASOURCE_PASSWORD=... SPRING_DATASOURCE_URL=jdbc:postgresql://<HOST_IP_FROM_K8S>:5432/myservice SPRING_DATASOURCE_USERNAME=... The kubernetes docs only show how to set environment variables in the service and deployment .yaml files

Unable to get ClusterIP service url from minikube

断了今生、忘了曾经 提交于 2021-01-28 03:22:35
问题 I have created a ClusterIP service according to configuration files below, however I can't seem to get the URL from minikube for that service k create -f service-cluster-definition.yaml ➜ minikube service myapp-frontend --url 😿 service default/myapp-frontend has no node port And if I try to add NodePort into the ports section of service-cluster-definition.yaml it complains with error, that such key is deprecated. What am I missing or doing wrong? service-cluster-definition.yaml apiVersion: v1

Unable to get ClusterIP service url from minikube

孤街浪徒 提交于 2021-01-28 01:33:10
问题 I have created a ClusterIP service according to configuration files below, however I can't seem to get the URL from minikube for that service k create -f service-cluster-definition.yaml ➜ minikube service myapp-frontend --url 😿 service default/myapp-frontend has no node port And if I try to add NodePort into the ports section of service-cluster-definition.yaml it complains with error, that such key is deprecated. What am I missing or doing wrong? service-cluster-definition.yaml apiVersion: v1

用KubeFATE在K8s上部署联邦学习FATE v1.5

徘徊边缘 提交于 2021-01-19 12:33:45
题图摄于北京长安街 (本文作者系 VMware 中国研发云原生实验室架构师,联邦学习 KubeFATE / FATE-Operator 开源项目维护者。) 需要加入KubeFATE开源项目讨论群的同学,请关注本公众号后回复 “kubefate” 即可。 VMware招聘联邦学习、隐私计算开发工程师 目标 本文我们会介绍如何在一台 Linux 的机器上通过安装 MiniKube,然后使用 KubeFATE 部署一个两方的联邦学习集群,并在上面跑一个测试的联邦学习训练任务。 我们的总体架构如下: 本文共出现两台机器: 用来做 Demo 的机器,是一台 Linux 机器,参照前置条件第一点; 使用浏览器访问 Jupyter Notebook, FATE-Board 的机器,要求可以访问用来执行 Demo 的机器。可以是任何客户端。 前置条件 一台 Linux 的服务器,我们测试好的 OS 版本是 Ubuntu 18.04 LTS,由于需要跑多方计算,服务器的推荐配置为:8核,16GB内存以上; 三个域名分别给 KubeFATE 服务,Jupyter Notebook 和 FATE-board 使用。如果没有 DNS 解析条件,可以通过设置 hosts 方式,后面的介绍基于这种情况; Linux 服务器需要预先安装好 Docker 环境,具体参考 Install Docker in

Kubernetes 资源配额使用指南

不打扰是莪最后的温柔 提交于 2021-01-13 10:06:34
资源配额控制应用的 CPU 或内存使用情况,防止资源被过量使用或被抢占。 当 Kubernetes 集群运行过一段时间或者在被开发者大量使用后, Kubernetes 资源(例如 CPU 和内存)的控制的问题就会显现出来。而在大多情况下只有集群出问题后,我们才会意识到资源控制的重要性。 Kubernetes 部署过程如果没有能充分考虑到将来的扩展性,资源类问题将会非常常见,此类问题与集群的管理和部署团队的经验有关。 如果不加以合理控制,一个暴力的应用或者开发者可能影响到共享该集群的所有业务,大家因此会相互埋怨、指责并保护性地抢占资源。这对于集群管理和开发人员都是非常难以处理的场景。 在 Kubernetes 环境中控制应用的计算资源使用有多种方式。大部分情况下,我们可以使用“资源控制”和“限制范围”。注意存储管理不在我们讨论范围之内,存储管理可以通过持久卷Persistent Volume 件,以实现针对不同的存储控制需求。 资源配额是一种控制 Kubernetes 计算资源的方法。本文告诉你如何使用该功能来管理开发人员行为并控制应用的资源使用。 什么是资源配额 简而言之, 资源配额 提供了限制每个命名空间资源消耗的约束条件,它们只能在命名空间级别上应用,这意味着它们可以应用于计算资源,并限制命名空间内的对象数量。 Kubernetes资源配额通过 ResourceQuota