kuma 学习一 minikube 安装

官方文档提供了比较全的环境安装说明

我使用的系统是mac,同时使用minikube 运行

安装kumactl

下载地址:

https://kong.bintray.com/kuma/kuma-0.1.1-darwin.tar.gz

安装包内容

 

 

配置环境变量(可选)

export PATH=$PATH:$PWD/kuma-0.1.1-darwin/bin 

安装控制面板

kumactl install control-plane | kubectl apply -f -

查看安装的组件

kubectl get pod -n kuma-system 
NAME READY STATUS RESTARTS AGE
kuma-control-plane-668d88f9cf-f885r 1/1 Running 0 119s
kuma-injector-6d95865-6bnxs 1/1 Running 0 119s

部署demo服务

kubectl apply -f https://raw.githubusercontent.com/Kong/kuma/master/examples/kubernetes/sample-service.yaml

应用策略

echo "apiVersion: kuma.io/v1alpha1
kind: Mesh
metadata:
  namespace: kuma-system
  name: default
spec:
  mtls:
    enabled: true
    ca:
      builtin: {}" | kubectl apply -f -

配置远程控制服务

因为使用的是集群ip,不是很方便,所以暴露了一个nodeport 的服务

  • service json 定义文件
{
  "kind": "Service",
  "apiVersion": "v1",
  "metadata": {
    "name": "kuma-control-plane2"
  },
  "spec": {
    "ports": [
      {
        "name": "grpc-sds",
        "protocol": "TCP",
        "port": 5677,
        "targetPort": 5677
      },
      {
        "name": "grpc-xds",
        "protocol": "TCP",
        "port": 5678,
        "targetPort": 5678
      },
      {
        "name": "http-xds",
        "protocol": "TCP",
        "port": 5679,
        "targetPort": 5679
      },
      {
        "name": "http-api-server",
        "protocol": "TCP",
        "port": 5681,
        "targetPort": 5681
      },
      {
        "name": "http-bootstrap-server",
        "protocol": "TCP",
        "port": 5682,
        "targetPort": 5682
      }
    ],
    "selector": {
      "app": "kuma-control-plane"
    },
    "type": "NodePort",
    "sessionAffinity": "None"
  }
}
  • 添加控制面板管理
    注意address 为minikube 的ip 以及服务5681 暴露的nodeport 端口
 
kumactl config control-planes add --name=dalong --address=http://192.168.99.103:30811
  • 查看配置

 

 

  • 查看暴露的mesh 服务

 

 

kuma 安装部署的k8s服务

 

 

说明

以上是一个简单的运行,对于服务之间的通信,详细的配置,后续会在学习

参考资料

https://kuma.io/docs/0.1.1/installation/kubernetes/

posted on   荣锋亮  阅读(742)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2018-09-11 graphql 数据导入工具
2018-09-11 grandstack graphql 开发模型
2018-09-11 几本不错的graphql 电子书

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示