diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json
index ccbf8985a95..8fda570e4c2 100644
--- a/api/swagger-spec/v1.json
+++ b/api/swagger-spec/v1.json
@@ -8817,6 +8817,7 @@
}
],
"produces": [
+ "text/plain",
"application/json",
"application/yaml",
"application/vnd.kubernetes.protobuf"
diff --git a/docs/api-reference/v1/operations.html b/docs/api-reference/v1/operations.html
index 47167e7565c..85da91027cc 100755
--- a/docs/api-reference/v1/operations.html
+++ b/docs/api-reference/v1/operations.html
@@ -8705,6 +8705,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-
+
text/plain
+
+-
application/json
-
diff --git a/pkg/registry/pod/rest/log.go b/pkg/registry/pod/rest/log.go
index 24e3c422e6a..74c9805b9f3 100644
--- a/pkg/registry/pod/rest/log.go
+++ b/pkg/registry/pod/rest/log.go
@@ -45,6 +45,16 @@ func (r *LogREST) New() runtime.Object {
return &api.Pod{}
}
+// LogREST implements StorageMetadata
+func (r *LogREST) ProducesMIMETypes(verb string) []string {
+ // Since the default list does not include "plain/text", we need to
+ // explicitly override ProducesMIMETypes, so that it gets added to
+ // the "produces" section for pods/{name}/log
+ return []string{
+ "text/plain",
+ }
+}
+
// Get retrieves a runtime.Object that will stream the contents of the pod log
func (r *LogREST) Get(ctx api.Context, name string, opts runtime.Object) (runtime.Object, error) {
logOpts, ok := opts.(*api.PodLogOptions)