cancel
Showing results for 
Search instead for 
Did you mean: 
fannullone
Flight Engineer
Flight Engineer
  • 445 Views

do280-4.12 guided exercise / multus: doubt about ip address assignement

I am very doubtful about the proposed solution:
- the address 192.168.51.10 is pre-assigned to master01 ens4 interface and in the proposed solution the same address is assigned to the eth2 interface of the pod:
[student@workstation ~]$ oc get pod/database-77c5677898-mcvnp -ojsonpath='{.status.hostIP}'
192.168.50.10

I think this is not correct because host and pod can not have the same IP, so I change the netword-attachement-definition to .11:

 

 

192.168.50.10[student@workstation ~]$ oc get network-attachment-definitions/ens4-nad -oyaml
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  creationTimestamp: "2024-03-01T13:24:37Z"
  generation: 1
  name: ens4-nad
  namespace: non-http-multus
  resourceVersion: "705050"
  uid: d9de27d8-0973-4d3c-a414-5bff88f5df19
spec:
  config: |-
    {
      "cniVersion": "0.3.1",
      "name": "work-network",
      "type": "host-device",
      "device": "ens4",
      "ipam": {
        "type": "static",
          "addresses": [
            {
              "address": "192.168.51.11/24"

 

 

 

I tested using the .11 address in the non-http-review lab and it works:

 

[student@utility ~]$ curl http://192.168.51.11:8080
<html>
  <body>
    <h1>Hello, world from nginx!</h1>
  </body>
</html>

 

0 Replies
Join the discussion
You must log in to join this conversation.