title: Editing configmap.yml and elasticsearch.yml in order to change password
body: <p>I want to implement a jaeger installation with persistent storage using elasticsearch like backend on my Kubernetes cluster on Google cloud platform.</p>
  
  <p>I am using the jaeger kubernetes templates and I am starting with elasticsearch <a href="https://github.com/jaegertracing/jaeger-kubernetes#production-setup" rel="nofollow noreferrer">production setup</a>.</p>
  
  <p>I've downloaded and modified the <a href="https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/production-elasticsearch/configmap.yml" rel="nofollow noreferrer"><code>configmap.yml</code></a> file in order to change the password field value and the <a href="https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/production-elasticsearch/elasticsearch.yml" rel="nofollow noreferrer"><code>elasticsearch.yml</code></a> file in order to fix the password value which I've changed.</p>
  
  <p>My customized <code>.yml</code> files has stayed of this way:</p>
  
  <p><code>configmap.yml</code></p>
  
  <pre><code>apiVersion: v1
  kind: ConfigMap
  metadata:
    name: jaeger-configuration
    labels:
      app: jaeger
      jaeger-infra: configuration
  data:
    span-storage-type: elasticsearch
    collector: |
      es:
        server-urls: http://elasticsearch:9200
        username: elastic
        password: **my-password-value**
      collector:
        zipkin:
          http-port: 9411
    query: |
      es:
        server-urls: http://elasticsearch:9200
        username: elastic
        password:  **my-password-value**
    agent: |
      collector:
        host-port: "jaeger-collector:14267"
  </code></pre>
  
  <p><code>elasticsearch.yml</code></p>
  
  <pre><code>apiVersion: v1
  kind: List
  items:
  - apiVersion: apps/v1beta1
    kind: StatefulSet
    metadata:
      name: elasticsearch
      labels:
        app: jaeger
        jaeger-infra: elasticsearch-statefulset
    spec:
      serviceName: elasticsearch
      replicas: 1
      template:
        metadata:
          labels:
            app: jaeger-elasticsearch
            jaeger-infra: elasticsearch-replica
        spec:
          containers:
            - name: elasticsearch
              image: docker.elastic.co/elasticsearch/elasticsearch:5.6.0
              imagePullPolicy: Always
              command:
                - bin/elasticsearch
              args:
                - "-Ehttp.host=0.0.0.0"
                - "-Etransport.host=127.0.0.1"
              volumeMounts:
                - name: data
                  mountPath: /data
              readinessProbe:
                exec:
                  command:
                  - curl
                  - --fail
                  - --silent
                  - --output
                  - /dev/null
                  - --user
                  - elastic:**my-password-value**
                  - localhost:9200
                initialDelaySeconds: 5
                periodSeconds: 5
                timeoutSeconds: 4
          volumes:
            - name: data
              emptyDir: {}
  - apiVersion: v1
    kind: Service
    metadata:
      name: elasticsearch
      labels:
        app: jaeger
        jaeger-infra: elasticsearch-service
    spec:
      clusterIP: None
      selector:
        app: jaeger-elasticsearch
      ports:
      - port: 9200
        name: elasticsearch
      - port: 9300
        name: transport
  </code></pre>
  
  <p>And then, I've created the kubernetes cluster configuration with the new password value from my machine to my KGE via <code>kubectl</code> command</p>
  
  <pre><code>~/w/j/AddPersistVolumToPods ❯❯❯ kubectl create -f configmap.yml
  configmap/jaeger-configuration created
  ~/w/j/AddPersistVolumToPods ❯❯❯
  </code></pre>
  
  <p>And I've created the elasticsearch service via StatefulSet specialized pod  (also with the new password value) from my machine to my KGE via <code>kubectl</code> command</p>
  
  <pre><code>~/w/j/AddPersistVolumToPods ❯❯❯ kubectl create -f elasticsearch.yml
  statefulset.apps/elasticsearch created
  service/elasticsearch created
  ~/w/j/AddPersistVolumToPods ❯❯❯
  </code></pre>
  
  <p>I can see that I have the elasticsearch service created on my GKE cluster</p>
  
  <pre><code>~/w/j/A/production-elasticsearch ❯❯❯ kubectl get services
  NAME            TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)             AGE
  elasticsearch   ClusterIP   None          &lt;none&gt;        9200/TCP,9300/TCP   41m
  kubernetes      ClusterIP   10.39.240.1   &lt;none&gt;        443/TCP             1h
  ~/w/j/A/production-elasticsearch ❯❯❯
  </code></pre>
  
  <p>And I have the <code>elasticsearch-0</code> pod which have the docker container of elasticsearch service</p>
  
  <pre><code>~/w/j/A/production-elasticsearch ❯❯❯ kubectl  get pod elasticsearch-0
  NAME              READY   STATUS    RESTARTS   AGE
  elasticsearch-0   0/1     Running   0          25m
  ~/w/j/A/production-elasticsearch ❯❯❯
  </code></pre>
  
  <p>But when I can detail my pod on KGE, I see that my pod have some warnings and is not healthy ...</p>
  
  <p><img src="https://cldup.com/y5mSxWMIQS-3000x3000.png" alt=""></p>
  
  <p>I get the pod description detail and I get this warning</p>
  
  <pre><code>Warning  Unhealthy              2m6s (x296 over 26m)  kubelet, gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk  Readiness probe failed:
  </code></pre>
  
  <p>Here, some part of my entire output to <code>describe</code> command</p>
  
  <pre><code>~/w/j/A/production-elasticsearch ❯❯❯ kubectl describe pod elasticsearch-0
  Name:           elasticsearch-0
  Namespace:      default
  Node:           gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk/10.164.0.2
  Start Time:     Tue, 08 Jan 2019 13:57:52 +0100
  Labels:         app=jaeger-elasticsearch
                  controller-revision-hash=elasticsearch-c684bb745
                  jaeger-infra=elasticsearch-replica
                  statefulset.kubernetes.io/pod-name=elasticsearch-0
  Annotations:    kubernetes.io/limit-ranger: LimitRanger plugin set: cpu request for container elasticsearch
  Status:         Running
  IP:             10.36.2.7
  Controlled By:  StatefulSet/elasticsearch
  Containers:
    elasticsearch:
      Container ID:  docker://54d935f3e07ead105464a003745b80446865eb2417da593857d21c56610f704b
      Image:         docker.elastic.co/elasticsearch/elasticsearch:5.6.0
      Image ID:      docker-pullable://docker.elastic.co/elasticsearch/elasticsearch@sha256:f95e7d4256197a9bb866b166d9ad37963dc7c5764d6ae6400e551f4987a659d7
  
                   node.kubernetes.io/unreachable:NoExecute for 300s
  Events:
    Type     Reason                 Age                   From                                                          Message
    ----     ------                 ----                  ----                                                          -------
    Normal   Scheduled              27m                   default-scheduler                                             Successfully assigned elasticsearch-0 to gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk
    Normal   SuccessfulMountVolume  27m                   kubelet, gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk  MountVolume.SetUp succeeded for volume "data"
    Normal   SuccessfulMountVolume  27m                   kubelet, gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk  MountVolume.SetUp succeeded for volume "default-token-vkxnj"
    Normal   Pulling                27m                   kubelet, gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk  pulling image "docker.elastic.co/elasticsearch/elasticsearch:5.6.0"
    Normal   Pulled                 26m                   kubelet, gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk  Successfully pulledimage "docker.elastic.co/elasticsearch/elasticsearch:5.6.0"
    Normal   Created                26m                   kubelet, gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk  Created container
    Normal   Started                26m                   kubelet, gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk  Started container
    Warning  Unhealthy              2m6s (x296 over 26m)  kubelet, gke-jaeger-persistent-st-default-pool-d72f7fde-ggrk  Readiness probe failed:
  ~/w/j/A/production-elasticsearch ❯❯❯
  </code></pre>
  
  <p>I go to the container log section on GCP and I get the following:</p>
  
  <p><img src="https://cldup.com/29IysnUy33-2000x2000.png" alt=""></p>
  
  <p>And in the audit log section I can see something like this:</p>
  
  <pre><code>resourceName: "core/v1/namespaces/default/pods/elasticsearch-0"     
  response: {
     @type: "core.k8s.io/v1.Status"    
     apiVersion: "v1"    
     code: 500    
  
  details: {…}    
     kind: "Status"    
     message: "The POST operation against Pod could not be completed at this time, please try again."    
  
  metadata: {…}    
     reason: "ServerTimeout"    
     status: "Failure"    
    }
    serviceName: "k8s.io"   
  
  status: {
     code: 13    
     message: "The POST operation against Pod could not be completed at this time, please try again."    
    }
   }
  </code></pre>
  
  <p>If I try with the original files and I change the password via KGE on GCP I get this error:</p>
  
  <pre><code>Pod "elasticsearch-0" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)
  </code></pre>
  
  <p>After that I've create a pod, is not possible update or perform some changes?</p>
  
  <p><code>kubectl apply -f .....</code>  ? ... I suposse</p>
  
  <p>How to can I change the elasticsearch password?</p>
  
  <p>If I want configure a persistent volume claim on this pod, can I perform this before the <code>kubectl create -f</code>command and my volume and mountPath will be created on container and KGE?</p>
  
  <p>If somebody can point me in the correct address, their support will be highly appreciated.</p>