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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
adminSt | fm:AdminState (scalar:Enum8) | Admin status | SELECTION: 1 - enabled 2 - disabled DEFAULT: disabled |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
adminSt | fm:AdminState (scalar:Enum8) | Admin status | SELECTION: 1 - enabled 2 - disabled DEFAULT: disabled |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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 Name | Data Type | Description | Values |
---|---|---|---|
adminSt | kbs:adminStType (scalar:Enum8) | State to configure kubernetes server properties | SELECTION: 0 - disable 1 - enable DEFAULT: disable |
ipAddress | address:Ip | ip address of the kubernetes api server | Value must match ipv4 or ipv6 known format |
port | scalar:Uint32 | port number of the kubernetes api server | RANGE: [0 , 65535] |
vrf | l3:VrfName (string:Basic) | VRF to be used while connecting to kubernetes api-server | A sequence of characters DEFAULT: management |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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 Name | Data Type | Description | Values |
---|---|---|---|
status | mo: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:
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:
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 Name | Data Type | Description | Values |
---|---|---|---|
acl | acl:Name (string:Basic) | acl cfg name to apply when watch is triggered | MAX SIZE: 63 |
adminSt | kbs:adminStType (scalar:Enum8) | State to configure kubernetes watch service properties | SELECTION: 0 - disable 1 - enable DEFAULT: disable |
service | string: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:
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:
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 Name | Data Type | Description | Values |
---|---|---|---|
status | mo: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:
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: