You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, kubecm add does not support this operation, so I changed the source code and it worked as expect.
An example is as follows:
$ kubecm add -f example.yaml --insecure-skip-tls-verify
$ kubecm add -h
Add KubeConfig to $HOME/.kube/config
Usage:
kubecm add [flags]
kubecm add [command]
Aliases:
add, a
Examples:
# Merge test.yaml with $HOME/.kube/config
kubecm add -f test.yaml
# Merge test.yaml with $HOME/.kube/config and add a prefix before context name
kubecm add -cf test.yaml --context-prefix test
# Merge test.yaml with $HOME/.kube/config and define the attributes used for composing the context name
kubecm add -f test.yaml --context-template user,cluster
# Merge test.yaml with $HOME/.kube/config, define the attributes used for composing the context name and add a prefix before context name
kubecm add -f test.yaml --context-template user,cluster --context-prefix demo
# Merge test.yaml with $HOME/.kube/config and override context name, it's useful if there is only one context in the kubeconfig file
kubecm add -f test.yaml --context-name test
# Merge test.yaml with $HOME/.kube/config and select the context to be added in interactive mode
kubecm add -f test.yaml --select-context
# Merge test.yaml with $HOME/.kube/config and specify the context to be added
kubecm add -f test.yaml --context context1,context2
# Add kubeconfig from stdin
cat /etc/kubernetes/admin.conf | kubecm add -f -
# Merge test.yaml with $HOME/.kube/config and skip TLS certificate verification
kubecm add -f test.yaml --insecure-skip-tls-verify
Available Commands:
docs Open document website
Flags:
--context strings specify the context to be added
--context-name string override context name when add kubeconfig context, when context-name is set, context-prefix and context-template parameters will be ignored
--context-prefix string add a prefix before context name
--context-template strings define the attributes used for composing the context name, available values: filename, user, cluster, context, namespace (default [context])
-c, --cover overwrite local kubeconfig files
-f, --file string path to merge kubeconfig files
-h, --help help for add
--insecure-skip-tls-verify if true, the server's certificate will not be checked for validity
--select-context select the context to be added in interactive mode
Global Flags:
--config string path of kubeconfig (default "$HOME/.kube/config")
--create Create a new kubeconfig file if not exists
-m, --mac-notify enable to display Mac notification banner
-s, --silence-table enable/disable output of context table on successful config update (default true)
-u, --ui-size int number of list items to show in menu at once (default 7)
Use "kubecm add [command] --help" for more information about a command.
If you want to add this feature to kubecm, I will sumit a pr.
The text was updated successfully, but these errors were encountered:
In my use case, I need to skip the ca, so I need to set
insecure-skip-tls-verify
, like:However, kubecm add does not support this operation, so I changed the source code and it worked as expect.
An example is as follows:
If you want to add this feature to kubecm, I will sumit a pr.
The text was updated successfully, but these errors were encountered: