Kubectl  beta 

Deploying with kubectl

kubectl is Kubernetes command-line tool for deploying and managing applications on Kubernetes clusters.

Skaffold can work with kubectl to deploy artifacts on any Kubernetes cluster, including Google Kubernetes Engine clusters and local Minikube clusters.

Configuration

To use kubectl, add deploy type kubectl to the deploy section of skaffold.yaml.

The kubectl type offers the following options:

Option Description Default
flags additional flags passed to kubectl.
remoteManifests Kubernetes manifests in remote clusters. []
defaultNamespace default namespace passed to kubectl on deployment if no other override is given.
hooks describes a set of lifecycle hooks that are executed before and after every deploy.

flags section offers the following options:

Option Description Default
global additional flags passed on every command. []
apply additional flags passed on creations (kubectl apply). []
delete additional flags passed on deletions (kubectl delete). []
disableValidation passes the --validate=false flag to supported kubectl commands when enabled. false

Example

The following deploy section instructs Skaffold to deploy artifacts using kubectl:

deploy:
  kubectl: {}