1. 整合完成後會在NSX看到VKS資訊

2.png

  1. 設定防火牆規則要先建立原則並套用指定的TKC,才能設定群組是POD或是NamaSpace

1.png

  1. 建立測試POD,shoot yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  # Define the Deployment Name
  name: jerry-netshoot-deployment
  namespace: jerry-ns01 #指定服務要建立在jerry-ns01
  labels:
    app: netshoot
spec:
  # Define the Number of Pods
  replicas: 2
  # Define the Selector
  selector:
    matchLabels:
      app: netshoot
  template:
    metadata:
      labels:
        app: netshoot
        nsxgroup: netshoot
    spec:
      containers: # Container Details
      - name: shoot
        image: nicolaka/netshoot:latest
        args:
        - sleep
        - '9999999999999999999'
  1. 部屬POD yaml,建立測試POD

kubectl apply -f shoot.yaml

kubectl get pods -n jerry-ns01

kubectl get pods -o wide -n jerry-ns01 (查看POD的IP資訊)

1.png

  1. 登入建立好的POD,登入jerry-netshoot-deployment-8c465c9b9-4xdhs

kubectl exec -it -n jerry-ns01 "POD name" -- /bin/bash

kubectl exec -it -n jerry-ns01 jerry-netshoot-deployment-8c465c9b9-4xdhs -- /bin/bash

2.png

  1. 確認POD可以對外連線,用ping 示範 ping 192.0.3.15(另一個POD IP)

3.png

  1. 到NSX Manager 先查看剛才建立的POD是否已經出現