首页 > 系统相关 >centos k8s 部署 yearning

centos k8s 部署 yearning

时间:2023-02-23 17:23:49浏览次数:42  
标签:false name centos yaml admin value yearning k8s

1. 下载镜像

docker pull zhangsean/yearning:v3.1.2.2

2. yaml 文件

apiVersion: apps/v1
kind: Deployment
metadata:
  name: yearning
spec:
  replicas: 1
  selector:
    matchLabels:
      app: yearning
  template:
    metadata:
      labels:
        app: yearning
    spec:
      containers:
      - name: yearning
        image: 'docker.io/library/yearning:3.1.2'
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 8000
        env:
        - name: MYSQL_ADDR
          value: '10.20.0.3:3306'
        - name: MYSQL_USER
          value: "root"
        - name: MYSQL_PASSWORD
          value: "VPMmLsnfNhtoYIkE"
        - name: MYSQL_DB
          value: "yearning"
        - name: SECRET_KEY
          value: "VPMmLsnfNhtoYIkE"
---
apiVersion: v1
kind: Service
metadata:
  name: yearning
spec:
  ports:
    - name: http-8000
      port: 8000
      protocol: TCP
      targetPort: 8000
      nodePort: 30625
  selector:
    app: yearning
  type: NodePort

3. 启动yaml

kubectl create -f yearning.yaml

4. sql 插入

## 需要创建对应的 DB - yearning
CREATE DATABASE `yearning` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
use yearning;
 INSERT INTO `core_accounts` (`username`,`password`,`department`,`real_name`,`email`,`is_recorder`) VALUES ('admin','pbkdf2_sha256$120000$LwSop65y17f4$AgXGkzmZLF7Lw3K1gToLkOBHqziBC0Wpf3bBIHoWA5Q=','DBA','超级管理员','',0);


INSERT INTO `core_global_configurations` (`authorization`,`ldap`,`message`,`other`,`stmt`,`audit_role`,`board`) VALUES ('global','{"url":"","user":"","password":"","type":"(\u0026(objectClass=organizationalPerson)   (sAMAccountName=%s))","sc":"","ldaps":false,"map":"","test_user":"","test_password":""}','{"web_hook":"","host":"","port":25,"user":"","password":"","to_user":"","mail":false,"ding":false,"ssl":false,"push_type":false,"key":""}','{"limit":1000,"idc":["Aliyun","AWS"],"query":false,"register":false,"export":false,"ex_query_time":60}',0,'{"DMLAllowLimitSTMT":false,"DMLInsertColumns":false,"DMLMaxInsertRows":10,"DMLWhere":false,"DMLAllowInsertNull":false,"DMLOrder":false,"DMLSelect":false,"DMLInsertMustExplicitly":false,"DDLEnablePrimaryKey":false,"DDLCheckTableComment":false,"DDlCheckColumnComment":false,"DDLCheckColumnNullable":false,"DDLCheckColumnDefault":false,"DDLEnableAcrossDBRename":false,"DDLEnableAutoincrementInit":false,"DDLEnableAutoIncrement":false,"DDLEnableAutoincrementUnsigned":false,"DDLEnableDropTable":false,"DDLEnableDropDatabase":false,"DDLEnableNullIndexName":false,"DDLIndexNameSpec":false,"DDLMaxKeyParts":5,"DDLMaxKey":5,"DDLMaxCharLength":10,"MaxTableNameLen":10,"MaxAffectRows":1000,"MaxDDLAffectRows":0,"SupportCharset":"","SupportCollation":"","CheckIdentifier":false,"MustHaveColumns":"","DDLMultiToCommit":false,"DDLPrimaryKeyMust":false,"DDLAllowColumnType":false,"DDLImplicitTypeConversion":false,"DDLAllowPRINotInt":false,"DDLEnableForeignKey":false,"DDLTablePrefix":"","DDLColumnsMustHaveIndex":"","DDLAllowChangeColumnPosition":false,"DDLCheckFloatDouble":false,"IsOSC":false,"OSCExpr":"","OscSize":0,"AllowCreateView":false,"AllowCrateViewWithSelectStar":false,"AllowCreatePartition":false,"AllowSpecialType":false,"PRIRollBack":false}','');


INSERT INTO `core_graineds` (`username`,`group`) VALUES ('admin','["admin"]');

5. 重新启动yaml 文件, 打开浏览器登录http://ip:30625 

6. 账号密码 :   admin/Yearning_admin

标签:false,name,centos,yaml,admin,value,yearning,k8s
From: https://www.cnblogs.com/S--S/p/17148818.html

相关文章

  • linux(centos)下安装.net6 环境
    添加仓储指令rpm-Uvhhttps://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm执⾏安装命令:1、如果不需要在linux上编译源码yuminstall dotnet......
  • k8s~ingress限流机制
    Ingress限流限速的注解定义了对连接和传输速率的限制。这些可以用来减轻DDoS攻击。它采用了“漏斗”算法实现限制。主要参数nginx.ingress.kubernetes.io/limit-co......
  • k8s web访问地址映射到具体IP 配置k8s master 地址访问容器
    kubectlproxy--address='0.0.0.0' --accept-hosts='^*$'--port=8001 kubectl-nkubernetes-dashboardeditservicekubernetes-dashboardkubectl-nkubernetes......
  • k8s工作端二进制部署-kube-proxy
    本文章是 k8s二进制高可用集群部署 的分支。详细步骤请参考目录。二进制下载地址压缩包下载:https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG......
  • 给一台10年的华硕笔记本电脑A85V型号安装最新版本的centos stream 9系统
    ######################准备1台华硕笔记本电脑A85V型号,基本配置是:12G内存,128G固态硬盘,500G普通硬盘,4核CPU,i5处理器(是2013年买的,今年是2023年,已经10年了);1个128G的金士顿......
  • 查看k8s集群kube-proxy的代理模式
    一、访问kube-proxy的接口与iptables模式下的kube-proxy相比,IPVS模式下的kube-proxy重定向通信的延迟要短,并且在同步代理规则时具有更好的性能。与其他代理模式......
  • Centos7 K8S基础镜像设置
    1.1硬件基础配置指标指标值CPU2核内存2048M1.2操作系统基础配置配置项配置值Date&TimeAsia/ShanghaitimezoneKeyBOARDEnglish(US)......
  • k8s-deployment扩缩容
    目录手动扩缩容手动扩缩容1.kubectlscaledeploynginx--replicas=3#非交互2.kubectleditdeploynginx#交互式......
  • k8s-deployment回滚
    更新yaml文件镜像版本--模拟更新版本1.kubectlsetimagedeploynginxnginx=nginx:1.14.2--record#非交互2.kubectleditdeploynginx#交互式更改查看历史版......
  • K8S发布应用步骤详解
    前言首先以SpringBoot应用为例介绍一下k8s的发布步骤。1.从代码仓库下载代码,比如GitLab;2.接着是进行打包,比如使用Maven;3.编写Dockerfile文件,把步骤2产生的包制作成镜像......