[kubernetes-users] How to restore a cluster created by kubeadm when kube-controller-manager exited?

2017-12-04 Thread studywiller
If kube-controller-manager exited, no pods can update again. At the same time, 
kube-controller-manager pod can not be created too, how can I restore this 
cluster? 

Thanks very much.

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread Rodrigo Campos
It's working as you need? :)

On Monday, December 4, 2017,  wrote:

> thank you all for the support ;-)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q" 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" 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.


Re: [kubernetes-users] How to make a container(s) to able to reach to ClusterIP:port or Service's Publilc IP:NodePort?

2017-12-04 Thread 'Tim Hockin' via Kubernetes user discussion and Q
Did you figure it out?

On Mon, Dec 4, 2017 at 10:15 AM, Kyunam Kim  wrote:
> Understood - thanks!
>
> On Thursday, November 30, 2017 at 8:55:31 PM UTC-8, Tim Hockin wrote:
>>
>> If it came in via the public IP, as you said:
>> `https://PublicIP:31245/app/rest/init` then the 192 address isn't part
>> of the request.
>>
>> On Thu, Nov 30, 2017 at 8:35 PM, Kyunam Kim  wrote:
>> > my guess is that the 3rd party web app copied it from the request.
>> >
>> > On Thursday, November 30, 2017 at 4:30:03 PM UTC-8, Tim Hockin wrote:
>> >>
>> >> Did you tell the app about the 192 address?  How did it know that IP
>> >> to redirect you?
>> >>
>> >> On Thu, Nov 30, 2017 at 4:07 PM, Kyunam Kim  wrote:
>> >> > service IP
>> >> >
>> >> > On Thursday, November 30, 2017 at 3:32:07 PM UTC-8, Tim Hockin wrote:
>> >> >>
>> >> >> It's not clear what 192 address represents - the pod IP, the service
>> >> >> IP, or an external LB IP?
>> >> >>
>> >> >> Also note that you have / characters where you need . characters - I
>> >> >> assume that is human error is reporting the issue?
>> >> >>
>> >> >>
>> >> >> On Thu, Nov 30, 2017 at 3:27 PM, Kyunam Kim 
>> >> >> wrote:
>> >> >> > I'm not that smart to prohibit anything in k8s yet ;-)
>> >> >> > Let me retry.
>> >> >> >
>> >> >> > My docker container runs a 3rd party web application over which I
>> >> >> > have
>> >> >> > no
>> >> >> > control and I have successful deployed it in k8s.
>> >> >> > I can access it thru https://192.168.99.100:31245.
>> >> >> > When I call https://PublicIP:31245/app/rest/init, the 3rd party
>> >> >> > web
>> >> >> > app
>> >> >> > starts an internal setup process and errors out by saying
>> >> >> > 'http://192.168/88/100:31245/app/admin' is not reachable from
>> >> >> > 'MY-APP-DEPLOYMENT-768D8FBC5D-CP92L'.
>> >> >> >
>> >> >> > I interpreted this as, Docker container with host name
>> >> >> > MY-APP-DEPLOYMENT-768D8FBC5D-CP92L cannot reach to
>> >> >> > http://192.168/88/100:31245/app/admin.
>> >> >> >
>> >> >> > What k8s' magic can I do to make this container to be able to
>> >> >> > reach
>> >> >> > 1)
>> >> >> > http://192.168/88/100:31245/app/admin or 2)
>> >> >> > http://172.17.0.7:6443/app/admin
>> >> >> > (Service's Endpoints) ?
>> >> >> >
>> >> >> > Hope this helps.
>> >> >> >
>> >> >> > On Thursday, November 30, 2017 at 2:19:35 PM UTC-8, Rodrigo Campos
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Thursday, November 30, 2017, Kyunam Kim 
>> >> >> >> wrote:
>> >> >> >>>
>> >> >> >>> How do I make a container aware of the service's IP:NodePort or
>> >> >> >>> ClusterIP:port address?
>> >> >> >>> Let's say, I can access my application at
>> >> >> >>> http://public-ip:port/myapp
>> >> >> >>> from the external world.
>> >> >> >>> I want a container(s) to be able to reach to
>> >> >> >>> http://public-ip:port
>> >> >> >>> Or
>> >> >> >>> to reach to ClusterIP:port.
>> >> >> >>>
>> >> >> >>> What k8s' capability do I use to make this happen?
>> >> >> >>
>> >> >> >>
>> >> >> >> Sorry, not sure I follow. Does it work for you using the service
>> >> >> >> name?
>> >> >> >> (Or
>> >> >> >> service+namespace)?
>> >> >> >>
>> >> >> >> Unless you prohibited it in some way (like with network policy,
>> >> >> >> but
>> >> >> >> that
>> >> >> >> is probably not the case) that should work.
>> >> >> >>
>> >> >> >> So, I might be missing something, sorry in advance :)
>> >> >> >
>> >> >> > --
>> >> >> > You received this message because you are subscribed to the Google
>> >> >> > Groups
>> >> >> > "Kubernetes user discussion and Q" group.
>> >> >> > To unsubscribe from this group and stop receiving emails from it,
>> >> >> > send
>> >> >> > an
>> >> >> > email to kubernetes-use...@googlegroups.com.
>> >> >> > To post to this group, send email to kubernet...@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" group.
>> >> > To unsubscribe from this group and stop receiving emails from it,
>> >> > send
>> >> > an
>> >> > email to kubernetes-use...@googlegroups.com.
>> >> > To post to this group, send email to kubernet...@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" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to kubernetes-use...@googlegroups.com.
>> > To post to this group, send email to kubernet...@googlegroups.com.
>> > Visit this group at 

