Thanks for your answer, but this not solved the problem.
I added this on frontend_deployment.yml:
rollingUpdate:
maxUnavailable: 100%
After kubernetes apply -f frontend_deployment.yml:
kubectl get events
3m 3m 1 frontend-dev Deployment
Normal
ScalingReplicaSet {deployment-controller } Scaled up replica set
frontend-dev-426955336 to 1
3m 3m 1 frontend-dev Deployment
Normal
ScalingReplicaSet {deployment-controller } Scaled down replica set
frontend-dev-305582663 to 0
So, new rs scale to 1 first, then old rs scale to 0. Also, in documentation
(
http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1beta1_deploymentspec)
is said that maxUnavailable set by default to fixed value of 1. So,
maxUnavailable: 100% is unnecessary.
Also, I have this problem not only in moment of deploy (when pod is
recreated), but more longer. Sometimes service become available after
about 5 minute, or after deletion of pod manually and it recreation.
On Thursday, June 16, 2016 at 1:33:37 AM UTC+3, Rodrigo Campos wrote:
>
>
>
> On Wednesday, June 15, 2016, insomia <[email protected] <javascript:>>
> wrote:
>
>> Hi,
>>
>> Sometimes I can`t access kubernetes service. I have two configs:
>> frontend_deployment.yml and frontend_service.yml. Used service type:
>> LoadBalancer. Mostly after deploy (after kubernetes apply -f
>> frontend_deployment.yml) I cant access service, pod is in Running state and
>> available.
>>
> Are you using the same kind, right?
>
> As you said you have one replica, on deploy the pod will be deleted and
> then created again. That causes downtime, because is first killed and then
> the new version deployed.
>
> If you want to avoid this, you can configure in the deployment type the
> maxUnavalable (at university now, it's in the docs or in the spec, in
> k8s.io --> documentation --> reference and the API definition there).
> That way you force to first create the pod and then kill the other one.
>
> Also, if you have 2 replicas you don't need to configure that because
> there is always one pod alive (it is killed only one by default)
>
> Does either of these things makes the trick for you?
>
--
You received this message because you are subscribed to the Google Groups
"Containers at Google" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-containers.
For more options, visit https://groups.google.com/d/optout.