GithubHelp home page GithubHelp logo

api's Introduction

Kubernetes (K8s)

CII Best Practices Go Report Card GitHub release (latest SemVer)


Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides basic mechanisms for the deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If your company wants to help shape the evolution of technologies that are container-packaged, dynamically scheduled, and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using K8s

See our documentation on kubernetes.io.

Take a free course on Scalable Microservices with Kubernetes.

To use Kubernetes code as a library in other applications, see the list of published components. Use of the k8s.io/kubernetes module or k8s.io/kubernetes/... packages as libraries is not supported.

To start developing K8s

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make
You have a working Docker environment.
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make quick-release

For the full story, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Community Meetings

The Calendar has the list of all the meetings in the Kubernetes community in a single location.

Adopters

The User Case Studies website has real-world use cases of organizations across industries that are deploying/migrating to Kubernetes.

Governance

Kubernetes project is governed by a framework of principles, values, policies and processes to help our community and constituents towards our shared goals.

The Kubernetes Community is the launching point for learning about how we organize ourselves.

The Kubernetes Steering community repo is used by the Kubernetes Steering Committee, which oversees governance of the Kubernetes project.

Roadmap

The Kubernetes Enhancements repo provides information about Kubernetes releases, as well as feature tracking and backlogs.

api's People

Contributors

0xmichalis avatar bgrant0607 avatar brendandburns avatar dchen1107 avatar deads2k avatar derekwaynecarr avatar dims avatar erictune avatar gmarek avatar janetkuo avatar jsafrane avatar justinsb avatar k8s-publish-robot avatar k8s-publishing-bot avatar lavalamp avatar liggitt avatar markturansky avatar mikedanese avatar nikhiljindal avatar piosz avatar pmorie avatar pohly avatar smarterclayton avatar soltysh avatar sttts avatar tallclair avatar thockin avatar tkashem avatar vishh avatar wojtek-t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api's Issues

Create a SECURITY_CONTACTS file.

As per the email sent to kubernetes-dev[1], please create a SECURITY_CONTACTS
file.

The template for the file can be found in the kubernetes-template repository[2].
A description for the file is in the steering-committee docs[3], you might need
to search that page for "Security Contacts".

Please feel free to ping me on the PR when you make it, otherwise I will see when
you close this issue. :)

Thanks so much, let me know if you have any questions.

(This issue was generated from a tool, apologies for any weirdness.)

[1] https://groups.google.com/forum/#!topic/kubernetes-dev/codeiIoQ6QE
[2] https://github.com/kubernetes/kubernetes-template-project/blob/master/SECURITY_CONTACTS
[3] https://github.com/kubernetes/community/blob/master/committee-steering/governance/sig-governance-template-short.md

ScaleIOPersistentVolumeSource not available in release-1.8.2 tag & release-1.8 branch.

k8s.io/kubernetes/pkg/api/v1

../../../.go/src/k8s.io/kubernetes/pkg/api/v1/defaults.go:380: undefined: "k8s.io/api/core/v1".ScaleIOPersistentVolumeSource
../../../.go/src/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go:3172: undefined: "k8s.io/api/core/v1".ScaleIOPersistentVolumeSource
../../../.go/src/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go:4463: undefined: "k8s.io/api/core/v1".ScaleIOPersistentVolumeSource
../../../.go/src/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go:4478: undefined: "k8s.io/api/core/v1".ScaleIOPersistentVolumeSource
../../../.go/src/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go:4482: undefined: "k8s.io/api/core/v1".ScaleIOPersistentVolumeSource
../../../.go/src/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go:4497: undefined: "k8s.io/api/core/v1".ScaleIOPersistentVolumeSource
make[3]: *** [armada/armada] Error 2

go.mod specify tag but pulling failed

Hi

In my go.mod:
...
require (
github.com/golang/protobuf v1.3.1
k8s.io/api kubernetes-1.13.5
k8s.io/client-go v10.0.0
...}

However, when I build, I kept getting errors because it's pulling "k8s.io/api/admissionregistration/v1alpha1 latest". I tried adding k8s.io/api/admissionregistration/v1alpha1 kubernetes-1.13.5, but it complained about no go.mod in api/addmissionregistration. Could you tell me how to solve this issue? Is my configuration done incorrectly?

user@virt-8876$ go build test/client.go
go: finding k8s.io/api kubernetes-1.13.5
go: finding k8s.io/api/admissionregistration/v1alpha1 latest
go: finding k8s.io/api/admissionregistration latest
go: finding k8s.io/api latest
build command-line-arguments: cannot load k8s.io/api/admissionregistration/v1alpha1: cannot find module providing package k8s.io/api/admissionregistration/v1alpha1

The Golang version of version v0.30.0 specifced in the mod file is a precise verson number

Hi Team,

Let's see https://github.com/kubernetes/api/blob/v0.30.0/go.mod

// This is a generated file. Do not edit directly.

module k8s.io/api

go 1.22.0

Please take into account that the Go version specified in the v0.30.0 mod file is 1.22.0. Consequently, it necessitates that any Golang modules relying on v0.30.0 must also adhere to the precise Golang version number

is it possible to use the Golang version without the patch number in later versions? For example https://github.com/kubernetes/api/blob/v0.29.4/go.mod

ResourceQuota: Hard and Used are not ResourceList

When I was using ResourceQuotaStatus.Hard, I found a mistake. Hard and Used are ResourceList, but actually they are not.

When you define Hard as a ResourceList, I can call methods of ResourceList on it, So I can call ResourceQuota.Status.Hard.CPU() for example, but it returns nothing because Hard contains Limits and Requests like ResourceRequirements type.

I know you define some constants for getting requests and limits from the Hard's ResourceList map(like ResourceRequestsCPU).

Can you explain why you didn't use ResourceRequirements as the type of the Hard or Used?
Can I fix it by changing types to ResourceRequirements?

Cannot uncordon using NodeSpec.Unschedulable

kubectl uncordon my_node

translates to

PATCH /api/v1/nodes/my_node
{"spec":{"unschedulable":null}}

but current definition of core v1 NodeSpec.Unschedulable does not allow the field to be null. (bool type and json omitempty option).

And I don't know why but "unschedulable": false is ignored as well.

busted go get's with go modules

When installing various pieces of k8s tools, I keep running into this error from go get (and its module support):

$  go get -d github.com/rancher/rancher
[.. elided ..]
go: k8s.io/[email protected] requires
	k8s.io/[email protected]: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

(This feels like maybe a tag got made that wasn't supposed to?)

Invalid receiver type *List (List is an interface type)

I'm continuously running into this error:

# k8s.io/api/core/v1
../../../k8s.io/api/core/v1/generated.pb.go:513:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/generated.pb.go:514:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/generated.pb.go:515:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/generated.pb.go:4177:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/generated.pb.go:4187:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/generated.pb.go:11017:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/generated.pb.go:13991:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/generated.pb.go:26053:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/zz_generated.deepcopy.go:2678:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/zz_generated.deepcopy.go:2693:6: invalid receiver type *List (List is an interface type)
../../../k8s.io/api/core/v1/zz_generated.deepcopy.go:2693:6: too many errors

metav1.List is an interface, you can't have a *List. Why is this even a thing? What versions can I revert to to fix this?

pod ContainerPort name is unique in pod

// +optional

// If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
// named port in a pod must have a unique name. Name for the port that can be
// referred to by services.
// +optional

“Each named port in a pod must have a unique name ” is fix to "Each named port in a container must have a unique name"

What's the "system trust roots on the apiserver"

I get this in the definition of WebhookClientConfig, see here:

// If unspecified, system trust roots on the apiserver are used.

I'm confuse with the description, what's the mean of system trust CA?
the one shipped with distros that include verisign and the other root CAs?
What about the CA of internal signer implemented in kubernetes? I mean CSR API of Kubernetes, is that CA a system trust roots on the apiserver?

The resourceVersion for the provided list is too old

Hi

I'm working on a simple application that retrieves a limited list of pods within a particular namespace.
However, I occasionally encounter the error message "The resourceVersion for the provided list is too old."
It's surprising because the ListPods API doesn't use the "resourceVersion" parameter.

To provide some context, the cluster I'm working with has around 10,000 pods.

Here's an example snippet of my code:

listOptions := metav1.ListOptions{Limit: 1}
pods, err := k.client.CoreV1().Pods(svc.Namespace).List(context.Background(), listOptions)

Could this issue be related to a network problem?
I'm wondering if the network latency or potential synchronization issues within the cluster might be causing this error. Any insights or suggestions would be greatly appreciated.

'undefined: "k8s.io/api/core/v1".RBDPersistentVolumeSource

hi:
when I build kubectl on my PC, I found this error:'undefined: "k8s.io/api/core/v1".RBDPersistentVolumeSource' , and i cant find "RBDPersistentVolumeSource" defined in the package "k8s.io/api/core/v1" , how to fix this ? thanks !

Reuse the IngressLoadBalancerStatus structure

Why don't v1beta1.IngressLoadBalancerStatus and networking v1.IngressLoadBalancerStatus and corev1.LoadBalancerStatus and v1.LoadBalancerStatus reuse the same structure, so that the upper layer call will be more convenient

Versions before 1.26 returned v1.LoadBalancerStatus, why was version 1.26 removed?
image

For example
image

Can not specify pod name

Hi, the repo is excellent! It works well except I can not specify the pod name. Can anyone help me? I will be very grateful!
I have tried specified ObjectMeta.Name as shown in the following image, but it does not work.
image

Attribute `s` of `resource.Quantity` is empty

API Version: k8s.io/api v0.29.1
Golang Version: 1.21

I wrote a function to build appv1.Deployment manually, just like below:

func buildDeployment(cpu, mem string) appsv1.Deployment {
	replicas := new(int32)
	*replicas = 1
	deployment := appsv1.Deployment{
		ObjectMeta: metav1.ObjectMeta{
			Name: "my-deployment",
		},
		Spec: appsv1.DeploymentSpec{
			Replicas: replicas,
			Selector: &metav1.LabelSelector{
				MatchLabels: map[string]string{
					"app": "my-app",
				},
			},
			Template: corev1.PodTemplateSpec{
				ObjectMeta: metav1.ObjectMeta{
					Labels: map[string]string{
						"app": "my-app",
					},
				},
				Spec: corev1.PodSpec{
					Containers: []corev1.Container{
						{
							Name:  "my-container",
							Image: "my-image",
							Resources: corev1.ResourceRequirements{
								Limits: corev1.ResourceList{
									corev1.ResourceMemory: resource.MustParse(mem),
									corev1.ResourceCPU:    resource.MustParse(cpu),
								},
							},
						},
					},
				},
			},
		},
	}

	return deployment
}

I did a simple test after, then I found a weird stuff:

func TestBuildDeployment(t *testing.T) {
	deployment := buildDeployment("4", "8Gi")
	mem := deployment.Spec.Template.Spec.Containers[0].Resources.Limits["memory"]
	t.Logf("%+v\n", mem)

	deployment2 := buildDeployment("4", "12Gi")
	mem2 := deployment2.Spec.Template.Spec.Containers[0].Resources.Limits["memory"]
	t.Logf("%+v\n", mem2)
}

// output:
=== RUN   TestBuildDeployment
    e:\..skip..\k8sapp_test.go:12: {i:{value:8589934592 scale:0} d:{Dec:<nil>} s: Format:BinarySI}
    e:\..skip..\k8sapp_test.go:16: {i:{value:12884901888 scale:0} d:{Dec:<nil>} s:12Gi Format:BinarySI}
--- PASS: TestBuildDeployment (0.00s)

Notice the s of Quantity object, 8Gi mem is empty, but 12Gi showed up.
When I changed 8Gi to 16Gi, 32Gi, they were all empty string as well.

I have no idea why like this, please help me out, thank you!

AdmissionResponse.Warnings do not show warning

Hello!

I have a working validator on the Openschift and Kubernetis clusters. Then I wanted to add warnings.

As example:

  1. admissionReview.Response.Warnings = append(admissionReview.Response.Warnings, "Test element")
  2. return &v1beta1.AdmissionResponse{
    Allowed: true,
    Warnings: []string{"Test"},
    }

From the container side, the response goes away with warning, but no warning appears either in the terminal or in the interface.

Kubernetes Version: v1.19.0+9c69bdc

I did everything according to:

  1. https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/
  2. https://github.com/kubernetes/api/blob/master/admission/v1beta1/types.go

Can you help with this?

Provide non-development module versions

Hey folks! I noticed that my go.mod files always end up referencing the alpha version of the k8s.io/api, k8s.io/api-machinery and k8s.io/client-go modules, even when using go get in a new project: go get k8s.io/api: v0.28.0-alpha.0, for example.

This occurs because the modules provide only "in-development" versions. I.e. versions with a major-version of 0. https://go.dev/doc/modules/version-numbers#in-development

It's possible to reference one of the non-alpha versions but this works poorly with common upgrade flows: go get -u ./... which push the version back to the alpha one. In other words, go get will change the manually set, non-alpha version back to the latest alpha version, because it's the latest.

Can you provide a v1 major version of these modules or is the API still unstable that it warrants remaining "in-development"?

The 'XXX' package was not found

I encountered this problem when using the istio client-go 1.4,i found that my k8s/api version was updated along with it. the command to execute is:

$ go get istio.io/[email protected]
$ go build -o beyondmesh
build beyondcent.com/beyondmesh/src/api: cannot load k8s.io/api/admissionregistration/v1alpha1: module k8s.io/api@latest found (v0.17.3), but does not contain package k8s.io/api/admissionregistration/v1alpha1

I found that the v1alpha1 package had been removed in release-1.14
Is there any relevant change log?
One thing I don't understand is why the k8s/api is updated when I update the istio client-go? Is it because istio relies on k8s?

Pods unable to reach kubernetes API on EKS

I have a coreDNS deployment that is unable to reach the kubernetes api

E0408 16:39:27.779433       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:355: Failed to list *v1.Namespace: Get https://10.100.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0408 16:39:27.779861       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:348: Failed to list *v1.Service: Get https://10.100.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0408 16:39:27.779928       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:350: Failed to list *v1.Endpoints: Get https://10.100.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0408 16:39:58.781491       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:355: Failed to list *v1.Namespace: Get https://10.100.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0408 16:39:58.781715       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:348: Failed to list *v1.Service: Get https://10.100.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0408 16:39:58.782838       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:350: Failed to list *v1.Endpoints: Get https://10.100.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0408 16:40:29.782060       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:355: Failed to list *v1.Namespace: Get https://10.100.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0408 16:40:29.784090       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:348: Failed to list *v1.Service: Get https://10.100.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
E0408 16:40:29.784374       1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:350: Failed to list *v1.Endpoints: Get https://10.100.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.100.0.1:443: i/o timeout
2019/04/08 16:40:37 [INFO] SIGTERM: Shutting down servers then terminating

Im running EKS, it has one worker node so everything should be running on the same EC2 instance. I have been unable to access the kubernetes api logs due to some permission issues, any advice or suggestions would be appreciated.

Can't upgrade to k8s.io/api v0.28.0-alpha.4

Dependabot is trying to upgrade my project with the following dependencies

k8s.io/api v0.28.0-alpha.4
k8s.io/apimachinery v0.28.0-alpha.4
k8s.io/client-go v0.28.0-alpha.4

However when I try to compile I get the following error

#14 [build 8/8] RUN go build -o /app/im-manager -ldflags "-s -w" ./cmd/serve
#14 31.08 # sigs.k8s.io/kustomize/kyaml/openapi
#14 31.08 /go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/openapi/openapi.go:656:33: cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to swagger.FromGnostic
#14 ERROR: process "/bin/sh -c go build -o /app/im-manager -ldflags \"-s -w\" ./cmd/serve" did not complete successfully: exit code: 1

The project in question can be found here.

Please let me know if I should add more information or ask in a different place.

Ingress failed to list *v1beta1.Ingress: ingresses.extensions is forbidden

I have used extensions/v1beta1 library to create ingress in my operator. I'm using operator-sdk to develop the operator. Here is the ingress structure creation code I have used.

func (reconcileSiddhiProcess *ReconcileSiddhiProcess) loadBalancerForSiddhiProcess(m *siddhiv1alpha1.SiddhiProcess) *extensionsv1beta1.Ingress {
	ingress := &extensionsv1beta1.Ingress{
		TypeMeta: metav1.TypeMeta{
			APIVersion: "extensions/v1beta1",
			Kind:       "Ingress",
		},
		ObjectMeta: metav1.ObjectMeta{
			Name:      m.Name,
			Namespace: m.Namespace,
			Annotations: map[string]string{
				"kubernetes.io/ingress.class": "nginx",
				"nginx.ingress.kubernetes.io/rewrite-target": "/",
				"nginx.ingress.kubernetes.io/ssl-redirect": "false",
				"nginx.ingress.kubernetes.io/force-ssl-redirect": "false",
				"nginx.ingress.kubernetes.io/ssl-passthrough": "true",
				"nginx.ingress.kubernetes.io/affinity": "cookie",
				"nginx.ingress.kubernetes.io/session-cookie-name": "route",
				"nginx.ingress.kubernetes.io/session-cookie-hash": "sha1",
			},
		},
		Spec: extensionsv1beta1.IngressSpec{
			Rules: []extensionsv1beta1.IngressRule{
				{
					IngressRuleValue: extensionsv1beta1.IngressRuleValue{
						HTTP: &extensionsv1beta1.HTTPIngressRuleValue{
							Paths: []extensionsv1beta1.HTTPIngressPath{
								{
									Path:    "/",
									Backend: extensionsv1beta1.IngressBackend{ServiceName: m.Name, ServicePort: intstr.IntOrString{Type: Int, IntVal: 8006}},
								},
							},
						},
					},
				},
			},
		},
	}

When I build the operator image and deploy in my minikube cluster and the Service and Deployment created successfully. But Ingress did not create and gives an error like below.

E0401 15:22:25.956017  1 reflector.go:134] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:196: Failed to list *v1beta1.Ingress: ingresses.extensions is forbidden: User "system:serviceaccount:default:siddhi-operator" cannot list resource "ingresses" in API group "extensions" in the namespace "default"

I just change the namespace and do it. But it also gives the same error.

Preserving the history

I've been playing with git filter-branch commands to preserve the history of k8s.io/kubernetes/pkg/api and k8s.io/kubernetes/pkg/apis, the result is https://github.com/caesarxuchao/api.

It has ~4000 commits (~half of them are merge commits) that touched pkg/api and pkg/apis. If you run git log --follow core/v1/types.go from HEAD, it will show you all the commits that changed pkg/api/v1/types.go, and the commit where i moved pkg/api/v1/types.go to core/v1/types.go. I think in terms of "preserving commit history", it's good enough.

I also append Kubernetes-commit: xxx to the commit messages so people can find the original commit in k8s.io/kubernetes.

Please let me know if you have other concerns.

If no one objects, i'll push the commits to the master branch of k8s.io/api.

@lavalamp @justinsb @bgrant0607 @kubernetes/sig-api-machinery-misc

k8s.io/api/authentication/v1/zz_generated.deepcopy.go:61: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no fieldor method DeepCopyInto

the code of master can't build success! it's some error like :

../../project/src/k8s.io/api/authentication/v1/zz_generated.deepcopy.go:61: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no fieldor method DeepCopyInto)
# k8s.io/api/certificates/v1beta1
../../project/src/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go:65: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go:93: in.LastUpdateTime.DeepCopyInto undefined (type v1.Time has no field or method DeepCopyInto)
# k8s.io/api/authorization/v1beta1
../../project/src/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go:77: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go:138: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go:201: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
# k8s.io/api/admissionregistration/v1alpha1
../../project/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go:140: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go:240: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
# k8s.io/api/authentication/v1beta1
../../project/src/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go:61: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
# k8s.io/api/storage/v1
../../project/src/k8s.io/api/storage/v1/zz_generated.deepcopy.go:53: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
# k8s.io/api/rbac/v1alpha1
../../project/src/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go:89: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go:123: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field ormethod DeepCopyInto)
../../project/src/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go:265: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field ormethod DeepCopyInto)
../../project/src/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go:299: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field ormethod DeepCopyInto)
# k8s.io/api/scheduling/v1alpha1
../../project/src/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go:53: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
# k8s.io/client-go/tools/clientcmd/api
../../project/src/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go:111: val.DeepCopyObject undefined (type runtime.Object has no field or method DeepCopyObject)
../../project/src/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go:166: val.DeepCopyObject undefined (type runtime.Object has no field or method DeepCopyObject)
../../project/src/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go:230: val.DeepCopyObject undefined (type runtime.Object has no field or method DeepCopyObject)
../../project/src/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go:266: val.DeepCopyObject undefined (type runtime.Object has no field or method DeepCopyObject)
../../project/src/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go:293: val.DeepCopyObject undefined (type runtime.Object has no field or method DeepCopyObject)
# k8s.io/api/policy/v1beta1
../../project/src/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go:67: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field ormethod DeepCopyInto)
../../project/src/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go:74: (*in).DeepCopyInto undefined (type *v1.DeleteOptions has no field or method DeepCopyInto)
../../project/src/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go:103: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go:180: (*in).DeepCopyInto undefined (type *v1.LabelSelector has no field or method DeepCopyInto)
../../project/src/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go:212: invalid indirect of val.DeepCopy() (type v1.Time)
# k8s.io/api/authorization/v1
../../project/src/k8s.io/api/authorization/v1/zz_generated.deepcopy.go:77: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/authorization/v1/zz_generated.deepcopy.go:138: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no fieldor method DeepCopyInto)
../../project/src/k8s.io/api/authorization/v1/zz_generated.deepcopy.go:201: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no fieldor method DeepCopyInto)
# k8s.io/api/storage/v1beta1
../../project/src/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go:53: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
# k8s.io/api/rbac/v1beta1
../../project/src/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go:89: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go:123: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go:265: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go:299: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
# k8s.io/api/core/v1
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:897: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1013: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1079: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1440: in.StartedAt.DeepCopyInto undefined (type v1.Time has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1457: in.StartedAt.DeepCopyInto undefined (type v1.Time has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1458: in.FinishedAt.DeepCopyInto undefined (type v1.Time has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1788: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1967: in.ObjectMeta.DeepCopyInto undefined (type v1.ObjectMeta has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1970: in.FirstTimestamp.DeepCopyInto undefined (type v1.Time has no field or methodDeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1971: in.LastTimestamp.DeepCopyInto undefined (type v1.Time has no field or method DeepCopyInto)
../../project/src/k8s.io/api/core/v1/zz_generated.deepcopy.go:1971: too many errors

DeploymentStatus readyReplicas docstring needs clarification.

https://github.com/kubernetes/api/blob/master/apps/v1/types.go#L411

The docstring defines readyReplicas as "Total number of ready pods targeted by this deployment" which is defining "ready" in terms of being "ready". Please clarify the docstring on what "ready" means in this context since the docstring is used for the user-facing docs at https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/deployment-v1/.

Fixing this will also resolve kubernetes/website#28316

kubectl explain node / oc explain node delivers wrong information

What happened:

I executed oc explain node and received wrong information what a node is. It stated that a node is a worker node, which is wrong.

The information comes from: api/core/v1/types_swagger_doc_generated.go
"": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).",

What you expected to happen:

I expected it to write: a node is a worker node or a master node.

How to reproduce it (as minimally and precisely as possible):

oc explain node

Anything else we need to know?:

Open Shift Version from oc version:
grafik

Environment:

RHEL 8.6, platform:el8

Cannot print deployment

hi , I have some trouble about printing the audit log. In reality, this error blocks my goroutine

code form this

package main

import (
	"fmt"
	"k8s.io/api/apps/v1"
	apiv1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"net/http"
	_ "net/http/pprof"
	"time"
)

func main(){
	service()
	deployment()
	if err := http.ListenAndServe(":6060", nil);err != nil {
		fmt.Println(err)
	}
}

func deployment(){
	var a int32 = 1
	deploy := &v1.Deployment{
		ObjectMeta:metav1.ObjectMeta{
			Name:      "111",
			Namespace: "222",
			CreationTimestamp: metav1.Time{Time:time.Now()},
			//DeletionTimestamp:&metav1.Time{Time:time.Now()},
			Labels: map[string]string{
				"app":"nginx",
				"deploy":"helm",
			},
		},
		Spec:v1.DeploymentSpec{
			Replicas: &a,
			Selector: &metav1.LabelSelector{
				MatchLabels: map[string]string{
					"111":"222",
				},
			},
			Template: apiv1.PodTemplateSpec{},
		},
	}
	fmt.Println(fmt.Sprintln("%v",deploy))
}

func service(){
	deploy := &apiv1.Service{
		ObjectMeta:metav1.ObjectMeta{
			Name:      "111",
			Namespace: "222",
			CreationTimestamp: metav1.Time{Time:time.Now()},
			Labels: map[string]string{
				"app":"nginx",
				"deploy":"helm",
			},
		},
	}
	fmt.Println(fmt.Sprintln("%v",deploy))
}

and error :

image

version

require (
    k8s.io/api v0.22.2
    k8s.io/apimachinery v0.22.2
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.