Re: [kubernetes-users] How to make a container(s) to able to reach to ClusterIP:port or Service's Publilc IP:NodePort?

2017-12-04 Thread Kyunam Kim
Understood - thanks!

On Thursday, November 30, 2017 at 8:55:31 PM UTC-8, Tim Hockin wrote:
>
> If it came in via the public IP, as you said: 
> `https://PublicIP:31245/app/rest/init` 
>  then the 192 address isn't part 
> of the request. 
>
> On Thu, Nov 30, 2017 at 8:35 PM, Kyunam Kim  > wrote: 
> > my guess is that the 3rd party web app copied it from the request. 
> > 
> > On Thursday, November 30, 2017 at 4:30:03 PM UTC-8, Tim Hockin wrote: 
> >> 
> >> Did you tell the app about the 192 address?  How did it know that IP 
> >> to redirect you? 
> >> 
> >> On Thu, Nov 30, 2017 at 4:07 PM, Kyunam Kim  
> wrote: 
> >> > service IP 
> >> > 
> >> > On Thursday, November 30, 2017 at 3:32:07 PM UTC-8, Tim Hockin wrote: 
> >> >> 
> >> >> It's not clear what 192 address represents - the pod IP, the service 
> >> >> IP, or an external LB IP? 
> >> >> 
> >> >> Also note that you have / characters where you need . characters - I 
> >> >> assume that is human error is reporting the issue? 
> >> >> 
> >> >> 
> >> >> On Thu, Nov 30, 2017 at 3:27 PM, Kyunam Kim  
> wrote: 
> >> >> > I'm not that smart to prohibit anything in k8s yet ;-) 
> >> >> > Let me retry. 
> >> >> > 
> >> >> > My docker container runs a 3rd party web application over which I 
> >> >> > have 
> >> >> > no 
> >> >> > control and I have successful deployed it in k8s. 
> >> >> > I can access it thru https://192.168.99.100:31245. 
> >> >> > When I call https://PublicIP:31245/app/rest/init, the 3rd party 
> web 
> >> >> > app 
> >> >> > starts an internal setup process and errors out by saying 
> >> >> > 'http://192.168/88/100:31245/app/admin' is not reachable from 
> >> >> > 'MY-APP-DEPLOYMENT-768D8FBC5D-CP92L'. 
> >> >> > 
> >> >> > I interpreted this as, Docker container with host name 
> >> >> > MY-APP-DEPLOYMENT-768D8FBC5D-CP92L cannot reach to 
> >> >> > http://192.168/88/100:31245/app/admin. 
> >> >> > 
> >> >> > What k8s' magic can I do to make this container to be able to 
> reach 
> >> >> > 1) 
> >> >> > http://192.168/88/100:31245/app/admin or 2) 
> >> >> > http://172.17.0.7:6443/app/admin 
> >> >> > (Service's Endpoints) ? 
> >> >> > 
> >> >> > Hope this helps. 
> >> >> > 
> >> >> > On Thursday, November 30, 2017 at 2:19:35 PM UTC-8, Rodrigo Campos 
> >> >> > wrote: 
> >> >> >> 
> >> >> >> On Thursday, November 30, 2017, Kyunam Kim  
> >> >> >> wrote: 
> >> >> >>> 
> >> >> >>> How do I make a container aware of the service's IP:NodePort or 
> >> >> >>> ClusterIP:port address? 
> >> >> >>> Let's say, I can access my application at 
> >> >> >>> http://public-ip:port/myapp 
> >> >> >>> from the external world. 
> >> >> >>> I want a container(s) to be able to reach to 
> http://public-ip:port 
> >> >> >>> Or 
> >> >> >>> to reach to ClusterIP:port. 
> >> >> >>> 
> >> >> >>> What k8s' capability do I use to make this happen? 
> >> >> >> 
> >> >> >> 
> >> >> >> Sorry, not sure I follow. Does it work for you using the service 
> >> >> >> name? 
> >> >> >> (Or 
> >> >> >> service+namespace)? 
> >> >> >> 
> >> >> >> Unless you prohibited it in some way (like with network policy, 
> but 
> >> >> >> that 
> >> >> >> is probably not the case) that should work. 
> >> >> >> 
> >> >> >> So, I might be missing something, sorry in advance :) 
> >> >> > 
> >> >> > -- 
> >> >> > You received this message because you are subscribed to the Google 
> >> >> > Groups 
> >> >> > "Kubernetes user discussion and Q" group. 
> >> >> > To unsubscribe from this group and stop receiving emails from it, 
> >> >> > send 
> >> >> > an 
> >> >> > email to kubernetes-use...@googlegroups.com. 
> >> >> > To post to this group, send email to kubernet...@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" group. 
> >> > To unsubscribe from this group and stop receiving emails from it, 
> send 
> >> > an 
> >> > email to kubernetes-use...@googlegroups.com. 
> >> > To post to this group, send email to kubernet...@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" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to kubernetes-use...@googlegroups.com . 
> > To post to this group, send email to kubernet...@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 

Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread Itamar O
If your only requirements is to have one pod per node, then I think the
best solution, as Tim suggested, is a Daemon Set (
https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/).

