Welcome to the Linux Foundation Forum!

All objects are restricted to a single namespace. True or False?

Can someone ellaborate on this? I think every object must be in a single namespace (default or any other) and cannot be in two namespaces at the same time. Is there an exception for this?

Best Answer

  • Posts: 2,434
    Answer ✓

    Hi @ilmx,

    The exception is/are the non-namespaced objects, that live clusterwide - visible to all namespaces. For a list of all namespaced and clusterwide objects, run the following command:

    1. kubectl api-resources

    For additional output, try the command with the -o wide flag.

    Regards,
    -Chris

Answers

  • There are cluster wide resources, aren't there?
    If some object is on namespace level then I haven't notice option to be multiple namespaces ;)
    ClusterRole would be one without namespace at all:
    https://kubernetes.io/docs/reference/access-authn-authz/rbac/
    I'm not native English, and my personal opinion is that such questions are hard to translate.
    I would go with False answer as zero is not "single". However if object has an namespace attribute, then it is single...

  • Posts: 18

    Thanks! I understand now.
    It is a tricky question. All objects are restricted to a single namespace EXCEPT those that cannot belong to a namespace. Clear now.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training