Difference between revisions of "Tfk8s"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Line 6: Line 6:
  
 
  [[kubectl get secrets]] sample -o yaml | tfk8s --strip -o sample.tf
 
  [[kubectl get secrets]] sample -o yaml | tfk8s --strip -o sample.tf
 +
kubectl get deployment your-deployment -o yaml |  tfk8s --strip -o your-deployment-in-terraform.tf
  
 
  [[Error: Namespace required]]
 
  [[Error: Namespace required]]

Revision as of 10:57, 31 March 2023

brew install tfk8s


kubectl get secrets sample -o yaml | tfk8s --strip -o sample.tf
kubectl get deployment your-deployment -o yaml |  tfk8s --strip -o your-deployment-in-terraform.tf
Error: Namespace required
kind: Deployment

Related

resource "kubernetes_manifest" "test-configmap" {
 manifest = {
   "apiVersion" = "v1"
   "kind"       = "ConfigMap"
   "metadata" = {
     "name"      = "test-config"
     "namespace" = "default"
   }
   "data" = {
     "foo" = "bar"
   }
 }
}

See also

Advertising: