Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to list/create Network Policy on Openshift #23

Open
CherryJia opened this issue Aug 26, 2021 · 6 comments
Open

Not able to list/create Network Policy on Openshift #23

CherryJia opened this issue Aug 26, 2021 · 6 comments

Comments

@CherryJia
Copy link

With the simple testing by flowing the example/list-gnp

	// List network policies.
	list, err := cs.ProjectcalicoV3().NetworkPolicies("test").List(context.Background(), v1.ListOptions{})
	if err != nil {
		panic(err)
	}
	for _, gnp := range list.Items {
		fmt.Printf("%#v\n", gnp)
	}

It returns:

panic: the server could not find the requested resource (get networkpolicies.projectcalico.org) [recovered]
	panic: the server could not find the requested resource (get networkpolicies.projectcalico.org)

Actually in my Openshift cluster it only has networkPolicy crd with API group crd.projectcalico.org/v1
But with calicoctl command line , it can successfully list and apply networkpolicy with API Group: projectcalico.org/v3

So please anyone can explain , what I am missing here, from my understanding the resources of crd.projectcalico.org/v1 are only internal data representations .

@CherryJia CherryJia changed the title Not able to list/create Network Policy on Openshift with crd networkpolicies.crd.projectcalico.orgr Not able to list/create Network Policy on Openshift Aug 26, 2021
fasaxc pushed a commit to fasaxc/api that referenced this issue Aug 27, 2021
Merge v3.20 API changes, and entire OSS history
@steve-fraser
Copy link

I am experiencing this as well. Has anyone found a fix/workaround?

@jlsong01
Copy link

jlsong01 commented Nov 1, 2021

the same here with upstream k8s v1.21

@pkit
Copy link

pkit commented Jan 25, 2022

Seems like apiserver is not available/installed: https://projectcalico.docs.tigera.io/maintenance/install-apiserver

@nayihz
Copy link

nayihz commented Jun 14, 2022

does anyone has a way to solve this problem?
I also had the same problem with k8s v1.23.3 and calico v3.21.4

@mpiexec
Copy link

mpiexec commented Apr 18, 2023

@czybjtu #60 (comment)

@promacanthus
Copy link

This may be help you. #60 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants