名字是啥?
答:集群中每个对象的名称对于该类型的资源都是唯一的。并且每一个对象在整个集群中也有一个唯一的UID.名称空间是啥?
答:名称空间将集群划分为多个领域什么时候使用?
答: 企业中有多人使用时候,可以进行权限管控怎么查看?
答:看输出 是false 还是 true
kubectl api-resources --namespace=false
kubectl api-resources --namespace=true名称空间和dns的关系?
答:
创建服务时,它将创建相应的DNS条目,这个条目的形式是<service-name>.<namespace-name>.svc.cluster.local
上面的namespace-name 是啥就是啥默认的名称空间?
答:
[root@k8s-01 ~]# kubectl get namespace
NAME STATUS AGE
default Active 2d10h
kube-flannel Active 2d10h
kube-node-lease Active 2d10h
kube-public Active 2d10h
kube-system Active 2d10h
[root@k8s-01 ~]# kubectl get ns
NAME STATUS AGE
default Active 2d10h
kube-flannel Active 2d10h
kube-node-lease Active 2d10h
kube-public Active 2d10h # 保留给集群使用,保持基本使用
kube-system Active 2d10h #管理相关的组件kubectl get pod -n kube-systemkubectl describe -n kube-system如何新增一个名称空间
答:如下命令
[root@k8s-01 ~]# kubectl create ns dev
namespace/dev created
[root@k8s-01 ~]# kubectl get ns
NAME STATUS AGE
default Active 2d10h
dev Active 6s
kube-flannel Active 2d10h
kube-node-lease Active 2d10h
kube-public Active 2d10h
kube-system Active 2d10h
[root@k8s-01 ~]# kubectl delete ns dev如何利用json 创建名称空间
答:
[root@k8s-01 chapter06]# kubectl apply -f namespace-dev.json
namespace/development created
[root@k8s-01 chapter06]# kubectl app^C
[root@k8s-01 chapter06]# kubectl apply -f namespace-prod.json
namespace/production created
[root@k8s-01 chapter06]# kubectl get ns
NAME STATUS AGE
default Active 2d10h
development Active 17s
kube-flannel Active 2d10h
kube-node-lease Active 2d10h
kube-public Active 2d10h
kube-system Active 2d10h
production Active 4s
[root@k8s-01 chapter06]# kubectl get ns --show-labels
NAME STATUS AGE LABELS
default Active 2d10h <none>
development Active 35s name=development
kube-flannel Active 2d10h k8s-app=flannel,pod-security.kubernetes.io/enforce=privileged
kube-node-lease Active 2d10h <none>
kube-public Active 2d10h <none>
kube-system Active 2d10h <none>
production Active 22s name=production
[root@k8s-01 chapter06]# cat namespace-prod.json
{"apiVersion": "v1","kind": "Namespace","metadata": {"name": "production","labels": {"name": "production"}}
}[root@k8s-01 chapter06]# cat namespace-dev.json
{"apiVersion": "v1","kind": "Namespace","metadata": {"name": "development","labels": {"name": "development"}}
}
1 更新apt-get
sudo apt-get update2 安装jdk
查看jdk安装情况 Command java not found, but can be installed with:sudo apt install default-jre # version 2:1.11-72, or
sudo apt install openjdk-11-jre-headless # version 11.0.138-0ubuntu1~20.04
sud…
1.添加NOPI 引用->管理NuGet程序包->添加NOPI 2.相关程序集 3.添加命名空间
using NPOI.HSSF;
using NPOI.XSSF;
using System.IO;
using NPOI.XSSF.UserModel;
using NPOI.HSSF.UserModel; 4.样例
//NPOI读入dgv
private void button1_Click(object sender, EventArgs…