And yes, it's perfectly reasonable to edit and reapply YAML's.

On Mon, Dec 4, 2017, 18:45  wrote:

> So re-apply the deployment.yaml is an acceptable solution considering that
> my only requirement is have one pod for node?
>
> Unfortunately I have a very close due date so I would like to find the
> faster-simpler and quite stable solution to do a code upgrade :)
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q" 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" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread mderosa83
So re-apply the deployment.yaml is an acceptable solution considering that my 
only requirement is have one pod for node?

Unfortunately I have a very close due date so I would like to find the 
faster-simpler and quite stable solution to do a code upgrade :)

 

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread Rodrigo Campos
The scheduler makes the decision trying to spread the pods on nodes as you
say. But that is just a "signal", other things are taken into account (pods
availability zone, in case of AWS, for example, to spread across AZs too)
node's resources, etc.

So, the default will try to do that, taking into account other variables
too. But it is not a hard requirement to not have 2 pods on a single node,
so it can (and will) happen.

You can force that requirement in several ways, using the hostPort option
for example. This is, I think, the simplest. But also using some other
functionality the default sched provides (like pod affinity, etc that has
been said) and you can even write your own sched for that deployment.

But scheduling is hard and unless you have a hard requirement that can't
ever happen, I think you probably want just the default.

The default is quite reasonable, maybe with more resources it's more likely
to happen what you want (or tuning the deployment options to first kill the
pod and then create a new one). But the default in my experience, works
just fine.

Also, take into account that if you add the hard requirement, some not nice
side effects might happen. For example, if two pods can never run in the
same node, then if some node crashes you better still have enough nodes to
run all the pods in different nodes, or some pods won't be scheduled. This,
of course, is not a problem if you really want them not ever to run on the
same node.

On Monday, December 4, 2017,  wrote:

> Hi all!
>
> I would like to know if there is a way to force Kubernetes, during a
> deploy, to use every node in the cluster.
> The question is due some attempts that I have done where I noticed a
> situation like this:
>
> - a cluster of 3 nodes
> - I update a deployment with a command like: kubectl set image
> deployment/deployment_name my_repo:v2.1.2
> - Kubernetes updates the cluster
>
> At the end I execute kubectl get pod and I notice that 2 pods have been
> deployed in the same node.
> So after the update, the cluster has this configuration:
>
> - one node with 2 pods
> - one node with 1 pod
> - one node without any pod (totally without any workload)
>
>
> Thanks for any suggestion
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q" 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" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread mderosa83
I tried some solutions and one that is working at the moment is simply based to 
change my deployment.yaml every time.
I mean:

