Minikube

How to switch kubectl clusters between gcloud and minikube

谁说我不能喝 提交于 2019-12-02 14:07:44
I have Kubernetes working well in two different environments, namely in my local environment (MacBook running minikube) and as well as on Google's Container Engine (GCE, Kubernetes on Google Cloud). I use the MacBook/local environment to develop and test my YAML files and then, upon completion, try them on GCE. Currently I need to work with each environment individually: I need to edit the YAML files in my local environment and, when ready, (git) clone them to a GCE environment and then use/deploy them. This is a somewhat cumbersome process. Ideally, I would like to use kubectl from my Macbook

`Error: could not find tiller` when running `helm version`

房东的猫 提交于 2019-12-02 13:19:30
I have minikube and kubectl installed: $ minikube version minikube version: v1.4.0 commit: 7969c25a98a018b94ea87d949350f3271e9d64b6 $ kubectl version Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9",

Kubernetes POD arguments are not passing to service, however Docker arguments are passing correctly

微笑、不失礼 提交于 2019-12-02 07:49:16
Problem Statement: I have a created a Docker image successfully from docker.io/joethecoder2/spring-boot-web . It has been tested with command line arguments, and those work correctly locally with Docker. I am trying to pass java arguments that are passed to Docker to a Kubernetes POD that is defined with a single image docker.io/joethecoder2/spring-boot-web The purpose of passing the arguments is to let the POD know what the IP address and port number are for the database service. Problem Definition: I have defined a Kubernetes POD here, however I believe the arguments are not passed correctly

KubeDB on minikube mount local directory

一世执手 提交于 2019-12-02 02:39:37
问题 I'm trying to run postgres using kubedb on minikube where I mount my data from a local directory (located on my Mac), when the pod runs the I don't get the expected behaviour, two things happen: One is obviously the mount isn't there, and second I see the error pod has unbound immediate PersistentVolumeClaims First, here are my yaml file: apiVersion: v1 kind: PersistentVolume metadata: name: adminvol namespace: demo labels: release: development spec: capacity: storage: 2Gi accessModes: -

How to solve permission trouble when running Postgresql from minikube?

随声附和 提交于 2019-12-01 20:22:02
问题 I am trying to run a Postgresql database using minikube with a persistent volume claim. These are the yaml specifications: minikube-persistent-volume.yaml: kind: PersistentVolume apiVersion: v1 metadata: name: pv0001 labels: type: hostpath spec: capacity: storage: 5Gi accessModes: - ReadWriteMany hostPath: path: "/Users/jonathan/data" postgres-persistent-volume-claim.yaml: apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pv-postgres spec: accessModes: [ "ReadWriteMany" ] resources:

Kubernetes cannot pull image from private docker image repository

笑着哭i 提交于 2019-12-01 13:57:17
问题 I have problem with kubernetes (minikube) and pull images from local image repository on docker. Docker repository was created: docker run --entrypoint htpasswd registry:2 -Bbn zordon examplePassword > /mnt/LINUX/auth/htpasswd docker run -d \ -p 5000:5000 \ --restart=always \ --name registry \ -v /mnt/LINUX/dockerreg:/var/lib/registry \ -v /mnt/LINUX/auth:/auth \ -e "REGISTRY_AUTH=htpasswd" \ -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \ -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \

How does one install the kube-dns addon for minikube?

天大地大妈咪最大 提交于 2019-12-01 04:05:15
Can someone please detail the steps necessary to install the kube-dns addon? I've downloaded the nearly 400MB git repo in the previous link and run make as instructed but get Nothing to be done for 'all'. The docs aren't clear what form add-ons exist in, and how to install them. The "Administrators guide" link there takes me to this unhelpful page. I've tried https://stackoverflow.com/a/42315074/4978821 , but got an error validating data message. Even if this worked, it seems like it'd be an unofficial and awkward solution. Answers like this are also too vague: https://stackoverflow.com/a

Routing an internal Kubernetes IP address to the host system

你离开我真会死。 提交于 2019-12-01 02:16:38
问题 While running Minikube, I want to connect to a server that has the annoying habit of announcing itself to a service registry with its internal IP address from inside its pod. However for legacy reasons I have to connect to this registry first and retrieve that server's ip address from it. The only way to access this server from my dev machine, it seems to me, is bridging to the internal network, so I can access the networking of the Minikube. Is there an easy way to do this? 回答1: You can add

How does one install the kube-dns addon for minikube?

為{幸葍}努か 提交于 2019-12-01 01:10:20
问题 Can someone please detail the steps necessary to install the kube-dns addon? I've downloaded the nearly 400MB git repo in the previous link and run make as instructed but get Nothing to be done for 'all'. The docs aren't clear what form add-ons exist in, and how to install them. The "Administrators guide" link there takes me to this unhelpful page. I've tried https://stackoverflow.com/a/42315074/4978821, but got an error validating data message. Even if this worked, it seems like it'd be an

Calling an external service from within Minikube

萝らか妹 提交于 2019-11-30 20:29:12
问题 I have a service (/deployment/pod) running in my Minikube (installed on my Mac) that needs to call an external http service that runs directly on my Mac (i.e. outside Minikube). The domain name of that external service is defined into my Mac /etc/hosts file. Yet, my service within Minikube cannot call that external service. Any idea what I need to configure where? Many thanks. C 回答1: Create Endpoints that will forward traffic to your desire external IP address (your local machine). You can