Add skaffold install and guide
This commit is contained in:
parent
d0a57861f2
commit
ae0c77e603
6
skaffold/README.md
Normal file
6
skaffold/README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Install Skaffold
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \
|
||||||
|
sudo install skaffold /usr/local/bin/
|
||||||
|
```
|
12
skaffold/starter/Dockerfile
Normal file
12
skaffold/starter/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM golang:1.15 as builder
|
||||||
|
COPY main.go .
|
||||||
|
# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
|
||||||
|
ARG SKAFFOLD_GO_GCFLAGS
|
||||||
|
RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /app main.go
|
||||||
|
|
||||||
|
FROM alpine:3
|
||||||
|
# Define GOTRACEBACK to mark this container as using the Go language runtime
|
||||||
|
# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
|
||||||
|
ENV GOTRACEBACK=single
|
||||||
|
CMD ["./app"]
|
||||||
|
COPY --from=builder /app .
|
8
skaffold/starter/k8s-pod.yaml
Normal file
8
skaffold/starter/k8s-pod.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: getting-started
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: getting-started
|
||||||
|
image: skaffold-example
|
14
skaffold/starter/main.go
Normal file
14
skaffold/starter/main.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
for {
|
||||||
|
fmt.Println("Hello world!")
|
||||||
|
|
||||||
|
time.Sleep(time.Second * 1)
|
||||||
|
}
|
||||||
|
}
|
9
skaffold/starter/skaffold.yaml
Normal file
9
skaffold/starter/skaffold.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: skaffold/v2beta24
|
||||||
|
kind: Config
|
||||||
|
build:
|
||||||
|
artifacts:
|
||||||
|
- image: skaffold-example
|
||||||
|
deploy:
|
||||||
|
kubectl:
|
||||||
|
manifests:
|
||||||
|
- k8s-*
|
Loading…
Reference in New Issue
Block a user