1) I have to deploy for the 1' time my application based on a pod with some 
containers. These pods should be deployed on every cluster node (I have 3 
nodes). I did the deployment setting in the yaml file the option replicas equal 
to 3:

apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
  name: my-deployment
  labels:
app: webpod  
spec:
  replicas: 3


The version used for one of my containers is 2.1 for example


2) I execute the deployment with the command: kubectl apply -f 
my-deployment.yaml


3) I get one pod for every node without problem


4) Now I want to update the deployment changing the version of the image that I 
use for one of my containers. So I simply change the yaml file editing 2.1 with 
2.2. Then I re-launch the command: kubectl apply -f my-deployment.yaml


5) Again, I obtain one pod for every node without problem


Behavior very different if instead I use the command:
kubectl set image deployment/my-deployment my-container=:v2.2

In this case I get a situation where a node has 2 pod, a node 1 pod, last node 
without pod...

Anyway considering that changing the yaml file every time that I have to deploy 
a new version, is an acceptable constraint, is this a reliable solution or can 
it have negative repercussions on system stability?


  




-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread 'Tim Hockin' via Kubernetes user discussion and Q
Would you prefer a Daemon set instead?

On Dec 4, 2017 7:28 AM, "Itamar O"  wrote:

> I'm guessing you have as many replicas as you have nodes, and you used the
> "required" affinity policy over the "preferred" one.
> If this is the case, then when you try to update the deployment (with the
> default upgrade strategy), the controller tries the schedule a *4th pod*
> (with the new image) before taking down any of the running 3 pods, failing
> to do so, because the anti-affinity policy will be violated.
> Try using "preferred" instead of "required".
>
> On Mon, Dec 4, 2017 at 3:57 PM  wrote:
>
>> Sorry but now I'm facing another problem :-(
>> The deployment with the options podAntiAffinity/podAffinity is working
>> but when I try to update the deployment with the command:
>>
>> kubectl set image deployment/apache-deployment
>> apache-container=xx:v2.1.2
>>
>> then I get this error:
>>
>> apache-deployment-7c774d67f5-l69lb  No nodes are available that match
>> all of the predicates: MatchInterPodAffinity (3).
>>
>>
>> I don't know how to fix. Maybe the podAntiAffinity option need another
>> kind of setting to update a deployment?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Kubernetes user discussion and Q" 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" 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" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread Itamar O
I'm guessing you have as many replicas as you have nodes, and you used the
"required" affinity policy over the "preferred" one.
If this is the case, then when you try to update the deployment (with the
default upgrade strategy), the controller tries the schedule a *4th pod*
(with the new image) before taking down any of the running 3 pods, failing
to do so, because the anti-affinity policy will be violated.
Try using "preferred" instead of "required".

On Mon, Dec 4, 2017 at 3:57 PM  wrote:

> Sorry but now I'm facing another problem :-(
> The deployment with the options podAntiAffinity/podAffinity is working but
> when I try to update the deployment with the command:
>
> kubectl set image deployment/apache-deployment
> apache-container=xx:v2.1.2
>
> then I get this error:
>
> apache-deployment-7c774d67f5-l69lb  No nodes are available that match all
> of the predicates: MatchInterPodAffinity (3).
>
>
> I don't know how to fix. Maybe the podAntiAffinity option need another
> kind of setting to update a deployment?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q" 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" 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.


[kubernetes-users] Re: add-to-base url is not working

2017-12-04 Thread Moudood
I'm using nginx ingress controller. If you look at the ingress definition, 
I've tried to map the http request to two different ports 1) TCP (8080) 2) 
UDP (56888).

When I request the url as  http://hostName:8080, the request is sent to the 
resource associated with UDP. trying to find an option of port forwarding 
using ingress controller

  
On Saturday, 2 December 2017 17:49:23 UTC-5, Eduardo Bergavera wrote:
>
>
>
> Looks like you are using a custom controller. Have you tried using Nginx 
> controller?
>
> https://github.com/kubernetes/ingress-nginx
>
>
>
> On Saturday, December 2, 2017 at 4:48:03 AM UTC+8, Moudood wrote:
>>
>> Hi, 
>>
>> I have an issue using the annotation "add-base-url=true". Wanted to have 
>> "/flows" mapped to "test-service" on port 8080. Only the initial request 
>> goes on https://host/flows but the dependent files referred are sent 
>> with https://host/css/one.css. But the expectation is 
>> https://host/flows/css/one.css
>>
>> Please let me know if anyone addressed this issue.
>>
>> The mapping I have in the file is given below
>>
>> apiVersion: extensions/v1beta1
>> kind: Ingress
>> metadata:
>>   name: 
>>   annotations:
>> ingress.bluemix.net/redirect-to-https: "True"
>> ingress.bluemix.net/rewrite-path: "serviceName=test-service 
>> rewrite=/"
>> ingress.bluemix.net/rewrite-path: "add-base-url=true"
>> spec:
>>   tls:
>>   - hosts:
>> - 
>>   rules:
>>   - host: 
>> http:
>>   paths:
>>   - path: /flows
>> backend:
>>   serviceName: test-service
>>   servicePort: 8080
>>   - path: /
>> backend:
>>   serviceName: test-service-udp
>>   servicePort: 56888
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread mderosa83
Sorry but now I'm facing another problem :-(
The deployment with the options podAntiAffinity/podAffinity is working but when 
I try to update the deployment with the command:

kubectl set image deployment/apache-deployment apache-container=xx:v2.1.2

then I get this error:

apache-deployment-7c774d67f5-l69lb  No nodes are available that match all of 
the predicates: MatchInterPodAffinity (3).


I don't know how to fix. Maybe the podAntiAffinity option need another kind of 
setting to update a deployment?

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread mderosa83
At 
https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
 there is an example (perfect for my case) where 2 files yaml are used: one for 
redis-cache and the other for web-store.
Anyway I'll try to concatenate them.
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread Itamar O
Not sure where you have 2 YAML's (since you specify the afiinity under the
deployment template spec), but if you end up with the need for multiple
YAML's you can always concatenate them to a single file by separating with
"---".

On Mon, Dec 4, 2017 at 1:41 PM  wrote:

> I'm reading the documentation and it's just what I was looking for.
> Many thanks!
> But is there a way to create a single yaml deployment file to ensure that
> every pod will be deployed in a single node?
> So a single file to be executed and not 2 different yaml files as in the
> example
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q" 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" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread mderosa83
I'm reading the documentation and it's just what I was looking for. 
Many thanks!
But is there a way to create a single yaml deployment file to ensure that every 
pod will be deployed in a single node? 
So a single file to be executed and not 2 different yaml files as in the example

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q" 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.


Re: [kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread Itamar O
I think that if you create a service that matches the pods of the
deployment, K8s will attempt to spread out the pods by default.
Also, check out "pod anti-affinity" (
https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature
).

On Mon, Dec 4, 2017, 13:09  wrote:

> Hi all!
>
> I would like to know if there is a way to force Kubernetes, during a
> deploy, to use every node in the cluster.
> The question is due some attempts that I have done where I noticed a
> situation like this:
>
> - a cluster of 3 nodes
> - I update a deployment with a command like: kubectl set image
> deployment/deployment_name my_repo:v2.1.2
> - Kubernetes updates the cluster
>
> At the end I execute kubectl get pod and I notice that 2 pods have been
> deployed in the same node.
> So after the update, the cluster has this configuration:
>
> - one node with 2 pods
> - one node with 1 pod
> - one node without any pod (totally without any workload)
>
>
> Thanks for any suggestion
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q" 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" 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.


[kubernetes-users] How to force Kubernetes to update deployment with a pod in every node

2017-12-04 Thread mderosa83
Hi all!

I would like to know if there is a way to force Kubernetes, during a deploy, to 
use every node in the cluster. 
The question is due some attempts that I have done where I noticed a situation 
like this:

- a cluster of 3 nodes
- I update a deployment with a command like: kubectl set image 
deployment/deployment_name my_repo:v2.1.2
- Kubernetes updates the cluster

At the end I execute kubectl get pod and I notice that 2 pods have been 
deployed in the same node. 
So after the update, the cluster has this configuration:

- one node with 2 pods
- one node with 1 pod
- one node without any pod (totally without any workload)


Thanks for any suggestion

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q" 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.