{"modulePath":"github.com/rancher/docker-cli","version":"v0.0.0-20190201110649-896ff57b300c","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package kubernetes\n\n## Functions\n\n```go\nfunc AddNamespaceFlag(flags *flag.FlagSet)\n```\nAddNamespaceFlag adds the namespace flag to the given flag set\n\n```go\nfunc GetStacks(kubeCli *KubeCli, opts options.List) ([]*formatter.Stack, error)\n```\nGetStacks lists the kubernetes stacks\n\n```go\nfunc RunDeploy(dockerCli *KubeCli, opts options.Deploy, cfg *composetypes.Config) error\n```\nRunDeploy is the kubernetes implementation of docker stack deploy\n\n```go\nfunc RunPS(dockerCli *KubeCli, options options.PS) error\n```\nRunPS is the kubernetes implementation of docker stack ps\n\n```go\nfunc RunRemove(dockerCli *KubeCli, opts options.Remove) error\n```\nRunRemove is the kubernetes implementation of docker stack remove\n\n```go\nfunc RunServices(dockerCli *KubeCli, opts options.Services) error\n```\nRunServices is the kubernetes implementation of docker stack services\n\n## Types\n\n```go\ntype Factory struct {\n\t// contains filtered or unexported fields\n}\n```\nFactory is the kubernetes client factory\n\n```go\nfunc NewFactory(namespace string, config *restclient.Config, clientSet *kubeclient.Clientset, experimental bool) (*Factory, error)\n```\nNewFactory creates a kubernetes client factory\n\n```go\nfunc (s *Factory) ConfigMaps() corev1.ConfigMapInterface\n```\nConfigMaps returns a client for kubernetes's config maps\n\n```go\nfunc (s *Factory) DaemonSets() typesappsv1beta2.DaemonSetInterface\n```\nDaemonSets returns a client for kubernetes daemon sets\n\n```go\nfunc (s *Factory) Nodes() corev1.NodeInterface\n```\nNodes returns a client for kubernetes's nodes\n\n```go\nfunc (s *Factory) Pods() corev1.PodInterface\n```\nPods returns a client for kubernetes's pods\n\n```go\nfunc (s *Factory) ReplicaSets() typesappsv1beta2.ReplicaSetInterface\n```\nReplicaSets returns a client for kubernetes replace sets\n\n```go\nfunc (s *Factory) ReplicationControllers() corev1.ReplicationControllerInterface\n```\nReplicationControllers returns a client for kubernetes replication controllers\n\n```go\nfunc (s *Factory) Secrets() corev1.SecretInterface\n```\nSecrets returns a client for kubernetes's secrets\n\n```go\nfunc (s *Factory) Services() corev1.ServiceInterface\n```\nServices returns a client for kubernetes's secrets\n\n```go\nfunc (s *Factory) Stacks(allNamespaces bool) (StackClient, error)\n```\nStacks returns a client for Docker's Stack on Kubernetes\n\n```go\ntype KubeCli struct {\n\tcommand.Cli\n\t// contains filtered or unexported fields\n}\n```\nKubeCli holds kubernetes specifics (client, namespace) with the command.Cli\n\n```go\nfunc WrapCli(dockerCli command.Cli, opts Options) (*KubeCli, error)\n```\nWrapCli wraps command.Cli with kubernetes specifics\n\n```go\ntype Options struct {\n\tNamespace    string\n\tConfig       string\n\tOrchestrator command.Orchestrator\n}\n```\nOptions contains resolved parameters to initialize kubernetes clients\n\n```go\nfunc NewOptions(flags *flag.FlagSet, orchestrator command.Orchestrator) Options\n```\nNewOptions returns an Options initialized with command line flags\n\n```go\ntype Stack struct {\n\tName        string\n\tNamespace   string\n\tComposeFile string\n\tSpec        *latest.StackSpec\n}\n```\nStack is the main type used by stack commands so they remain independent from kubernetes compose component version.\n\n```go\ntype StackClient interface {\n\tStackConverter\n\tCreateOrUpdate(s Stack, childResources []childResource) error\n\tDelete(name string) error\n\tGet(name string) (Stack, error)\n\tList(opts metav1.ListOptions) ([]Stack, error)\n\tIsColliding(servicesClient corev1.ServiceInterface, s Stack) error\n}\n```\nStackClient talks to a kubernetes compose component.\n\n```go\ntype StackConverter interface {\n\tFromCompose(stderr io.Writer, name string, cfg *composetypes.Config) (Stack, error)\n}\n```\nStackConverter converts a compose types.Config to a Stack\n\n```go\nfunc NewStackConverter(version string) (StackConverter, error)\n```\nNewStackConverter returns a converter from types.Config (compose) to the specified stack version or error out if the version is not supported or existent.\n\n","path":"github.com/rancher/docker-cli/cli/command/stack/kubernetes","name":"kubernetes","synopsis":"","isRedistributable":true}
