logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

flask-sqlalchemy 绑定多个数据库并实现多数据库迁移

需要指定,数据迁移自动选择的相应数据库,不指定默认使用"测试表"})name=db.Column(db.String(128),comment="名称")

#flask#python
centos和alpine基础镜像对比

以Flask部署为例,采用supervisor+uwsgi方式部署首先有个好消息:supervisor在2019年4月开始支持python3,安装:pip3 install supervisorcentosFROM docker.io/centosMAINTAINER LLCRUN yum -y install wget && yum clean all...

ubuntu20.04 k8s添加GPU节点

准备 nvidia 驱动和CUDA下载nvidia驱动和CUDAnvdia驱动网址https://www.nvidia.cn/Download/index.aspx?lang=cnCUDA网址https://developer.nvidia.com/cuda-toolkit-archive建立nvidia文件夹并拷贝sudo mkdir /worksudo chown -R casia:casia

#ubuntu#docker#linux
k8s离线部署学习-Nvidia插件

下载镜像docker pull nvidia/k8s-device-plugin:v0.9.0docker tag nvidia/k8s-device-plugin:v0.9.0 10.0.7.125:8000/library/k8s-device-plugin:v0.9.0docker push 10.0.7.125:8000/library/k8s-device-plugin:v0.9.0下载

#k8s#docker
k8s 禁止某些(role: db)pod联网

apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata:name: test-network-policynamespace: defaultspec:podSelector:matchLabels:role: dbpolicyTypes:- Ingress- Egress

#k8s
python k8sjob管理

获取pod信息根据标签查询pod列表core = CoreV1Api()pod_list = core.list_namespaced_pod(namespace='default', label_selector='job')for pod in pod_list.items:# 元数据metadata: V1ObjectMeta = pod.metadata# 名称pod_name = met

#k8s
k8s离线部署学习-NFS部署

注意: 部署在存储节点下载:apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends nfs-common | grep -v i386 | grep "^\w

#k8s
docker registry的搭建并结合k8s使用

一、搭建docker registry1、安装docker由于使用docker容器安装docker registry:yum install -y yum-utilsyum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoyum -y install docker-ce

k8s执行Job示例

from kubernetes.client import BatchV1Api, V1Job, V1Container, V1ObjectMeta, V1PodTemplateSpec, V1PodSpec, V1JobSpec, \V1Volume, V1PersistentVolumeClaimVolumeSource, V1VolumeMount, V1ResourceRequiremen

#k8s
k8s离线部署学习-安装dashboard

镜像kubernetesui/dashboard:v2.3.1kubernetesui/metrics-scraper:v1.0.6loaddocker load -i dashboard_v2.3.1.tardocker load -i metrics-scraper_v1.0.6.tar重新tagdocker tag kubernetesui/dashboard:v2.3.1 10.0.7.1

#k8s
    共 14 条
  • 1
  • 2
  • 请选择