K8S-Demo集群实践17:部署私有云盘owncloud(10.6版本)

一、下载容器镜像

[root@harbor ~]# docker pull owncloud/server:10.6
[root@harbor ~]# docker tag owncloud/server:10.6 harbor.demo/owncloud/server:10.6
[root@harbor ~]# docker push harbor.demo/owncloud/server:10.6
  • harbor.demo 是部署在集群外的容器镜像仓库
  • 查找更多owncloud容器镜像 https://hub.docker.com/r/owncloud/server/

二、快速测试

1、启动容器

[root@harbor ~]# docker run -d --name aOwncloud -p8080:8080 harbor.demo/owncloud/server:10.6

2、查看日志

[root@harbor ~]# docker logs --follow aOwncloud
Creating volume folders...
Creating hook folders...
Removing custom folder...
Linking custom folder...
Removing config folder...
Linking config folder...
Writing config file...
Fixing base perms...
Fixing data perms...
Fixing hook perms...
Installing server database...
creating sqlite db
ownCloud was successfully installed
ownCloud is already latest version
Writing objectstore config...
Writing php config...
Updating htaccess config...
.htaccess has been updated
Writing apache config...
Enabling cron background...
Set mode for background jobs to 'cron'
Touching cron configs...
Starting cron daemon...
Starting apache daemon...

3、浏览器访问

  • 地址:http://harbor.demo:8080
    owncloud登录界面
  • 登录owncloud,用户名 admin 密码 admin
    在这里插入图片描述

4、退出并删除容器

[root@harbor ~]# docker stop aOwncloud
[root@harbor ~]# docker rm aOwncloud

三、准备Yaml文件

1、命名空间 owncloud-ns.yaml

apiVersion: v1
kind: Namespace
metadata:
  name: owncloud

2、部署 owncloud-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: owncloud-server
  namespace: owncloud
spec:
  replicas: 1
  selector:
    matchLabels:
      app:
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值