DevilKing's blog

冷灯看剑,剑上几分功名?炉香无需计苍生,纵一穿烟逝,万丈云埋,孤阳还照古陵

0%

Ko fast k8s deployment

原文链接

skaffold tools to wrap process

skaffold process

ko takes a different approach that leans into Go idioms to eliminate configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
# This example is based on:
# https://github.com/google/go-containerregistry/blob/master/cmd/ko/test/test.yaml
apiVersion: v1
kind: Pod
metadata:
name: kodata
spec:
containers:
- name: test
# ko builds and publishes this Go binary, and replaces this
# with an image name.
image: github.com/google/go-containerregistry/cmd/ko/test
restartPolicy: Never

由ko来进行后面的部分

ko process

You only write Kubernetes yamls and code. No Dockerfiles, no Makefiles. You run one command and your latest code is running

1
$ko apply -f cmd/ko/test/test.yaml