K8s部署发布Golang应用程序的实现方法
alertgo程序可以参考,主要用于alertmanager实现钉钉报警
创建dockerfile
打包并且推送
创建namespace
创建deployment
创建service
创建ingress
创建hpa
结果查看
[root@k8s-master-01 alertgo]# kubectl get pods,svc,ingress,hpa -n k8s-go
name ready status restarts age
pod/alertgo-5bc79ccd65-8thmw 1/1 running 0 37m
pod/alertgo-5bc79ccd65-dm8ll 1/1 running 0 38m
pod/alertgo-5bc79ccd65-m9cd4 0/1 containercreating 0 0sname type cluster-ip external-ip port(s) age
service/alertgo clusterip 10.1.140.126 <none> 80/tcp 65mname hosts address ports age
ingress.extensions/alertgo alertgo.sentsss.com 80 34mname reference targets minpods maxpods replicas age
horizontalpodautoscaler.autoscaling/alertgo deployment/alertgo 79%/70%, 10%/70% 2 6 2 15s
到此这篇关于k8s部署发布golang应用程序的实现方法的文章就介绍到这了,更多相关k8s部署发布golang内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!