Skip to content

Instantly share code, notes, and snippets.

@znorris

znorris/code.ex Secret

Last active August 26, 2018 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save znorris/1ac1937d380de82f43099524ba7113b3 to your computer and use it in GitHub Desktop.
Save znorris/1ac1937d380de82f43099524ba7113b3 to your computer and use it in GitHub Desktop.
Kazan GKE Error
def k8s do
server = Kazan.Server.from_kubeconfig("/home/<REMOVED_FOR_PRIVACY>/.kube/config")
IO.inspect(server)
{:ok, server} = Kazan.Server.resolve_auth(server, allow_command_execution: true)
IO.inspect(server)
Kazan.Apis.Core.V1.list_pod_for_all_namespaces!()
|> Kazan.run!(server: server)
end
** (RuntimeError) Provider authentication needs resolved before use. Please see Kazan.Server.resolve_auth/2 documentation for more details
(kazan) lib/kazan/client/imp.ex:44: Kazan.Client.Imp.run/2
(kazan) lib/kazan/client/imp.ex:109: Kazan.Client.Imp.run!/2
%Kazan.Server{
auth: %Kazan.Server.ProviderAuth{
config: %{
cmd_args: ["config", "config-helper", "--format=json"],
cmd_path: "/home/<REMOVED_FOR_PRIVACY>/google-cloud-sdk/bin/gcloud",
expiry_key_path: ["credential", "token_expiry"],
token_key_path: ["credential", "access_token"]
},
expiry: #DateTime<2018-08-26 01:56:12Z>,
token: "ya29.<REMOVED_FOR_PRIVACY>"
},
ca_cert: <<48, ...>>,
insecure_skip_tls_verify: nil,
url: "https://<REMOVED_FOR_PRIVACY>"
}
%Kazan.Server{
auth: %Kazan.Server.ProviderAuth{
config: %{
cmd_args: ["config", "config-helper", "--format=json"],
cmd_path: "/home/<REMOVED_FOR_PRIVACY>/google-cloud-sdk/bin/gcloud",
expiry_key_path: ["credential", "token_expiry"],
token_key_path: ["credential", "access_token"]
},
expiry: nil,
token: nil
},
ca_cert: <<48, ...>>,
insecure_skip_tls_verify: nil,
url: "https://<REMOVED_FOR_PRIVACY>"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment