K8s1.18.0 安装配置 Kuboard v2

官方文档: https://kuboard.cn/learning/k8s-intermediate/service/network.html#%E6%95%B0%E6%8D%AE%E5%8C%85%E7%9A%84%E4%BC%A0%E9%80%92-pod-to-pod-%E8%B7%A8%E8%8A%82%E7%82%B9

获取yaml文件

kubectl apply -f https://kuboard.cn/install-script/kuboard.yamlkubectl apply -f https://addons.kuboard.cn/metrics-server/0.3.7/metrics-server.yaml

获取Token

echo $(kubectl -n kube-system get secret $(kubectl -n kube-system get secret | grep kuboard-user | awk '{print $1}') -o go-template='{{.data.token}}' | base64 -d)

查看 Kuboard 运行状态

kubectl get pods -l k8s.kuboard.cn/name=kuboard -n kube-system -o wide[root@test3 data]# kubectl get pods -l k8s.kuboard.cn/name=kuboard -n kube-system -o wide NAME                       READY   STATUS              RESTARTS   AGE     IP              NODE           NOMINATED NODE   READINESS GATES kuboard-5967d77d89-g864c   0/1     ContainerCreating   0          3m41s   <none>          test1          <none>           <none> kuboard-7986796cf8-fhs4m   1/1     Running             0          13m     10.122.32.148   k8s-master01   <none>           <none>

访问登录

https://192.168.31.10:32567

搭建部署一个nginx服务





点击保存 创建nginx的Deployments

NFS部署搭建

  [root@k8s-master01 ~]#  yum install -y nfs-utils  [root@k8s-master01 ~]# vim /etc/exports    /data/k8snfs  192.168.31.10(rw,sync,no_root_squash)    /data/k8snfs  192.168.31.243(rw,sync,no_root_squash)    /data/k8snfs  192.168.31.5(rw,sync,no_root_squash) [root@k8s-master01 ~]# systemctl  start nfs      [root@k8s-master01 ~]#   showmount  -e 192.168.31.10 Export list for 192.168.31.10: /data/k8snfs 192.168.31.5,192.168.31.243,192.168.31.10

部署的nginx服务 会自动生成一个NFS的pod

进入NFS查看目录生成

访问nginx服务


[root@k8s-master01 nginx]# kubectl get pod -n default -o wide #查看pod所在node和非配的Ip地址
[root@k8s-master01 nginx]# kubectl get service -n default -o wide #查看pod对应service的Ip地址和对应宿主机的端口

查看各个pod节点和service节点互通情况(calico)

[root@test3 ~]#  kubectl run curl --image=radial/busyboxplus:curl -i --tty  [root@test1 ~]# kubectl  get service -n default  NAME          TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE  kubernetes    ClusterIP      10.10.0.1       <none>        443/TCP          17d  pod-jenkins   NodePort       10.10.210.124   <none>        8080:32277/TCP   10d  redis         LoadBalancer   10.10.0.248     <pending>     6379:31170/TCP   13d  web-centos    NodePort       10.10.137.89    <none>        5000:30719/TCP   10d  web-nginx     NodePort       10.10.94.189    <none>        8090:31569/TCP   7d16h  web-spug      NodePort       10.10.52.37     <none>        80:32165/TCP     23h [root@test1 ~]# kubectl  get pod -n default -o wide NAME                           READY   STATUS    RESTARTS   AGE     IP               NODE           NOMINATED NODE   READINESS GATES curl                           1/1     Running   1          7d16h   10.122.32.172    k8s-master01   <none>           <none> pod-jenkins-78d64f949b-lxfxt   1/1     Running   0          10d     10.122.173.143   test1          <none>           <none> pod-jenkins-78d64f949b-spjx5   1/1     Running   0          10d     10.122.32.169    k8s-master01   <none>           <none> redis-74df6f7f7c-xzh8h         1/1     Running   1          13d     10.122.32.152    k8s-master01   <none>           <none> web-nginx-656b579987-5mwk4     1/1     Running   0          7d16h   10.122.32.174    k8s-master01   <none>           <none> web-nginx-656b579987-qskkm     1/1     Running   0          7d16h   10.122.32.173    k8s-master01   <none>           <none> web-spug-7bcd9ff566-ghkgm      1/1     Running   0          23h     10.122.173.151   test1          <none>           <none> [root@test3 ~]# kubectl  exec -it curl /bin/sh

©著作权归作者所有:来自51CTO博客作者hanye韩也的原创作品,如需转载,请注明出处,否则将追究法律责任

每一份赞赏源于懂得

赞赏

0人进行了赞赏支持

更多相关文章

  1. 华三IRF 堆叠 精讲版 笔记(肖哥)
  2. 三层口聚合技术笔记 (华为肖哥)
  3. Win10系统怎么添加LOOPBACK环回接口呀?
  4. Too many open files) when using LOCK TABLES
  5. Mac系统上查看端口占用和释放端口教程
  6. VmwareWorkstation 16无法安装VMware Tools的解决方法
  7. PPT插件OKplus软件和学习视频下载
  8. CentOS7.6修改主机名称hostname
  9. kafka查看版本

随机推荐

  1. CoordinatorLayout使用自定义Behavior实
  2. NestedScrollView中webview被点击,NestedS
  3. 占位的实现和间接实现从快捷建中启动一个
  4. Android应用程序结构介绍
  5. Android底部导航栏实现(一)之BottomNavigat
  6. 解决Android SDK Manager不能访问Google
  7. [Android]定制RadioButton样式
  8. 50个安卓开发者应该熟悉的Android Studio
  9. EditText的属性
  10. UI控件--EditText