Configuring NX-OS Container Tracker

Cisco NX-OS is configured to communicate with the Kubernetes API Server to understand the capabilities of the containers behind a given switch port.

For more information, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-installation-and-configuration-guides-list.html/

Configuring NXOS Container Tracker

Configuring NXOS Container Tracker
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
  "fmEntity": {
    "children": [
      {
        "fmContainerTracker": {
          "attributes": {
            "adminSt": "enabled"
}}}]}}
{
    imdata:[]
}
<System>
  <fm-items>
    <containertracker-items>
      <adminSt>enabled</adminSt>
    </containertracker-items>
  </fm-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

feature container-tracker


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
fmEntity sys/fm
fmContainerTracker sys/fm/containertracker


fmContainerTracker Properties

The following table contains information about the fmContainerTracker properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
adminStfm:AdminState
(scalar:Enum8)
Admin statusSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting NXOS Container Tracker

Deleting NXOS Container Tracker
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
  "fmEntity": {
    "children": [
      {
        "fmContainerTracker": {
          "attributes": {
            "adminSt": "disabled"
}}}]}}
{
    imdata:[]
}
<System>
  <fm-items>
    <containertracker-items>
      <adminSt>disabled</adminSt>
    </containertracker-items>
  </fm-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no feature container-tracker


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
fmEntity sys/fm
fmContainerTracker sys/fm/containertracker


fmContainerTracker Properties

The following table contains information about the fmContainerTracker properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
adminStfm:AdminState
(scalar:Enum8)
Admin statusSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring a Kubertnetes Server

Configuring NXOS Container Tracker
POST http://<mgmt0_IP>/api/mo/sys/kubernetes/server.json
{
  "kbsServer": {
    "attributes": {
      "adminSt": "enable",
      "ipAddress": "1.2.3.4",
      "port": "1",
      "vrf": "VRF_1"
}}}
{
    imdata:[]
}
<System>
  <kubernetes-items>
    <server-items>
      <adminSt>enable</adminSt>
      <ipAddress>1.2.3.4</ipAddress>
      <port>1</port>
      <vrf>VRF_1</vrf>
    </server-items>
  </kubernetes-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

kubernetes server ip-address 1.2.3.4 port 1 vrf VRF_1


kbsServer Properties

The following table contains information about the kbsServer properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
adminStkbs:adminStType
(scalar:Enum8)
State to configure kubernetes server propertiesSELECTION:
0 - disable
1 - enable
DEFAULT: disable
ipAddressaddress:Ip
ip address of the kubernetes api serverValue must match ipv4 or ipv6 known format
portscalar:Uint32
port number of the kubernetes api server
RANGE: [0 , 65535]
vrfl3:VrfName
(string:Basic)
VRF to be used while connecting to kubernetes api-serverA sequence of characters
DEFAULT: management


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Kubertnetes Server Configuration

Deleting a Kubertnetes Server Configuration
POST http://<mgmt0_IP>/api/mo/sys/kubernetes/server.json
{
  "kbsServer": {
    "attributes": {
      "status": "deleted"
}}}
{
    imdata:[]
}
<System>
  <kubernetes-items>
    <server-items nc:operation="delete">
    </server-items>
  </kubernetes-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no kubernetes server ip-address 1.2.3.4 port 1 vrf VRF_1


kbsServer Properties

The following table contains information about the kbsServer properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring a Service to Watch

Configuring a Service to Watch
POST http://<mgmt0_IP>/api/mo/sys/kubernetes/server/watch.json
{
    "kbsWatch": {
      "attributes": {
        "acl": "ACL_1",
        "adminSt": "enable",
        "service": "Serv_1"
}}}
{
    imdata:[]
}
<System>
  <kubernetes-items>
    <server-items>
      <adminSt>enable</adminSt>
      <ipAddress>1.2.3.4</ipAddress>
      <port>1</port>
      <vrf>VRF_1</vrf>
      <watch-items>
        <acl>ACL_1</acl>
        <adminSt>enable</adminSt>
        <service>Serv_1</service>
      </watch-items>
    </server-items>
  </kubernetes-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

kubernetes server ip-address 1.2.3.4 port 1 vrf VRF_1
watch service Serv_1 action apply-acl ACL_1


kbsWatch Properties

The following table contains information about the kbsWatch properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aclacl:Name
(string:Basic)
acl cfg name to apply when watch is triggered
MAX SIZE: 63
adminStkbs:adminStType
(scalar:Enum8)
State to configure kubernetes watch service propertiesSELECTION:
0 - disable
1 - enable
DEFAULT: disable
servicestring:Basic
service to watch for in the kubernetes cluster
RANGE: [0 , 64]


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Service to Watch

Deleting a Service to Watch
POST http://<mgmt0_IP>/api/mo/sys/kubernetes/server/watch.json
{
    "kbsWatch": {
      "attributes": {
        "status": "deleted"
}}}
{
    imdata:[]
}
<System>
  <kubernetes-items>
    <server-items>
      <adminSt>enable</adminSt>
      <ipAddress>1.2.3.4</ipAddress>
      <port>1</port>
      <vrf>VRF_1</vrf>
      <watch-items nc:operation="delete">
      </watch-items>
    </server-items>
  </kubernetes-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

kubernetes server ip-address 1.2.3.4 port 1 vrf VRF_1
no watch service Serv_1 action apply-acl ACL_1


kbsWatch Properties

The following table contains information about the kbsWatch properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html