飞天使-k8s知识点4-验证安装好后功能

发布时间:2023年12月21日

接k8s知识点2之验证集群功能
[root@kubeadm-master2 tmp]# kubectl run net-test1  --image=alpine  sleep 36000
pod/net-test1 created
[root@kubeadm-master2 tmp]# kubectl get pod
NAME        READY   STATUS    RESTARTS   AGE
net-test1   1/1     Running   0          9s
[root@kubeadm-master2 tmp]# kubectl get pod -o wide
NAME        READY   STATUS    RESTARTS   AGE   IP           NODE                NOMINATED NODE   READINESS GATES
net-test1   1/1     Running   0          23s   10.100.3.2   ha1.example.local   <none>           <none>
 

在这里插入图片描述
在这里插入图片描述

创建dashboard
https://github.com/kubernetes/dashboard
wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml
mv recommended.yaml  dashboard-2.2.4.yaml



[root@kubeadm-master1 m43]# kubectl apply -f dashboard-2.2.0_m43.yaml  -f admin-user.yaml
namespace/kubernetes-dashboard created
serviceaccount/kubernetes-dashboard created
service/kubernetes-dashboard created
secret/kubernetes-dashboard-certs created
secret/kubernetes-dashboard-csrf created
secret/kubernetes-dashboard-key-holder created
configmap/kubernetes-dashboard-settings created
role.rbac.authorization.k8s.io/kubernetes-dashboard created
clusterrole.rbac.authorization.k8s.io/kubernetes-dashboard created
rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created
clusterrolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created
deployment.apps/kubernetes-dashboard created
service/dashboard-metrics-scraper created
deployment.apps/dashboard-metrics-scraper created
serviceaccount/admin-user created
clusterrolebinding.rbac.authorization.k8s.io/admin-user created
[root@kubeadm-master1 m43]# kubectl get svc -n kubernetes-dashboard
NAME                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)         AGE
dashboard-metrics-scraper   ClusterIP   10.200.158.176   <none>        8000/TCP        9s
kubernetes-dashboard        NodePort    10.200.215.254   <none>        443:32002/TCP   10s


文章来源:https://blog.csdn.net/startfefesfe/article/details/135119208
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。