"Skaffold init"의 두 판 사이의 차이

(새 문서: ==개요== ;skaffold init <syntaxhighlight lang='console'> testuser@loclahost:/workspaces/venti$ skaffold init ? Which builders would you like to create kubernetes resources for? [U...)
 
74번째 줄: 74번째 줄:
or [skaffold run] to build and deploy
or [skaffold run] to build and deploy
or [skaffold dev] to enter development mode, with auto-redeploy
or [skaffold dev] to enter development mode, with auto-redeploy
testuser@loclahost:/workspaces/venti$ skaffold init --generate-manifests
</syntaxhighlight>
? 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]
<syntaxhighlight lang='console'>
> [ ] Buildpacks (go.mod)
$ ls *.yaml
  [ ]  Buildpacks (web/package.json)
deployment.yaml skaffold.yaml
  [x]  Docker (Dockerfile)
</syntaxhighlight>
? Select port to forward for dockerfile-image (leave blank for none): 8080
<syntaxhighlight lang='console'>
$ cat skaffold.yaml
apiVersion: skaffold/v3
apiVersion: skaffold/v3
kind: Config
kind: Config
96번째 줄: 97번째 줄:
   resourceName: dockerfile-image
   resourceName: dockerfile-image
   port: 8080
   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
</syntaxhighlight>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[skaffold]]
* [[skaffold]]
* [[skaffold build]]
* [[skaffold run]]
* [[skaffold dev]]


[[분류: skaffold]]
[[분류: skaffold]]
[[분류: init]]
[[분류: init]]

2022년 10월 25일 (화) 14:24 판

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
$ ls *.yaml
deployment.yaml  skaffold.yaml
$ cat skaffold.yaml 
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

2 같이 보기

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