kubernetes-helm

How to pass entire JSON string to Helm chart value?

戏子无情 提交于 2019-12-06 01:22:53
How can I pass the entire JSON string to a Helm chart value? I have values.yml where the config value should contain entire JSON with a configuration of an application ... config: some JSON here ... and I need to pass this value to a secret template and then mount it as a volume to a Kubernetes pod. {{- $env := default "integration" .Values.env}} apiVersion: v1 kind: Secret metadata: name: {{ .Release.Name }}-{{ $env }} type: Opaque data: config.json: {{ .Values.config | b64enc | quote }} However the obvious approach of passing single quoted string like '{"redis": "localhost:6379"}' fails

Is there a way to get ordinal index of a pod with in kubernetes statefulset configuration file?

依然范特西╮ 提交于 2019-12-05 23:31:55
We are on Kubernetes 1.9.0 and wonder if there is way to access an "ordinal index" of a pod with in its statefulset configuration file. We like to dynamically assign a value (that's derived from the ordinal index) to the pod's label and later use it for setting pod affinity (or antiaffinity) under spec. Alternatively, is the pod's instance name available with in statefulset configfile? If so, we can hopefully extract ordinal index from it and dynamically assign to a label (for later use for affinity). Right now the only option is to extract index from host name lifecycle: postStart: exec:

kubernetes helm: “lost connection to pod” and “transport is closing” errors

ぃ、小莉子 提交于 2019-12-05 19:39:47
问题 I run helm upgrade --install to modify the state of my kubernetes cluster and I sometimes get an error like this: 22:24:34 StdErr: E0126 17:24:28.472048 48084 portforward.go:178] lost connection to pod 22:24:34 Error: UPGRADE FAILED: transport is closing It seems that I am not the only one, and it seems to happen with many different helm commands. All of these github issues have descriptions or comments mentioning "lost connection to pod" or "transport is closing" errors (usually both): https

On kubernetes helm how to replace a pod with new config values

爷,独闯天下 提交于 2019-12-05 18:05:27
I am using helm charts to deploy pods with a "ConfigMap" managing the configurations. I edit ConfigMap directly to make changes to configuration files and then delete pods using kubectl delete, for the new configuration to take effect. Is there any easy way using helm to replace a running pod with the new configuration without executing " kubectl delete " command Oliver Nicolaas Ponder We have found that using --recreate-pods will immediately terminate all running pods of that deployment, meaning some downtime for your service. In other words, there will be no rolling update of your pods. The

Helm install or upgrade release failed on Kubernetes cluster: the server could not find the requested resource or UPGRADE FAILED: no deployed releases

风格不统一 提交于 2019-12-05 17:01:44
Using helm for deploying chart on my Kubernetes cluster, since one day, I can't deploy a new one or upgrading one existed. Indeed, each time I am using helm I have an error message telling me that it is not possible to install or upgrade ressources. If I run helm install --name foo . -f values.yaml --namespace foo-namespace I have this output: Error: release foo failed: the server could not find the requested resource If I run helm upgrade --install foo . -f values.yaml --namespace foo-namespace or helm upgrade foo . -f values.yaml --namespace foo-namespace I have this error: Error: UPGRADE

Golang template (helm) iterating over a list of maps

对着背影说爱祢 提交于 2019-12-05 12:23:06
I'm using helm to generate kubernetes yamls. My values.yaml looks like this: ... jobs: - nme: job1 command: [sh, -c, "/app/deployment/start.sh job1"] activeDeadlineSeconds: 600 - name: job2 command: [sh, -c, "/app/deployment/start.sh job2"] activeDeadlineSeconds: 600 ... templates/jobs.yaml {{ range $i, $job := .Values.jobs -}} apiVersion: batch/v1 kind: Job metadata: name: {{ template "name" . }}-{{ $job.name }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" spec: activeDeadlineSeconds: {{ $job.activeDeadlineSeconds }} template: metadata: labels: app: {{ template

Helm how to define .Release.Name value

只谈情不闲聊 提交于 2019-12-05 10:45:19
问题 I have created basic helm template using helm create command. While checking the template for Ingress its adding the string RELEASE-NAME and appname like this RELEASE-NAME-microapp How can I change .Release.Name value? helm template --kube-version 1.11.1 microapp/ # Source: microapp/templates/ingress.yaml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: RELEASE-NAME-microapp labels: app: microapp chart: microapp-0.1.0 release: RELEASE-NAME heritage: Tiller annotations: kubernetes

Starting an Ingress service on Docker for Mac

房东的猫 提交于 2019-12-05 10:27:54
Update: Using: kubectl expose deployment <Name-Of-Servce> --name=loadbalancer --port=8080 --target-port=8080 --type=LoadBalancer The kubectl get services is showing pending: loadbalancer LoadBalancer <x.x.x.x> <pending> 8080:32670/TCP 2m Before Docker surported Kubernetes, I could use MiniKube and Helm: helm install stable/jenkins kubectl get services // To get the service name minikube service original-llama-jenkins // << The service name Now that we have Docker for Mac(Edge) supporting Kubernetes, how do you add an EXTERNAL-IP ? Thanks Unless something seriously magical has happened with

Helm chart deployment and private docker repository

强颜欢笑 提交于 2019-12-05 02:21:59
问题 I have a private Docker repo with bunch of images. I am using Helm to deploy them to a Kubernetes cluster. Helm values.yaml contains the repository credentials: image: repository: <repo> tag: <version tag> pullPolicy: IfNotPresent imageCredentials: registry: <repo> username: <username> password: <pw> After doing the helm installation helm install myhelmchart --values values.yaml --version the pod's status is Init:ErrImagePull. kubectl describe pods gives this error: Failed to pull image

Accessing the deployed service using Helm chart in Kubernetes cluster

此生再无相见时 提交于 2019-12-05 01:06:35
Currently, I am trying to deploy my microservice end point Docker image on a Kubernetes cluster by creating the Helm chart. For this, I created the chart and changed the parameters in values.yaml and deployment.yaml for port change. And also I want to access from my Angular front end. So I added service type= NodePort. And when I described the service, it gave me the port 30983 to access. And I accessed like http://node-ip:30983/endpoint But I am only getting the site can't be reached the message. Let me add the details of what I did here: My values.yaml file containing the following to