2018-10-22         Zona

How to avoid override the container directory when using pvc in kubernetes?

When using pvc to persist the container data, it seems pvc always override the container's directory, the original data in directory will not be available, what's the reason ? This is by design. Kubelet is responsible for preparing the mounts for your container, and they can come from plaethora of different storagebackends. At the time of mounting they are empty and kubelet has no reason to put any content in them.That said, there are ways to achieve what you seem to expect by using init container. In your pod you define init container using your docker image, mount your...

 kubernetes                     1 answers                     13 view
 2018-10-22         Myra

How to save status file for service in kubernetes?

The issue is that I would like to persistent one status file(status generated by the service), not the directory, of some service in case the status lost when service restart, how to solve? If it's just a status file, you should be able to write it into a config map. See Add ConfigMap data to a Volume. If in volumes you havevolumes: - name: status configMap: name: status defaultMode: 420 optional: trueand in volumeMountsvolumeMounts: - name: status mountPath: /var/service/statusthen you should be able to write in it. See also how kube-dns does it w...

 kubernetes                     2 answers                     13 view
 2018-10-22         Winifred

How to mount data file in kubernetes via pvc?

I want to persistent data file via pvc with glusterfs in kubernetes, I mount the diretory and it'll work, but when I try to mount the file, it'll fail, because the file was mounted to the directory type, how can I mount the data file in k8s ?image info: how can I mount the data file in k8s ?This is often application specific and there are several ways to do so, but mainly you want to read about subPath.Generally, you can chose to:use subPath to separate config files.Mount volume/path as directory at some other location and then link file to specific place within pod (i...

 kubernetes                     1 answers                     15 view
 2018-10-22         Kelly

Kubernetes container affinity based on replica?

I have a StatefulSet with 10 replicas, each of which have hundreds of GB of data.I'd like to run a backup command to an object store (e.g. S3) on just 1 of the 10 replicas. (so the data can be loaded in an initContainer step)Is it possible to either schedule container using affinity based on replica ID? Or is it possible to retrieve the replica ID from an environment variable? I've iterated through 2 solutions on this so far:using the $HOSTNAME env var to check that the current pod is replica 0This works if you can tolerate taking backups while the pod is running- "[ $HO...

 kubernetes                     1 answers                     17 view
 2018-10-22         Quentin

helm test failure: timed out waiting for the condition

We have a simple release test for a Redis chart. After running helm test myReleaseName --tls --cleanup, we got RUNNING: myReleaseName-redisERROR: timed out waiting for the conditionThere are several issues in Github repository at https://github.com/helm/helm/search?q=timed+out+waiting+for+the+condition&type=Issues but I did not find a solution to it. What's going on here? This first looks puzzling and shows little information because --cleanup will kill the pods after running. One can remove it to get more information. I, thus, reran the test with helm test myRelease...

 kubernetes                     1 answers                     74 view
 2018-10-22         Adonis

Migrating Cockroach DB from local machine to GCP Kubernetes Engine

Followed instructions here to create a local 3 node secure clusterGot the go example app running with the following DB connection string to connect to the secure clustersql.Open("postgres", "postgresql://root@localhost:26257/dbname?sslmode=verify-full&sslrootcert=<location of ca.crt>&sslcert=<location of client.root.crt>&sslkey=<location of client.root.key>")Cockroach DB worked well locally so I decided to move the DB (as in the DB solution and not the actual data) to GCP Kubernetes Engine using the instructions hereEverything worked fine - pod...

 kubernetes                     1 answers                     36 view
 2018-10-22         Alger

How to connect to Kafka on Kubernetes externally

I successfully deployed Kafka to Kubernetes on local Docker (gcp & minikube) using Yolean/kubernetes-kafka & Helm chartand tested topic production successfully from within the cluster using this python script:#!/usr/bin/env pythonfrom kafka import KafkaConsumer, KafkaProducerKAFKA_TOPIC = 'demo'# KAFKA_BROKERS = 'localhost:32400' # see step 1# from inside the cluster in a different namespace# KAFKA_BROKERS = 'bootstrap.kafka.svc.cluster.local:9092'KAFKA_BROKERS = 'kafka.kafka.svc.cluster.local:9092'print('KAFKA_BROKERS: ' + KAFKA_BROKERS)producer = KafkaProducer(bo...

 kubernetes                     1 answers                     67 view
 2018-10-22         Cyril

Errors when deploying ibm-eventstreams-dev into local environment

I tried to install ibm-eventstreams-dev v 0.1.2 into my Mac. After I installed eventstreams into my Mac, there's always several pods that can't run. It includes three kafka pods: es-ibm-es-kafka-sts-0/1/2, es-ibm-es-ui-deploy-69758d9dfd-kc2zx, es-ibm-es-ui-oauth2-client-reg-pgvq6 and there also have a failed job named es-ibm-es-ui-oauth2-client-reg. You can see the details in the follow images:So I have two questions about the ibm-event-stream:Does ibm-eventstreams-dev only supported on ICP? Can I install it on my local environment without ICP environment?How could I solve ...

 kubernetes                     2 answers                     87 view
 2018-10-22         Andre

Ideas to configure the application.server param dynamically for Kafka Streams remote interactive queries on a spring boot app running on Kubernetes

I am deploying a Kafka Streams application on Kubernetes replicated as several pods. This pods are exposed as a Kubernetes service so I have a common entry point that load balances the traffic: myapp:8080The point is I want to run an interactive query that could be remote so I have set it up according to the documentationThe web layer is provided by a spring boot application running on port 8080.My question is how to configure dynamically the application.server param with a unique endpoint per pod.UPDATE:I guess what I need is to configure the application.server with the va...

 kubernetes                     1 answers                     19 view
 2018-10-22         Darnell

Can't access hazelcast mancenter using kubernetes

I'm trying to investigate and learn a little more about kubernetes and I followed the guide https://blog.hazelcast.com/deploy-monitor/ to install the hazelcast monitor in my kubernetes cluster.If I see the kubernetes dashboard it has the 2 deployments, 3 pods and my-service as green.Running this:λ kubectl get service my-serviceNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEmy-service NodePort <none> 8080:30476/TCP 2hBut when I runλ minikube service my-serviceOpening kubernetes service default/my-service in default ...

 kubernetes                     1 answers                     83 view
 2018-10-22         Milo

GitLab Kubernetes integration error; configuration of Helm Tiller already exists

After connecting my Gitlab repo to my self-putup Kubernetes cluster via Operations > Kubernetes, I want to install Helm Tiller via the GUI; but I get: Something went wrong while installing Helm Tiller Kubernetes error: configmaps "values-content-configuration-helm" already existsThere are no pods running on the cluster and kubectl version returns: Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:17:28Z", GoVersion:"go1.10.3", Compiler:"gc", Plat...

 kubernetes                     1 answers                     70 view
 2018-10-22         Dominic

Registering for notification emails from cloud-proactive-comms

My colleagues receive emails from "cloud-proactive-comms" with notifications to upgrade our cluster in response to security threats and stuff like that.How do I register for these emails as well? First of all, you need to be a project owner in order to receive those emails form "cloud-proactive-comms". You can also check with your colleague, which permission you are lacking to get those email. As it's possible that your colleague is a Project Owner. Additionally, if you need RSS feeds available for Security bulletins related to Kubernetes Engine, please visit this articl...

 kubernetes                     1 answers                     17 view
 2018-10-22         Geoffrey

Kubernetes TLS issue

Im having some issues when building my Kubernetes Cluster.Whenever I try to run a kubectl command, or my ansible scrips does, it gets the following error: Unable to connect to the server: tls: either ServerName or InsecureSkipVerify must be specified in the tls.ConfigNot from a script or by hand can anything execute the kubectl command, yet the apiserver pod is running.Any help will be greatly appreciated. You probably either haven't specified the server name or the CA certificate, or specified an incorrect one. Make sure you have specified the correct CA and server ...

 kubernetes                     1 answers                     62 view
 2018-10-22         Nicholas

Is there any way to get namespaces based on a particular metadata label

My namespace has some custom metadata labels. Some have the labels some don't. Is there any way to get the namespaces which has a particular label using kubectl? Yes. Like so:$ kubectl create ns nswithlabels$ kubectl label namespace nswithlabels this=thing$ kubectl describe ns/nswithlabelsName: nswithlabelsLabels: this=thingAnnotations: <none>Status: ActiveNo resource quota.No resource limits.$ kubectl get ns -l=thisNAME STATUS AGEnswithlabels Active 6mNote: I could have also used -l=this=thing in the last command to specify b...

 kubernetes                     1 answers                     64 view
 2018-10-22         Carey

Minikube default CPU/Memory

I wonder what is the actual default memory and cpu for minikube in vm-driver=none mode: minikube config view memory && minikube config view cpuis not showing anything when starting minikube without specifying them The default memory constant is 2048 (megabytes) as seen here. This doesn't automatically change with the vm-driver. [XXX]

 kubernetes                     1 answers                     67 view
 2018-10-22         Mortimer

k8s fails scheduling of local ssd volume on GCP

I'm trying to specify Local SSD in a Google Cloud as a PersistedVolume. I followed the docs to set up the automated SSD provisioning, and running kubectl get pv returns a valid volume:NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGElocal-pv-9721c951 368Gi RWO Delete Available local-scsi 1hThe problem is that I cannot get my pod to bind to it. The kubectl get pvc keeps showing this:NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGEmap...

 kubernetes                     2 answers                     68 view

Page 1 of 141  |  Show More Pages:  Top Prev Next Last