Skaffold init

Jmnote (토론 | 기여)님의 2022년 10월 25일 (화) 14:22 판 (새 문서: ==개요== ;skaffold init <syntaxhighlight lang='console'> testuser@loclahost:/workspaces/venti$ skaffold init ? Which builders would you like to create kubernetes resources for? [U...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

skaffold init
testuser@loclahost:/workspaces/venti$ skaffold init
? Which builders would you like to create kubernetes resources for?  [Use arrows to move, space to select, <right> to all, <left> to none, type to filter]
> [ ]  Buildpacks (go.mod)
  [ ]  Buildpacks (web/package.json)
  [x]  Docker (Dockerfile)
one or more valid Kubernetes manifests are required to run skaffold
testuser@loclahost:/workspaces/venti$ skaffold init --generate-manifests
? Which builders would you like to create kubernetes resources for?  [Use arrows to move, space to select, <right> to all, <left> to none, type to filter]
> [ ]  Buildpacks (go.mod)
  [ ]  Buildpacks (web/package.json)
  [x]  Docker (Dockerfile)
? Select port to forward for dockerfile-image (leave blank for none): 8080
apiVersion: skaffold/v3
kind: Config
metadata:
  name: venti
build:
  artifacts:
  - image: dockerfile-image
    docker:
      dockerfile: Dockerfile
manifests:
  rawYaml:
  - deployment.yaml
portForward:
- resourceType: service
  resourceName: dockerfile-image
  port: 8080

deployment.yaml - apiVersion: v1
kind: Service
metadata:
  name: dockerfile-image
  labels:
    app: dockerfile-image
spec:
  ports:
  - port: 8080
    protocol: TCP
  clusterIP: None
  selector:
    app: dockerfile-image
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dockerfile-image
  labels:
    app: dockerfile-image
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dockerfile-image
  template:
    metadata:
      labels:
        app: dockerfile-image
    spec:
      containers:
      - name: dockerfile-image
        image: dockerfile-image

? Do you want to write this configuration, along with the generated k8s manifests, to skaffold.yaml? (y/N) y
Generated manifest deployment.yaml was written
Configuration skaffold.yaml was written
You can now run [skaffold build] to build the artifacts
or [skaffold run] to build and deploy
or [skaffold dev] to enter development mode, with auto-redeploy
testuser@loclahost:/workspaces/venti$ skaffold init --generate-manifests
? Which builders would you like to create kubernetes resources for?  [Use arrows to move, space to select, <right> to all, <left> to none, type to filter]
> [ ]  Buildpacks (go.mod)
  [ ]  Buildpacks (web/package.json)
  [x]  Docker (Dockerfile)
? Select port to forward for dockerfile-image (leave blank for none): 8080
apiVersion: skaffold/v3
kind: Config
metadata:
  name: venti
build:
  artifacts:
  - image: dockerfile-image
    docker:
      dockerfile: Dockerfile
manifests:
  rawYaml:
  - deployment.yaml
portForward:
- resourceType: service
  resourceName: dockerfile-image
  port: 8080

deployment.yaml - apiVersion: v1
kind: Service
metadata:
  name: dockerfile-image
  labels:
    app: dockerfile-image
spec:
  ports:
  - port: 8080
    protocol: TCP
  clusterIP: None
  selector:
    app: dockerfile-image
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dockerfile-image
  labels:
    app: dockerfile-image
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dockerfile-image
  template:
    metadata:
      labels:
        app: dockerfile-image
    spec:
      containers:
      - name: dockerfile-image
        image: dockerfile-image

? Do you want to write this configuration, along with the generated k8s manifests, to skaffold.yaml? (y/N) y
Generated manifest deployment.yaml was written
Configuration skaffold.yaml was written
You can now run [skaffold build] to build the artifacts
or [skaffold run] to build and deploy
or [skaffold dev] to enter development mode, with auto-redeploy
$ ls *.yaml
deployment.yaml  skaffold.yaml


2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}