Importing a Kubernetes Cluster

After you import shared resources, you can import a Kubernetes cluster.

Edit user-spec.yaml

In
user-spec.yaml
, specify:
  • The top tier router ID and type of the cluster
  • Any custom resources that need to be imported as a part of any resource importation. For example, you can specify the manager ID of a NAT rule that should be imported as a part of namespace resources. See Custom Resources for more details. You do not need to do anything here unless you have manually created some resources on the resources created by NCP. For example. you added a static route on an NCP-created tier-1 router.
  • Manager ID of the lb-service that is created by you as
    lb-service-mp-id
    to import the lb-service used by default in NCP if configured. This is the same resource as lb_service in the NCP spec (
    ncp.ini
    ). If not used, you do not need to specify it.

Steps to import a Kubernetes cluster

  1. Fill in the appropriate information in
    config.yaml
    and set
    import_shared_resources_only
    to
    False
    . See Sample config.yaml.
  2. Fill in the Kubernetes cluster information in
    user-spec.yaml
    . See Sample user-spec.yaml.
  3. Run the
    mp_to_policy_importer
    using either the config file or command line arguments. For example:
    python3 mp_to_policy_importer.py --config-file config.yaml
Note that only the Kubernetes cluster specified in the config.yaml will be imported even if they are mentioned in the user-spec.yaml.