博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ambassador 学习一基本试用
阅读量:6657 次
发布时间:2019-06-25

本文共 1204 字,大约阅读时间需要 4 分钟。

安装使用docker for mac

Without RBAC

安装ambassador

  • 安装
kubectl apply -f https://getambassador.io/yaml/ambassador/ambassador-no-rbac.yaml
  • 创建service
---apiVersion: v1kind: Servicemetadata:  name: ambassadorspec:  type: NodePort  ports:   - port: 80  selector:    service: ambassadorkubectl apply -f ambassador-service.yaml
  • 状态

部署简单服务

  • service yaml (qotm.yaml)
---apiVersion: v1kind: Servicemetadata:  name: qotm  annotations:    getambassador.io/config: |      ---      apiVersion: ambassador/v0      kind:  Mapping      name:  qotm_mapping      prefix: /qotm/      service: qotmspec:  selector:    app: qotm  ports:  - port: 80    name: http-qotm    targetPort: http-api---apiVersion: extensions/v1beta1kind: Deploymentmetadata:  name: qotmspec:  replicas: 1  strategy:    type: RollingUpdate  template:    metadata:      labels:        app: qotm    spec:      containers:      - name: qotm        image: datawire/qotm:1.1        ports:        - name: http-api          containerPort: 5000        resources:          limits:            cpu: "0.1"            memory: 100Mikubectl apply -f qotm.yaml

测试

  • 查看服务状态
kubectl get svc -o wide ambassador

  • 访问

查询统计信息

  • service list
  • 访问统计信息查看
  • 访问界面
http://localhost:32598

  • 服务统计信息

参考资料

 
 
 
 

转载地址:http://nhtto.baihongyu.com/

你可能感兴趣的文章
命令类型即使用帮助
查看>>
struts2中不能使用static关键字作为URL路径
查看>>
SQL Sever 学习系列之三
查看>>
Cannot determine embedded database driver class for database type NONE
查看>>
解决Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
查看>>
iOS多线程-NSThread
查看>>
linux安装sphinx
查看>>
1.0、Android Studio管理你的项目
查看>>
Web.py Cookbook 简体中文版
查看>>
使用 Bullet,BulletManager 在 XNA 中创建子弹攻击目标(十五)
查看>>
python中的sort方法使用详解
查看>>
用户问卷算法加前台处理
查看>>
学习记录:CONCAT()
查看>>
mysql 递归查询 主要是对于层级关系的查询
查看>>
iOS 文件的操作
查看>>
函数指针的使用
查看>>
win7上使用delphi的方法
查看>>
idea 连接mysql报错:Access denied for user 'root'@'localhost'(using password:YES)。
查看>>
WPF控件保存为图片Bitmap
查看>>
[转]IE8兼容Jquery.validate.js兼容问题
查看>>