使用Kubernetes部署Kubernetes集群

news2024/10/6 18:28:23

Kubernetes集群环境搭建

文章目录

  • Kubernetes集群环境搭建
    • 一、环境初始化
      • 1、查看操作系统的版本
      • 2、主机名解析
      • 3、时钟同步
      • 4、禁用swap分区
      • 5、开启IP转发,和修改内核信息---三个节点都需要配置
      • 6、配置IPVS功能(三个节点都做)
    • 二、安装docker
      • 1、切换镜像源(三个节点都做)
      • 2、安装docker-ce(三个节点都做)
      • 3、添加一个配置文件,配置docker仓库加速器(三个节点都做)
    • 三、安装kubernetes组件
      • 1、切换成国内的镜像源
      • 2、安装kubeadm kubelet kubectl工具(三个节点都做)
      • 3、配置containerd(三个节点都做)
      • 4、部署k8s的master节点(在master节点运行)
      • 5、安装pod网络插件
      • 6、将node节点加入k8s集群
      • 7、创建pod,运行nginx容器进行测试
      • 8、修改默认网页

环境

主机IP地址组件
master192.168.89.151docker,kubectl,kubeadm,kubelet
node1192.168.89.10docker,kubectl,kubeadm,kubelet
node2192.168.89.20docker,kubectl,kubeadm,kubelet

本次环境搭建需要安装三台Linux系统(一主二从),内置centos7.5系统,然后在每台linux中分别安装docker。kubeadm(1.25.4),kubelet(1.25.4),kubelet(1.25.4)

一、主机安装
安装虚拟机过程中注意下面选项的设置:
1、操作系统环境:cpu2个 内存2G 硬盘50G centos7+
2、语言:中文简体/英文
3、软件选择:基础设施服务器
4、分区选择:自动分区/手动分区
5、网络配置:按照下面配置网络地址信息
网络地址:192.168.89.(151、10、20)
子网掩码:255.255.255.0
默认网关:192.168.89.2
DNS:8.8.8.8
6、主机名设置:
Master节点:master
Node节点:node1
Node节点:node2

一、环境初始化


1、查看操作系统的版本

[root@master ~]# cat /etc/redhat-release                //此方式下安装kubernetes集群要求Centos版本要在7.5或之上
CentOS Stream release 8       
[root@master ~]# systemctl stop postfix       //三台都关闭
Failed to stop postfix.service: Unit postfix.service not loaded.

2、主机名解析

[root@master ~]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.89.151  master.example.com     master
192.168.89.10   node1.example.com      node1
192.168.89.20   node2.example.com      node2

[root@master ~]# scp /etc/hosts root@192.168.89.10:/etc/hosts
root@192.168.89.10's password:
hosts                                                                                                                                 100%  294   192.5KB/s   00:00
[root@master ~]# scp /etc/hosts root@192.168.89.20:/etc/hosts
root@192.168.89.20's password:
hosts                                                                                                                                 100%  294   164.0KB/s   00:00


