WebLogic & Kubernetes

  1. 搭建kubernetes集群环境

    • 安装前的规划

主机名地址角色组件
k8s-master 192.168.56.118 k8s-master etcd、kube-apiserver、kube-controller-manager、kube-scheduler
k8s-node1 192.168.56.119 k8s-node kubelet、docker、kube_proxy
k8s-node2 192.168.56.120 k8s-node kubelet、docker、kube_proxy
    • 软件下载

kubernetes二进制文件下载

      kubernetes当前最新版本为v1.15.12,但本次实验使用v1.18.2作为本次实验版本

      https://github.com/kubernetes/kubernetes/releases/tag/v1.3.10

etcd数据库下载

        https://github.com/coreos/etcd/releases/

        etcd服务作为kubernetes集群的主数据库,在安装Kubernetes各服务之前,需要首先安装和启动

        https://github.com/etcd-io/etcd/releases

        当前最新版本是:v3.4.7,但使用v3.3.20,https://github.com/etcd-io/etcd/releases/tag/v3.3.20

    • 软件安装

    • 配置与启动

 

    • Master节点安装

        Master节点上的etcd、kube-apiserver、kube-controller-manager、kube-scheduler服务

        1)etcd,

          设置systemd服务文件:/usr/lib/systemd/system/etcd.servicd:

        2)kube-apiserver

          

    • Node节点安装

    • 配置和启动

 

2.weblogic在kubernetes上的使用

    • 安装weblogic operator

    • 使用

 3.问题汇总

  3.1 kubectl get pods -n sample-domain1-ns状态显示ImagePullBackOff

    解决办法:

    通过kubectl describe pods -n sample-domain1-ns观察到下面异常:

 

复制代码

Events:
Type     Reason           Age                   From                 Message
----     ------           ----                   ----                 -------
Normal   Scheduled         10m                   default-scheduler     Successfully assigned sample-domain1-ns/sample-domain1-introspector-nbcrw to k8s-worker2
Normal   Pulling           9m33s (x2 over 10m)   kubelet, k8s-worker2 Pulling image "domain-home-in-image:12.2.1.4"
Warning Failed           8m57s (x2 over 9m46s) kubelet, k8s-worker2 Failed to pull image "domain-home-in-image:12.2.1.4": rpc error: code = Unknown desc = Error response from daemon: pull access denied for domain-home-in-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Warning Failed           8m57s (x2 over 9m46s) kubelet, k8s-worker2 Error: ErrImagePull
Normal   BackOff           8m45s (x2 over 9m46s) kubelet, k8s-worker2 Back-off pulling image "domain-home-in-image:12.2.1.4"
Warning Failed           8m45s (x2 over 9m46s) kubelet, k8s-worker2 Error: ImagePullBackOff
Normal   DeadlineExceeded 8m30s (x2 over 8m32s) kubelet, k8s-worker2 Pod was active on the node longer than the specified deadline

复制代码

 

 3.2,踩坑之二

  镜像拉取问题处理:

  https://www.cnblogs.com/xzlive/p/11460866.html

posted on 2022-08-10 13:33  root-123  阅读(120)  评论(0编辑  收藏  举报