Minikube

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

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:

附002.Minikube介绍及使用

限于喜欢 提交于 2019-12-09 12:27:22
  一 Minikube介绍      1.1 概述      1.2 Minkube功能      1.3 架构示意      二 Minikube安装      2.1 前置条件      2.2 正式安装      三 使用Minkube启动Kubernetes      3.1 前期准备      3.2 快速构建      3.3 确认验证      四 Minkube常见操作      4.1 常见操作      4.2 部分优化      回到顶部      一 Minikube介绍      1.1 概述      Minikube是一种可以在本地轻松运行Kubernetes的工具。Minikube在笔记本电脑的VM中运行单节点Kubernetes集群,供希望尝试Kubernetes或日常开发的用户测试使用。特点是不能启动生产集群,没有高可用性的单节点机器。      使用Minikube CLI管理虚拟机上的Kubernetes环境,比如:启动,停止,删除,获取状态等。      1.2 Minkube功能      Minikube支持Kubernetes功能,例如:      DNS      NodePorts      ConfigMaps和Secrets      仪表板      Container Runtime:Docker,rkt,CRI

Kubernetes: How to delete PODs based on age/creation time

☆樱花仙子☆ 提交于 2019-12-09 00:13:27
问题 Is it possible to delete POD in kubernetes based on creation time or age? Example : I would like to delete all PODs which are older than 1 day. These PODs are orphaned , therefore no new PODs will be created. 回答1: This command will delete all PODs older than one day : kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{"\n"}}{{end}}' | awk '$2 <= "'$(date -d 'yesterday' -Ins --utc | sed 's/+0000/Z/')'" { print $1 }' | xargs --no-run

Why do I get “unbound immediate PersistentVolumeClaims” on Minikube?

妖精的绣舞 提交于 2019-12-08 16:31:48
问题 I get "pod has unbound immediate PersistentVolumeClaims", and I don't know why. I run minikube v0.34.1 on macOS. Here are the configs: es-pv.yaml apiVersion: v1 kind: PersistentVolume metadata: name: elasticsearch spec: capacity: storage: 400Mi accessModes: - ReadWriteOnce hostPath: path: "/data/elasticsearch/" es-statefulset.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: es-cluster spec: serviceName: elasticsearch replicas: 3 selector: matchLabels: app: elasticsearch template:

How to best utilize Kubernetes/minikube DNS for local development [closed]

十年热恋 提交于 2019-12-08 15:07:29
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . We are switching to using Kubernetes. It is simple to access other deployed services within a k8s deployment via the built in dns. So if I have pod/service named app1 and a pod/service named app2 and app1 needs to call app2, it can just use "app2" and k8s dns works its magic and

DNS resolution of ExternalName in Minikube on Mac

久未见 提交于 2019-12-08 04:32:35
问题 I'm trying to connect to a postgres container running in docker on my mac, from my minikube setup in virtualbox. But I'm running into dns resolve issues. I'm running postgres as a container on docker > docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a794aca3a6dc postgres "docker-entrypoint.s…" 3 days ago Up 3 days 0.0.0.0:5432->5432/tcp postgres On my Mac / VirtualBox / Minikube setup I create a service kind: Service apiVersion: v1 metadata: name: postgres-svc spec: type:

Kubernetes pods not starting, running bind the proxy

三世轮回 提交于 2019-12-08 01:45:15
问题 I am running kubernetes on minikube, I am behind a proxy, so I had set the env variables(HTTP_PROXY & NO_PROXY) for docker in /etc/systemd/system/docker.service.d/http-proxy.conf. I was able to do docker pull but when I run the below example kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080 kubectl expose deployment hello-minikube --type=NodePort kubectl get pod pod never starts and I get the error desc = unable to pull sandbox image \"gcr.io/google

Relation between preStop hook and terminationGracePeriodSeconds

亡梦爱人 提交于 2019-12-07 18:55:17
问题 Basically I am trying to do is play around with pod lifecycle and check if we can do some cleanup/backup such as copy logs before the pod terminates. What I need : Copy logs/heapdumps from container to a hostPath/S3 before terminating What I tried: I used a preStop hook with a bash command to echo a message (just to see if it works !!). Used terminationGracePeriodSeconds with a delay to preStop and toggle them to see if the process works. Ex. keep terminationGracePeriodSeconds:30 sec (default

How to Debug .Net Core Application Running on Minikube from Visual Studio 2017

戏子无情 提交于 2019-12-07 09:00:45
问题 I have made a .Net Core Web Application and deployed it on container running on Minikube VM. I want to debug that app, How can I do it using Visual Studio 2017? 回答1: You can use vsdbg to debug any remote dotnet core process on Linux. Kubernetes Minikube uses Docker underneath and Docker container is in fact something like a Linux VM. I wrote a post about this on Medium.com if you need more details. 来源: https://stackoverflow.com/questions/46361844/how-to-debug-net-core-application-running-on