//关闭三台主机防火墙
[root@master ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 2022-11-17 15:04:46 CST; 1min 12s ago
     Docs: man:firewalld(1)
[root@master ~]# getenforce
Permissive

3、时钟同步

[root@master ~]# vim /etc/chrony.conf
# Serve time even if not synchronized to a time source.
local stratum 10                                       //将此行的#去掉
[root@master ~]# systemctl restart chronyd.service
[root@master ~]# systemctl enable chronyd.service
Created symlink /etc/systemd/system/multi-user.target.wants/chronyd.service → /usr/lib/systemd/system/chronyd.service.
[root@master ~]# hwclock -w


[root@node1 ~]# vim /etc/chrony.conf
#pool 2.centos.pool.ntp.org iburst
server master.example.com  iburst
[root@node1 ~]# systemctl restart chronyd
[root@node1 ~]# systemctl enable chronyd
[root@node1 ~]# hwclock -w

[root@node2 ~]# vim /etc/chrony.conf
#pool 2.centos.pool.ntp.org iburst
server master.example.com  iburst
[root@node2 ~]# systemctl restart chronyd
[root@node2 ~]# systemctl enable chronyd
[root@node2 ~]# hwclock -w

4、禁用swap分区

[root@master ~]# vim /etc/fstab
#/dev/mapper/cs-swap     none                    swap    defaults        0 0               //注释掉swap分区那一行
[root@master ~]# swapoff -a

[root@node1 ~]# vim /etc/fstab
#/dev/mapper/cs-swap     none                    swap    defaults        0 0 
[root@node1 ~]# swapoff -a

[root@node2 ~]# vim /etc/fstab
#/dev/mapper/cs-swap     none                    swap    defaults        0 0
[root@node2 ~]# swapoff -a

5、开启IP转发,和修改内核信息—三个节点都需要配置

[root@master ~]# vim /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
[root@master ~]# modprobe   br_netfilter
[root@master ~]# sysctl -p  /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1


[root@node1 ~]# vim /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
[root@node1 ~]# modprobe   br_netfilter
[root@node1 ~]# sysctl -p  /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1


[root@node2 ~]# vim /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
[root@node2 ~]# modprobe   br_netfilter
[root@node2 ~]# sysctl -p  /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1

6、配置IPVS功能(三个节点都做)

[root@master ~]# vim /etc/sysconfig/modules/ipvs.modules
#!/bin/bash
modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
[root@master ~]# chmod +x /etc/sysconfig/modules/ipvs.modules
[root@master ~]# bash /etc/sysconfig/modules/ipvs.modules
[root@master ~]# lsmod | grep -e ip_vs
ip_vs_sh               16384  0
ip_vs_wrr              16384  0
ip_vs_rr               16384  0
ip_vs                 172032  6 ip_vs_rr,ip_vs_sh,ip_vs_wrr
nf_conntrack          172032  2 nf_nat,ip_vs
nf_defrag_ipv6         20480  2 nf_conntrack,ip_vs
libcrc32c              16384  5 nf_conntrack,nf_nat,nf_tables,xfs,ip_vs
[root@master ~]# reboot


[root@node1 ~]#  vim /etc/sysconfig/modules/ipvs.modules
#!/bin/bash
modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
[root@node1 ~]# chmod +x /etc/sysconfig/modules/ipvs.modules
[root@node1 ~]# bash /etc/sysconfig/modules/ipvs.modules
[root@node1 ~]# lsmod | grep -e ip_vs
ip_vs_sh               16384  0
ip_vs_wrr              16384  0
ip_vs_rr               16384  0
ip_vs                 172032  6 ip_vs_rr,ip_vs_sh,ip_vs_wrr
nf_conntrack          172032  3 nf_nat,nft_ct,ip_vs
nf_defrag_ipv6         20480  2 nf_conntrack,ip_vs
libcrc32c              16384  5 nf_conntrack,nf_nat,nf_tables,xfs,ip_vs
[root@node1 ~]# reboot

[root@node2 ~]#  vim /etc/sysconfig/modules/ipvs.modules
#!/bin/bash
modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
[root@node2 ~]# chmod +x /etc/sysconfig/modules/ipvs.modules
[root@node2 ~]# bash /etc/sysconfig/modules/ipvs.modules
[root@node2 ~]# lsmod | grep -e ip_vs
ip_vs_sh               16384  0
ip_vs_wrr              16384  0
ip_vs_rr               16384  0
ip_vs                 172032  6 ip_vs_rr,ip_vs_sh,ip_vs_wrr
nf_conntrack          172032  3 nf_nat,nft_ct,ip_vs
nf_defrag_ipv6         20480  2 nf_conntrack,ip_vs
libcrc32c              16384  5 nf_conntrack,nf_nat,nf_tables,xfs,ip_vs
[root@node2 ~]# reboot

二、安装docker


1、切换镜像源(三个节点都做)

[root@master yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
[root@master yum.repos.d]# dnf -y install epel-release         
[root@master yum.repos.d]# wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo      //三个节点都要下载镜像源

2、安装docker-ce(三个节点都做)

[root@master yum.repos.d]# dnf -y install docker-ce --allowerasing
[root@master ~]#  systemctl restart docker
[root@master ~]#  systemctl enable docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
[root@master ~]#

3、添加一个配置文件,配置docker仓库加速器(三个节点都做)

[root@master ~]# cat > /etc/docker/daemon.json << EOF
> {
>   "registry-mirrors": ["https://14lrk6zd.mirror.aliyuncs.com"],
>   "exec-opts": ["native.cgroupdriver=systemd"],
>   "log-driver": "json-file",
>   "log-opts": {
>     "max-size": "100m"
>   },
>   "storage-driver": "overlay2"
> }
> EOF
[root@master ~]# systemctl daemon-reload
[root@master ~]# systemctl restart docker

三、安装kubernetes组件


1、切换成国内的镜像源

[root@master ~]# cat > /etc/yum.repos.d/kubernetes.repo << EOF
> [kubernetes]
> name=Kubernetes
> baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
> enabled=1
> gpgcheck=0
> repo_gpgcheck=0
> gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
> EOF
[root@master ~]#

2、安装kubeadm kubelet kubectl工具(三个节点都做)

[root@master ~]# dnf  -y  install kubeadm  kubelet  kubectl
[root@master ~]# systemctl  restart  kubelet
[root@master ~]# systemctl  enable  kubelet
Created symlink /etc/systemd/system/multi-user.target.wants/kubelet.service → /usr/lib/systemd/system/kubelet.service.
[root@master ~]#

3、配置containerd(三个节点都做)

[root@master ~]# containerd config default > /etc/containerd/config.toml
[root@master ~]# vim /etc/containerd/config.toml
sandbox_image = "registry.aliyuncs.com/google_containers/pause:3.6"
[root@master ~]# systemctl   restart  containerd
[root@master ~]# systemctl   enable  containerd
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /usr/lib/systemd/system/containerd.service.
[root@master ~]#

4、部署k8s的master节点(在master节点运行)

[root@master ~]# kubeadm init \
>   --apiserver-advertise-address=192.168.89.151 \
>   --image-repository registry.aliyuncs.com/google_containers \
>   --kubernetes-version v1.25.4 \
>   --service-cidr=10.96.0.0/12 \
>   --pod-network-cidr=10.244.0.0/16
Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

Alternatively, if you are the root user, you can run:

  export KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 192.168.89.151:6443 --token jpgc9j.w22gtd12wedzp3km \
        --discovery-token-ca-cert-hash sha256:b4d942684d920d03d4f5646f9876117bfeeee2c06f90b871a35980ab7fefa6fa
[root@master ~]#

[root@master ~]# vim /etc/profile.d/kuber.sh
export KUBECONFIG=/etc/kubernetes/admin.conf
[root@master ~]# source /etc/profile.d/kuber.sh

5、安装pod网络插件

[root@master ~]# wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
[root@master ~]# kubectl apply -f kube-flannel.yml
namespace/kube-flannel created
clusterrole.rbac.authorization.k8s.io/flannel created
clusterrolebinding.rbac.authorization.k8s.io/flannel created
serviceaccount/flannel created
configmap/kube-flannel-cfg created
daemonset.apps/kube-flannel-ds created

6、将node节点加入k8s集群

[root@node1 ~]# kubeadm join 192.168.89.151:6443 --token jpgc9j.w22gtd12wedzp3km \
>         --discovery-token-ca-cert-hash sha256:b4d942684d920d03d4f5646f9876117bfeeee2c06f90b871a35980ab7fefa6fa
[preflight] Running pre-flight checks
        [WARNING FileExisting-tc]: tc not found in system path
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...

This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.

[root@node1 ~]#



[root@node2 ~]# kubeadm join 192.168.89.151:6443 --token jpgc9j.w22gtd12wedzp3km \
>         --discovery-token-ca-cert-hash sha256:b4d942684d920d03d4f5646f9876117bfeeee2c06f90b871a35980ab7fefa6fa
[preflight] Running pre-flight checks
        [WARNING FileExisting-tc]: tc not found in system path
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...

This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.

[root@node2 ~]#

7、创建pod,运行nginx容器进行测试

[root@master ~]# kubectl create deployment nginx --image nginx
deployment.apps/nginx created
[root@master ~]# kubectl get pods
NAME                    READY   STATUS    RESTARTS   AGE
nginx-76d6c9b8c-sfb7x   0/1     Pending   0          13s
[root@master ~]# kubectl expose deployment nginx --port 80 --type NodePort
service/nginx exposed
[root@master ~]# kubectl get pods -o wide
NAME                    READY   STATUS    RESTARTS   AGE     IP           NODE                NOMINATED NODE   READINESS GATES
nginx-76d6c9b8c-sfb7x   1/1     Running   0          4m53s   10.244.1.3   node1.example.com   <none>           <none>
[root@master ~]# kubectl get services
NAME         TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
kubernetes   ClusterIP   10.96.0.1      <none>        443/TCP        122m
nginx        NodePort    10.109.89.19   <none>        80:30656/TCP   5m13s

浏览器访问
在这里插入图片描述

8、修改默认网页

[root@master ~]# kubectl exec -it pod/nginx-76d6c9b8c-sfb7x -- /bin/bash
root@nginx-76d6c9b8c-sfb7x:/# cd /usr/share/nginx/html/
root@nginx-76d6c9b8c-sfb7x:/usr/share/nginx/html# echo "xiaoyi" > index.html
root@nginx-76d6c9b8c-sfb7x:/usr/share/nginx/html#

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/14157.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【学习笔记】kafka学习二

生产者-同步消息发送 如果生产者发送消息没有收到ack&#xff0c;会阻塞到3s时间&#xff0c;如果还没收到消息&#xff0c;会重试&#xff0c;重试3次 生产者-异步消息发送&#xff08;缺点&#xff1a;消息丢失情况&#xff0c;同步更优&#xff09; 生产者发送消息后可以直…

脚本是什么意思?有什么特点?与RPA有哪些区别?

脚本是什么意思&#xff1f;有什么特点&#xff1f;与RPA有哪些区别&#xff1f;相信还有不少人对于这三个问题不是很清楚&#xff0c;今天我们小编就给大家来简单回答一下&#xff0c;仅供参考哦&#xff01; 脚本是什么意思&#xff1f; 脚本简单地说就是一条条的文字命令&a…

Linux系统如何重装Windows系统

背景 因为种种原因安装了Linux系统Ubuntu 18.04.6,随之迎来了种种麻烦&#xff0c;于是决定安装回Windows 10系统。 安装步骤如下&#xff1a; 安装步骤一、选择需要安装的系统二、查看CPU运行位数三、下载镜像&#xff08;换一台Windows系统或者使用虚拟机&#xff09;四、创建…

《FFmpeg Basics》中文版-04-调整和伸缩视频

正文 在FFmpeg中调整视频的大小意味着可以通过一个选项改变其宽度和高度&#xff0c;而缩放则意味着使用一个具有高级功能的scale filter来改变帧的大小。 调整视频 输出视频的宽度和高度可以在输出文件名之前设置-s选项。视频分辨率以wxh格式输入&#xff0c;其中w为像素宽…

驱动——ioctl数组及结构体传递

1、ioctl函数是用户程序来控制设备的函数 int ioctl(int fd, unsigned long request, ...); 函数功能&#xff1a;设备控制 参数&#xff1a; fd:文件描述符 request&#xff1a;请求码 ...:可变参数 需要传递地址 返回值&#xff1a;成功返回0&#xff0c;失败返回-1&a…

【ARXIV2207】LightViT: Towards Light-Weight Convolution-Free Vision Transformers

【ARXIV2207】LightViT: Towards Light-Weight Convolution-Free Vision Transformers 论文地址&#xff1a;https://arxiv.org/abs/2207.05557 代码地址&#xff1a;https://github.com/hunto/LightViT 1、研究动机 作者认为&#xff0c;在ViT中混合 convolution&#xff0c;…

高校部署房产管理系统前要认真做好那些基础工作?

高校部署数图互通房产管理系统的目的是为了在学校产权范围的基础上&#xff0c;确保开发工作的合理性、房产资源调配的科学性&#xff0c;强化房产资源的使用&#xff0c;切实将学校房产作用功能发挥出来。 一、在部署房产管理系统前期基础性工作包括&#xff1a; 1、摸清家底…

【C语言】-程序环境和预处理指令

文章目录前言1、翻译环境2、执行环境前言 1、翻译环境 我们的代码运行出来&#xff0c;变为我们人眼可以看到的结果的这个过程会经过两个过程。 一、程序的翻译环境&#xff1a;在这个环境中&#xff0c;源代码会变成可以执行的机器指令。这个过程就是把我们人能看懂的语言转换…

操作系统4小时速成:内存管理,程序执行过程,扩充内存,连续分配,非连续分配,虚拟内存,页面替换算法

操作系统4小时速成&#xff1a;内存管理&#xff0c;程序执行过程&#xff0c;扩充内存&#xff0c;连续分配&#xff0c;非连续分配&#xff0c;虚拟内存&#xff0c;页面替换算法 2022找工作是学历、能力和运气的超强结合体&#xff0c;遇到寒冬&#xff0c;大厂不招人&…

艾美捷C1q天然蛋白的应用和化学性质说明

C1q是构成C1的一个重要成分&#xff0c;由小肠、结肠上皮细胞、血液中单核细胞、腹膜巨噬细胞、上皮细胞、肝脏、脾脏等合成。活化后能启发补体经典激活途径。 C1q蛋白家族由众多含C1q结构域的蛋白组成, 从细菌到高等哺乳动物中都有分布。这类蛋白由一条信号肽、胶原样区(Colla…

Java BIO基本介绍

Java BIO基本介绍Java BIO基本介绍工作原理BIO传统通讯实现总结BIO实现多发和多收结果&#xff1a;Java BIO基本介绍 &#x1f4dc;Java BIO就是传统的java io 编程&#xff0c;其相关的类和接口在java.io&#x1f4dc;Blo(blockingl/O):同步阻塞&#xff0c;服务器实现模式为…

Java本地搭建宝塔部署实战springboot仓库管理系统源码

大家好啊&#xff0c;我是测评君&#xff0c;欢迎来到web测评。 本期给大家带来一套Java开发的springboot仓库管理系统源码。 技术架构 技术框架&#xff1a;jdk8 jQuery MySQL5.7 mybatisplus layui shiro运行环境&#xff1a;jdk8 IntelliJ IDEA maven3 宝塔面板 本…

云计算HCIA学习笔记-云计算基础概念

第1章 云计算基础概念 1.1 云计算课程安排说明 &#xff08;IA-虚拟化-FC / IP-Linux OpenStack 桌面云/IE-备份容灾迁移&#xff09; 1.2 为什么云计算IA讲虚拟化&#xff1f; 提前告知学员&#xff0c;为什么IA课程要重点讲解虚拟化&#xff1f;云计算基于OpenStack&…

c++多线程(一)线程管理

来源&#xff1a;微信公众号「编程学习基地」 文章目录1.启动线程2.等待线程完成2.1特殊情况下的等待2.2使用RAII等待线程完成2.3后台运行线程2.4量产线程&#xff0c;等待结束2.传递参数3.转移线程所有权4.运行时决定线程数量2.5 识别线程1.启动线程 当把函数对象传入到线程…

G1D15-fraud-APT-汇报-基础模型与LR相关内容总结-KG-cs224w colab1-ctf rce41-44

一、fraud 跑了一个lr模型&#xff0c;从正则&#xff0c;一直看到了极大似然和最大后验估计emmm。一路跑偏&#xff0c;已经0954了。先把实验结果抄一抄 本来想把模型都跑完&#xff0c;没想到看R补充了大量的基本知识&#xff08;L1\L2正则、先验概率 今天先来看fraud 看的…

Hive——详细总结Hive中各大查询语法

✅作者简介&#xff1a;最近接触到大数据方向的程序员&#xff0c;刚入行的小白一枚 &#x1f34a;作者博客主页&#xff1a;皮皮皮皮皮皮皮卡乒的博客 &#x1f34b;当前专栏&#xff1a;Hive学习进阶之旅 &#x1f352;研究方向&#xff1a;大数据方向&#xff0c;数据汇聚&a…

单隐层神经网络在Matlab上实现及其简单应用

&#x1f352;&#x1f352;&#x1f352;欢迎关注&#x1f308;&#x1f308;&#x1f308; &#x1f4dd;个人主页&#xff1a;我爱Matlab &#x1f44d;点赞➕评论➕收藏 养成习惯&#xff08;一键三连&#xff09;&#x1f33b;&#x1f33b;&#x1f33b; &#x1f34c;希…

Kafka 认证三:添加 Kerberos 认证详细流程

背景 上一章节介绍了 Kerberos 服务端和客户端的部署过程&#xff0c;本章节继续介绍 Kafka 添加 Kerberos 认证的部署流程&#xff0c;及 Java API 操作的注意事项。 sasl.kerberos.service.name 配置的含义 Kafka 添加 Kerberos 部署的核心是 Kafka 服务端的 Principal 配…

基于gensim实现word2vec模型(附案例实战)

目录 什么是word2vec&#xff1f; Word2Vec的原理 gensim实现word2vec模型&#xff08;实战&#xff09; 什么是word2vec&#xff1f; Word2Vec是google在2013年推出的一个NLP工具&#xff0c;它的特点是能够将单词转化为向量来表示&#xff0c;这样词与词之间就可以定量的…

20+个很棒的 Python 脚本的集合(迷你项目)

&#x1f482; 个人网站:【海拥】【摸鱼小游戏】【神级源码资源网站】&#x1f91f; 风趣幽默的前端学习课程&#xff1a;&#x1f449;28个案例趣学前端&#x1f485; 想寻找共同学习交流、摸鱼划水的小伙伴&#xff0c;请点击【摸鱼学习交流群】&#x1f4ac; 免费且实用的 前…