root@f0-13:~# kubectl get namespace
NAME STATUS AGE
default Active 44h
kube-node-lease Active 44h
kube-public Active 44h
kube-system Active 44h
查询特定命名空间中的所有资源,下面是default命名空间:
root@f0-13:~# kubectl get all -n default
NAME READY STATUS RESTARTS AGE
pod/nginx-ds-lc59t 1/1 Running 0 39h
pod/nginx-ds-pkh75 1/1 Running 0 39h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.254.0.1 <none> 443/TCP 44h
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/nginx-ds 2 2 2 2 2 <none> 39h
[root@localhost ~]# docker network ls
NETWORK ID NAME DRIVER SCOPE
0dc7621fa6c0 bridge bridge local
09d08085f98c host host local
8da76deb9eb9 none null local
root@frank0-11:~# more /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
ens3:
dhcp4: false
addresses: [172.20.0.11/24]
gateway4: 172.20.0.1
nameservers:
addresses: [114.114.114.114]
version: 2
root@frank0-12:~# netplan apply