What are you trying to achieve by this "attaching"? You can make Kubernetes count the Pod as part of the ReplicationController by adjusting the labels on the Pods, but I believe that will cause the RC to kill one of the Pods in order to reach the RC's desired replica count.
On Wed, Oct 5, 2016 at 11:47 PM, Vinoth Narasimhan <talk2.v...@gmail.com> wrote: > Kubernetes Version 1.3.6 > > I have rc named "monitoring-influxdb-grafana-v3" in kube-system namespace. > > In which two containers are running influxdb,grafana. > > Is there a way to attach a 3rd container to it named "kapacitor" in the > same rc "monitoring-influxdb-grafana-v3" in kube-system ? > > i have tried the below yaml file . It is not working . > apiVersion: v1 > kind: Pod > metadata: > name: monitoring-influxdb-grafana-v3 > namespace: kube-system > labels: > k8s-app: influxGrafana > version: v3 > kubernetes.io/cluster-service: "true" > spec: > replicas: 1 > selector: > k8s-app: influxGrafana > version: v3 > template: > metadata: > labels: > k8s-app: influxGrafana > version: v3 > kubernetes.io/cluster-service: "true" > spec: > containers: > - image: dockerhub/kapacitor:v1 > name: kapacitor > env: > - name: EMAIL_TO > value: o...@xyz.com > - name: MAIL_SERVER > value: mailserver.default > resources: > # keep request = limit to keep this container in guaranteed > class > limits: > cpu: 100m > memory: 500Mi > requests: > cpu: 100m > memory: 500Mi > ports: > - containerPort: 9092 > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-users@googlegroups.com. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.