Sign inSign up

projectnebula/kubectl

By projectnebula

•Updated over 6 years ago

A step that allows general `kubectl` use.

Image
0

50K+

projectnebula/kubectl repository overview

⁠Kubectl

This Kubectl step container allows general kubectl use and can take kubectl commands.

⁠Specifications

SettingChild settingData typeDescriptionDefaultRequired
clustermappingA map of configuration and credentials for accessing a Kubernetes cluster.NoneTrue
namestringA name for the Kubernetes cluster. Used for referencing it via kubectl contexts.NoneTrue
urlstringThe URL to the Kubernetes cluster master. You can pass the URL to Nebula as a secret. See the example below.NoneTrue
cadatastringA file containing the Kubernetes master CA contents. Pass the file contents to Nebula as a secret. See the example below.NoneTrue
tokenstringA token for the Kubernetes master. You can pass the token to Nebula as a secret. See the example below.NoneTrue
commandstringThe command to pass to kubectl. For example, "apply".NoneTrue
argsstringA string of arguments for commands other than "apply".NoneFalse
filestringA resource file to use when command is "apply".NoneWhen command is "apply"
namespacestringThe namespace to run the command under.defaultFalse
gitmappingA map of git configuration. If you're using HTTPS, only name and repository are required.NoneFalse
ssh_keystringThe SSH key to use when cloning the git repository. You can pass the key to Nebula as a secret. See the example below.NoneTrue
known_hostsstringSSH known hosts file. Use a Nebula secret to pass the contents of the file into the workflow as a base64-encoded string. See the example below.NoneTrue
namestringA directory name for the git clone.NoneTrue
branchstringThe Git branch to clone.masterFalse
repositorystringThe git repository URL.NoneTrue

Note: The value you set for a secret must be a string. If you have multiple key-value pairs to pass into the secret, or your secret is the contents of a file, you must encode the values using base64 encoding, and use the encoded string as the secret value.

⁠Examples

Here is an example of the step in a Nebula workflow:

steps:

...

- name: kubectl
  image: projectnebula/kubectl:latest
  spec:
    command: apply
    args: 
    - "-k"
    - "dir/"
    file: infra/resources.yaml
    namespace: default
    cluster:
      name: my-cluster
      url:
        $type: Secret
        name: url
      cadata:
        $type: Secret
        name: cadata
      token:
        $type: Secret
        name: token        
    git: 
      ssh_key:
        $type: Secret
        name: ssh_key
      known_hosts:
        $type: Secret
        name: known_hosts
      name: my-git-repo
      branch: dev
      repository: path/to/your/repo

Tag summary

Content type

Image

Digest

Size

36.4 MB

Last updated

over 6 years ago

docker pull projectnebula/kubectl