클러스터를 마이그레이션할 때 기본적으로 마이그레이션하지 않는 사용자 지정 리소스를 가져올 수 있습니다.
사용자 지정 리소스는 NCP에서 생성되지 않습니다. 파일 nsxt_mp_to_policy_converter.py에는 관리자-정책 가져오기 동안 예상되는 동작을 구현하도록 재정의할 수 있는 메서드(메서드 정의에서 "custom" 검색)가 있습니다. 기본적으로 NCP는 이러한 리소스에 대한 작업을 수행하지 않으므로 사용자 지정 동작이 구현되지 않습니다. 사용자 지정 리소스 ID를 지정하는 경우 해당 ID를 가져오기 위한 간단한 요청이 생성됩니다(이 경우 display_name에서 정책 ID가 유추되고, 2단계와 3단계에서 업데이트가 수행되지 않음). custom_resources 식별자를 사용하여 사용자 규격 파일(아래 예제 참조)에서 이러한 리소스의 ID를 지정할 수 있습니다. 구문은 다음과 같습니다.
k8s-clusters: <k8s cluster name>: <NSX Resource Shell Class Name>: <NSX Resource - 1 Class Name>: custom_resources: <NSX Resource - 1A ID>: metadata: - "key": <metadata key recognized by Migration API> "value": <metadata value associated with the key recognized by Migration API> linked_ids: - "key": <linked_ids key recognized by Migration API> "value": <linked_ids value associated with the key recognized by Migration API> <NSX Resource - 2 Class Name>: # these resources are imported after NSX Resource - 1A is custom_resources: <NSX Resource - 2A ID>: metadata: - "key": <metadata key recognized by Migration API> "value": <metadata value associated with the key recognized by Migration API> linked_ids: - "key": <linked_ids key recognized by Migration API> "value": <linked_ids value associated with the key recognized by Migration API> <NSX Resource - 1 Class Name>: <NSX Resource - 1B ID>: metadata: - "key": <metadata key recognized by Migration API> "value": <metadata value associated with the key recognized by Migration API> linked_ids: - "key": <linked_ids key recognized by Migration API> "value": <linked_ids value associated with the key recognized by Migration API>
user-spec.yaml에서 사용자 지정 리소스를 지정하는 예
k8s-clusters: k8scluster: # top-tier-router-id is required for each cluster top-tier-router-id: t1-router-id top-tier-router-type: TIER1 # Provide custom resources as follow: NamespaceResources: Tier1Router: custom_resources: # Custom resources are specified only with MP ID 6d93a932-87ea-42de-a30c-b39f397322b0: metadata: # It should be a list - key: 'metadata-key' value: 'metadata-value' linked_ids: # It should be a list - key: 'linked_id-key' value: 'linked_id-value' NATRules: custom_resources: # Custom resources are specified only with MP ID 536870924: metadata: # It should be a list - key: 'metadata-key' value: 'metadata-value' linked_ids: # It should be a list - key: 'linked_id-key' value: 'linked_id-value'
user-spec.yaml에서 사용자 지정 리소스를 지정하는 방법을 보려면 아래의 "리소스 규격 순서" 섹션을 참조하십시오.
리소스 규격 순서
SharedResources - IpBlock - IpPool - IpPoolAllocation (specified as ip-allocations; see the sample user-spec.yaml for an example) - Tier0Router - Tier0RouterPorts (cannot be specified in user-spec.yaml) - Tier0RouterConfig (cannot be specified in user-spec.yaml) - Tier1Router - SpoofGuardSwitchingProfile - SwitchSecuritySwitchingProfile - QosSwitchingProfile - IpDiscoverySwitchingProfile - MacManagementSwitchingProfile - NodeLogicalSwitch - LogicalPort - Tier1RouterPortsAndStaticRoutes - NatRule - IpSet - MacSet - NsGroup - Certificate - LBClientSSlProfile - LBServerSSlProfile - LBCookiePersistenceProfile - LBSourceIPPersistenceProfile - LBGenericPersistenceProfile - LbHttpMonitor - LbHttpsMonitor - LbIcmpMonitor - LbTcpMonitor - LbUdpMonitor - LbPassiveMonitor - LbHttpProfile - LbFastTcpProfile - LbFastUdpProfile - LbPool - LbVirtualServer - LbService - NSService - NSProfile - FirewallSectionsAndRules - GatewayFirewallSectionsAndRules ClusterResources - Tier1Router - LogicalPort - Tier1RouterPortsAndStaticRoutes - GatewayFirewallSectionsAndRules NamespaceResources - ExternalIpPoolsAllocations - IpBlockSubnet - IpPoolAllocation - Tier1Router - Tier1RouterPorts - SpoofguradProfile - NodeLogicalSwitch - NATRules - NsGroup - GatewayFirewallSectionsAndRules PodResources - ExternalIpPoolsAllocations - LogicalPort - NATRules NetworkPolicyResources - IpSet - FirewallSectionsAndRules SecretResources - Certificate LBClusterWideResources - ExternalIpPoolsAllocations - IpPool - IpPoolAllocation - NodeLogicalSwitch - Tier1Router - Tier1RouterPortsAndStaticRoutes - Certificate - ServerPool - CookiePersistenceProfile - SourceIPPersistenceProfile - ApplicationProfile - VirtualServer - GatewayFirewallSectionsAndRules L4ServiceResources - ExternalIpPoolsAllocations - SourceIPPersistenceProfile - VirtualServer - LBService - DefaultLBService