FAQ Database Discussion Community


How to re-connect to Amazon kubernetes cluster after stopping & starting instances?

kubernetes
I create a cluster for trying out kubernetes using cluster/kube-up.sh in Amazon EC2. Then I stop it to save money when not using it. Next time I start the master & minion instances in amazon, *~/.kube/config has old IP-s for the cluster master as EC2 assigns new public IP to...

Permissions error while setting up kubernetes pod

debian,google-compute-engine,kubernetes
I am a newbie to kubernetes and docker and I am following the tutorial at https://cloud.google.com/container-engine/docs/tutorials/hello-wordpress which teaches how to setup a pod running wordpress. I have setup a GCE instance and have logged into my debian instance and installed docker and kubernetes. But when I specify a file to...

How do I access the Kubernetes api from within a pod container?

kubernetes
I used to be able to curl https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCP_PORT/api/v1beta3/namespaces/default/ as my base URL, but in kubernetes 0.18.0 it gives me "unauthorized". The strange thing is that if I used the external ip address of the api machine (http://172.17.8.101:8080/api/v1beta3/namespaces/default/), it works just fine.

Boot2Docker searching for docker-bootstrap.sock which does not exist

osx,docker,boot2docker,unix-socket,kubernetes
I am currently trying to set up kubernetes on a multi-docker container on CoreOS stack for AWS. To do this I need to set up etcd for flannel and am currently using this guide but am having problems at the first stage where I am suggested to run sudo sh...

Can I call rs.initiate() and rs.Add() from node.js using the MongoDb driver?

node.js,mongodb,docker,kubernetes
I'm looking to automate the process of setting up a MongoDb replica set via a sidecar when using Docker and Kubernetes. The above setup isn't terribly important, what it boils down to is that I need to be able to call the mongo replica set commands (e.g. rs.initiate(), rs.add('anotherserver'), rs.conf(),...

Using Kubernetes' hooks

kubernetes
I would like to try Kubernetes' hooks but I didn't find any example how I should do it. As far as I know, with this hooks I can run bash scripts in freshly created containers and prior to terminate them. I've found just a short documentation which say this is...

Openshift .kubeconfig file and certificate authentication

openshift-origin,kubernetes
I have been messing around with openshift and reading as much documentation as i can. Yet, the authentication performed by default(using admin .kubeconfig) puzzles me. 1)Are client-certificate-data and client-key-data the same as the admin certificate and key? I ask this because the contents of the certificate/key files are not the...

How does kubernetes replication controller handle data?

kubernetes
If I setup a replication controller for something like a database, how does it keep the data in the replicas in-sync? If one of the replica goes down, how does it bring it back up with the latest data?

Is there a way to tell kubernetes to update your containers?

automation,docker,kubernetes
I have a kubernetes cluster, and I am wondering how (best practice) to update containers. I know the idea is to tear down the old containers and put up new ones, but is there a one-liner I can use, do I have to remove the replication controller or pod(s) and...

When should you create more than one docker container image instance with Kubernetes Replication Controller?

docker,google-compute-engine,kubernetes
When using Kubernetes to manage your docker containers, particularly when using the replication controller, when should you increase an images running container instances to more than 1? I understand that Kubernetes can spawn as many container replicas as needed in the replication controller configuration file, but why spawn multiple running...

How to know Pod's own IP address from the container in the Pod?

kubernetes
Kubernetes assigns an IP address for each container, but how can I acquire the IP address from the container in the Pod? I couldn't find the way from documentations.

How to convert docker run command into json file?

json,command-line,docker,kubernetes,pydio
I was wondering if anyone knows how to create a json file that would be the same as running: docker run -p 80:80 -p 443:443 starblade/pydio-v4 I trying something very ambitious, I want to start my docker container in kubernetes-mesos cluster but can't seem to get the ports correct in...

Kubernetes minion not completely connecting

docker,coreos,kubernetes,etcd,flannel
I have a dev kubernetes cluster setup where I have a minion running kube-proxy and kubelet. Both only start if it can connect to the master's apiserver, which it can. Howerver I am getting error updating node status, will retry: error getting node "10.211.55.126": minion "10.211.55.126" not found I notice...

Can kube-apiserver allow the unsecure connection outside of localhost?

coreos,kubernetes,etcd
I'm trying to setup a kubernetes cluster for a development environment (local vms). Because it's development I'm not using working certs for the api-server. It would seem I have to use the secure connection in order to connect minion daemons such as kube-proxy and kubelet to the master's kube-apiserver. Has...

Does Kubernetes provision new VMs for pods on my cloud platform?

kubernetes
I'm currently learning about Kubernetes and still trying to figure it out. I get the general use of it but I think that there still plenty of things I'm missing, here's one of them. If I want to run Kubernetes on my public cloud, like GCE or AWS, will Kubernetes...

Kubernetes cluster using Vagrant not working after restart

kubernetes
I installed a Kubernetes cluster by following the instruction here: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/vagrant.md Everything looks fine the first time. I'm able to see the nodes, pods, deploy new pods, etc. The problem shows up when I stop the cluster and try to start it again. I'm restarting the cluster as indicated on...

How does Kubernetes' scheduler work?

kubernetes
How does Kubernetes' scheduler work? What I mean is that Kubernetes' scheduler appears to be very simple? My initial thought is that this scheduler is just a simple admission control system, not a real scheduler. Is it that correct? I found a short description, but it is not terribly informative:...

How to properly launch an OpenShift v3 app

docker,openshift-origin,kubernetes
As I am trying to launch a sample OpenShift v 3 (Docker/Kubernetes) app with this command: _output/local/go/bin/osc create -f examples/hello-openshift/hello-pod.json I am getting this error: Post https://localhost:8443/api/v1beta2/pods?namespace=default: x509: certificate signed by unknown authority which is also confirmed by this message: http: TLS handshake error from 127.0.0.1:58393: remote error: bad certificate...

Start kubernetes container with specific command

kubernetes
Using fleet I can specify a command to be run inside the container when it is started. It seems like this should be easily possible with Kubernetes as well, but I can't seem to find anything that says how. It seems like you have to create the container specifically to...

Does the kubernetes scheduler support anti-affinity?

elasticsearch,coreos,kubernetes
I'm looking at deploying Kubernetes on top of a CoreOS cluster, but I think I've run into a deal breaker of sorts. If I'm using just CoreOS and fleet, I can specify within the unit files that I want certain services to not run on the same physical machine as...

How to run two pods in exclusive nodes?

kubernetes
I'd like to run two pods in exclusive nodes. For instance, I have 4 nodes (node-1, node-2, node-3, node-4) and 2 pods (pod-1, pod-2). I want only one pod to run in each node and each pod to run in two nodes, e.g. pod-1 in node-1 and node-2, pod-2 in...

Kubernetes/Container engine HTTP API for creating pods

google-app-engine,kubernetes,google-container-engine
I need to create pods using HTTP. I created cluster using: gcloud preview container clusters create and I can create pod using: gcloud preview container pods create But this is not what i want. I want to create pods with instance of my application via http API. There is API...

Is it possible to set a different host port than the container's exposed port in docker?

docker,port,portforwarding,kubernetes
Is it possible to set a different host port than the container's exposed port in docker? For example docker run -name some_container -p 80:8080 -i -t some_img If so, is it -p host:container or -p container:host? I've looked through the docs and haven't found any examples of this nor details...

Etcd is running but no etcd.service is found in systemd on coreos

vagrant,coreos,systemd,kubernetes,etcd
So I'm trying to setup a master Kubernetes node on coreos in vagrant. I'm using the example master cloud-config, found here https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/coreos/cloud-configs/master.yaml with the addition of this as the first units: - name: etcd.service command: start - name: fleet.service command: start - name: docker-tcp.socket command: start enable: true content: |...

Google Container Engine (GKE): “Hello Wordpress” tutorial not working (ERR_CONNECTION_REFUSED)

google-cloud-platform,kubernetes,google-container-engine
I'm trying to setup example from Running Wordpress with a Single Pod. I've done Before You Begin section: $ gcloud config list [compute] zone = europe-west1-c [core] account = [email protected] disable_usage_reporting = False project = com-project-default I've done the steps from the tutorial: "Step 1: Create your cluster" logs here...

Any suggestion for running Aerospike on Kubernetes on CoreOS on GCE?

docker,google-compute-engine,kubernetes,aerospike
I would like to run Aerospike cluster on Docker containers managed by Kubernetes on CoreOS on Google Compute Engine (GCE). But since GCE does not permit multicast, I have to use Mesh heartbeat as described here, which has to be set up by specifying all node's IP addresses and ports;...

How do you update a node/minion's label in Kubernetes?

kubernetes
Anyone out there who succesfully updated a node/minion's label in Kubernetes? I can't seem to find any documentation for it. I tried: kubectl update -f minion.yaml with a template gotten from kubectl get minion 192.168.0.102 -o yaml. I get the following error: minion "192.168.0.102" is invalid: status: invalid value '{HostIP:192.168.0.102...

Unable to access the internet from Kubernetes containers

vagrant,docker,kubernetes
I am working with the Vagrant Kubernetes 0.9.3 setup on Mac OSX. Environment: Kubernetes 0.9.3 Vagrant 1.7.2 VirtualBox-4.3.20-96996-OSX I am able to successfully deploy images and start containers in a single minion environment: master minion-1 I am unable to access the Internet from inside a running container. I can access...

Kubernetes Storage on bare-metal/private cloud

storage,persistent,pod,kubernetes
I'm just starting with Kubernetes on 2 node (master-minion) setup on 2 private cloud servers. I've installed it, did basic config and got it running some simple pods/services from the master to the minion. My question is: How can I use persistent storage with the pods when not using Google...

How to check the containers running on a pod in kubernettes?

kubernetes
I am able to get a list of all pods running on a kubernetes cluster using: kubectl get pods How do I get all the containers running on a particular pod?...

Access other containers of a pod in Kubernetes

docker,kubernetes
When I define multiple containers in a pod/pod template like one container running nginx and another php-fpm, how can they access each other? Do I have to define some links in the definition (I could not find docs explaining all available config options) or can they each other by default?...

skydns troubles - i must not 'get it'?

kubernetes
I'm using google container engine and I can create pods and services in my cluster. But when I try to use the DNS feature (skydns) to lookup my services nothing is being found. If I log in to the non-master node, I can see the DNS container and can use...

Accessing Kubernetes API on Google Container Engine

kubernetes,google-container-engine
According to Kubernetes API docs it is possible to create/list/delete pods, replication controllers and services: http://kubernetes.io/third_party/swagger-ui/#!/v1beta1 However in the Google Container Engine documentation they don't seem to expose this API. The only resources you can manage through a REST API are clusters. Pods, replication controllers and services have to be...

Run Kubernetes on EC2

ssh,amazon-ec2,coreos,kubernetes
I am trying to run kubernetes on EC2 and I used CoreOs alpha channel ami.I configured Kubectl ssh tunnel for the communication between Kubectl client and Kubernets API. But when I try kubectl api-versions command, I am getting following error. Couldn't get available api versions from server: Get http://MyIP:8080/api: dial...

Where does kubernete's kubelet create service environment variables?

node.js,docker,service-discovery,kubernetes
I'm creating a kubernetes cluster, and in it I have several services. I know based on https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/services.md#discovering-services I have two options. use the environment variables set by the kubelet. use skydns I want to try to use the environment variables first before I go adding another dependency into the mix....

How to update a set of pods running in kubernetes?

kubernetes
What is the preferred way of updating a set of pods (e.g. after making code changes & pushing underlying docker image to docker hub) controlled by a replication controller in kubernetes cluster? I can see 2 ways: Deleting & re-creating replication controller manually Using kubectl rolling-update With the rolling-update I...

Is there a reliable way how to run virtualized Docker / Kubernetes stack on Windows?

windows,vagrant,kubernetes
Are there any up-to-date guides, or VM images of some Linux VM + Kubernetes that I could run on Windows? Both VMWare, VirtualBox or Vagrant images would help. I'm trying to set up a development environment. (There is no production environment yet, but it will be most likely self-hosted.) I...

how to connect a kubernetes pod to the outside world without a forwarding rule (google container engine)

firewall,kubernetes,google-container-engine
I'm using Google's Container Engine service, and got a pod running a server listening on port 3000. I set up the service to connect port 80 to that pod's port 3000. I am able to curl the service using its local and public ip from within the node, but not...

Running Kubernetes locally

kubernetes,google-container-engine
I am planning to test Kubernetes locally, but would like to ask some theoretic questions before. I created a pipeline in python that takes as input a whole bunch of files from a directory, and created a docker image out of it (this is my Pod) What I understood from...