--
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+unsubscribe@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.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
At SoundCloud, we use multiple environments in one cluster, using namespaces and different configuration.We have a weaker notion of environments – there is no global "staging". Therefore, the "env" dimension is grouped under the system (~ app). One system's staging and production may be another system's blue and green. Some systems even have ephemeral environments that are automatically created for each PR, but that is rare.It is up to the owners of a system to decide, for each env, which other system/env combo it should talk to. For example, foo-staging may talk to bar-green, baz-testing and bam-production.We bake multiple configurations into each artifact, and select which one to load when templating out the podspec per env. By convention, the name of the configuration is the name of the env in which it should be loaded, but that is not a hard rule – the aforementioned ephemeral staging envs all share the same configuration.We also have test clusters, but these are mostly for staging and testing changes to Kubernetes itself./MR
On Thu, Apr 20, 2017 at 6:47 AM 'EJ Campbell' via Kubernetes user discussion and Q&A <kubernetes-users@googlegroups.com> wrote:
Definitely an interesting question!At Yahoo, we've generally separated the underlying infrastructure based on whether our CI/CD infrastructure is performing the deployment versus if a developer is manually making changes. Mapping to Box's definition, "dev" is one very locked down K8s environment, while stage/prod would share a single (or a small number) of large K8s clusters, per data center.As for the issue of routing requests from foo-stage to bar-stage, our CI/CD infrastructure injects the environment an application is running in into the pod. This is used by the application's configuration to select the appropriate service to hit based on the injected environment variable (e.g. if an app is running in "stage", it may want to hit a "stage" version of its API).For example:[{
"settings": [ "master" ],
"bar": "api-bar.example.com"
}, {
"settings": [ "environment:stage" ],
"bar": "api-stage-bar.example.com"
}]So, K8s itself does not know whether an app is the stage, canary, qa, prod, etc. version of it. Those are application specific concepts that are separate from the underlying infrastructure hosting the application.-EJ
>> email to kubernetes-users+unsubscribe@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+unsubscribe@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+unsubscribe@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+unsubscribe@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+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
--
--
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/GPaGOGxCDD8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.
At this point it's the lack of quotas and abac associated with selectors instead of namespaces.
I haven't looked closely enough at rbac to see if it gives us what we need within a namespace-per-env setup.The other side benefit that we can tool around is that namespace make a good "packaging" mechanism for deployments and their related configMaps/secrets. i.e. Want to delete a deployment just delete it's namespace.
So our "dev" env would be composed of N-different services foo, bar and baz for example. 3 different teams maintain the 3 different services and their related deployments. We would like to limit operations like apply, delete, exec and logs to only people on those teams to their respective services and deployments. the only way we found to get ABAC working in the way we wanted in 1.2 was to put each service/deployment in their own namespace (+ "-env"). Additionally for each service's deployment we'd like to set a quota on how many CPUs/ram they can reserve. As of right now it looks like that is per-namespace as well.
I've been worried about this conflict between service discovery and abac/quota's interpretation of how namespaces should be used for a while.
>>>> discussion and Q&A" <kubernetes-users@googlegroups.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>> On Sat, May 6, 2017 at 7:18 PM, 'John Huffaker' via Kubernetes user
>>>>> discussion and Q&A <kubernetes-users@googlegroups.com> wrote:
>>>>>>
>>>>>> At this point it's the lack of quotas and abac associated with
>>>>>> selectors instead of namespaces.
>>>>>
>>>>>
>>>>> Can you say more about what you mean? What are scenarios where you'd
>>>>> like to restrict use of selectors? (and on what objects?)
>>>>>
>>>>>>
>>>>>> I haven't looked closely enough at rbac to see if it gives us what
>>>>>> we need within a namespace-per-env setup.
>>>>>>
>>>>>> The other side benefit that we can tool around is that namespace make
>>>>>> a good "packaging" mechanism for deployments and their related
>>>>>> configMaps/secrets. i.e. Want to delete a deployment just delete it's
>>>>>> namespace.
>>>>>>
>>>>>> On May 6, 2017 6:53 PM, "'David Oppenheimer' via Kubernetes user
>>>>>>> send an email to kubernetes-users+unsubscribe@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 a topic in the
>>>>>> Google Groups "Kubernetes user discussion and Q&A" group.
>>>>>> To unsubscribe from this topic, visit
>>>>>> https://groups.google.com/d/topic/kubernetes-users/GPaGOGxCDD8/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>> To post to this group, send email to
>>>>>> 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+unsubscribe@googlegroups.com.
>>>>>> To post to this group, send email to
>>>>>> 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 a topic in the
>>>>> Google Groups "Kubernetes user discussion and Q&A" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/kubernetes-users/GPaGOGxCDD8/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> kubernetes-users+unsubscribe@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+unsubscribe@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 a topic in the
>>> Google Groups "Kubernetes user discussion and Q&A" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/kubernetes-users/GPaGOGxCDD8/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> kubernetes-users+unsubscribe@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+unsubscribe@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+unsubscribe@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 a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/GPaGOGxCDD8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
If I read correctly, they want quota to apply to a subset of pods in a
Namespace (by selector) not the whole namespace (so multiple teams can
share a namespace), or else they need to pollute names with
env-specific decorations.
Yeah.In the end we would like:1. "Simple" service discovery per env. foo in dev talks to bar in dev. foo in staging talks to bar in staging, and ideally the code and config for foo would just reference "bar" instead of "bar-dev" (or "bar.dev.cluster.local").
2. Dev and staging on the same cluster.3. Quotas per app (i.e. foo can only have 20 cpu cores) or per app-env.4. Access control per app (i.e. only foo owners can exec into foo pods).Right now 2,3,4 are achievable by sacrificing #1. Or we could also achieve: 1,3,4 by sacrificing #2. Or if quotas and abac/rbac worked via selectors within a namespace we could achieve 1,2,3,4. Or if we had hierarchical namespaces we could also achieve 1,2,3,4.I was somewhat worried about sacrificing #1 in the face of federated clusters, but Sam has convinced me that the "foo-dev" naming, while ugly will work just fine in that context.If this is confusing or if anyone wants further clarification I'm happy to chat as @huggsboson on the kubernetes chat.