# Pod 状态为 Running && PVC 状态为 Bound,则 NFS Server 可用
root@n37-043-061:~# kubectl get pods
NAME READY STATUS RESTARTS AGE
test-pvc-pod 1/1 Running 0 8d
root@n37-043-061:~# kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
test-pvc Bound pvc-8dd031d1-2316-44b0-bd46-bdaeea7f9fd5 1Gi RWO nfs-csi 8d
kubectl edit svc mysql
# 修改type为
type: NodePort
# 查看K8S内部通信端口: (3306后的那个)
kubectl get svc mysql
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
mysql NodePort 10.108.158.83 <none> 3306:30276/TCP 2d1h
kubectl get node -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
tf-server Ready control-plane 2d2h v1.27.4 192.168.200.146 <none> Ubuntu 22.04.2 LTS 5.15.0-83-generic containerd://1.7.1