logo
10
3
Login
docs: 更新文档地址

Go + Gin + Kubernetes

badge badge badge

In this example, we use Cloud Native Build (CNB) to package a Go+Gin project into a Docker image and update the image version of specified pods in Tencent TKE using kubectl.

Prerequisites

  1. Use Cloud Native Build (CNB) to build your project
  2. Write a Dockerfile
  3. Understand Docker Artifact Registry
  4. Understand Environment Variables and their usage
  5. Use kubectl plugin to operate TKE cluster
  6. Configure .ide/Dockerfile for Cloud Native Development

Configuration Secrets

# go-gin-kubernetes-kubeconfig.yml KUBECF: | apiVersion: v1 xxxxxx

Quick Start

Install Dependencies

# Run in terminal go get -u github.com/go-delve/delve/cmd/dlv go install -v github.com/go-delve/delve/cmd/dlv@latest

Run Service

  1. Command line execution
go run main.go
  1. Debug Mode
  • Click the "Run and Debug" icon in the activity bar on the left side of VS Code, select "Launch file" from the run and debug drop-down list, then click the green run button (or press F5 directly). View configuration

About

构建 go 项目 docker 镜像,使用 kubectl 操作腾讯 TKE 更新指定 pod 的镜像

example
10 forks3 stars3 branches0 Tag
6.75 MiB
READMELicense