{"id":19595350,"url":"https://github.com/meta-magic/network-policy","last_synced_at":"2026-02-24T06:34:39.122Z","repository":{"id":100692409,"uuid":"203309277","full_name":"meta-magic/network-policy","owner":"meta-magic","description":null,"archived":false,"fork":false,"pushed_at":"2019-08-22T11:45:08.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T14:25:31.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meta-magic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-20T05:58:07.000Z","updated_at":"2019-08-22T11:45:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"b67fee60-75f3-4905-8c59-3362ae782549","html_url":"https://github.com/meta-magic/network-policy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meta-magic/network-policy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-magic%2Fnetwork-policy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-magic%2Fnetwork-policy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-magic%2Fnetwork-policy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-magic%2Fnetwork-policy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meta-magic","download_url":"https://codeload.github.com/meta-magic/network-policy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meta-magic%2Fnetwork-policy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280923470,"owners_count":26414234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T08:46:36.977Z","updated_at":"2025-10-25T07:53:10.419Z","avatar_url":"https://github.com/meta-magic.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"For testing purpose we can create a new namespace for networkpolicy...\n\nkubectl create ns policy-demo -------------------------------------\u003e create a namespace\n\nblock-np.yml:\n     It will block the service communication  from the pod.\n     for that: \n     1) create a pod inside a policy-demo namespace.\n     \n      kubectl create -f https://raw.githubusercontent.com/meta-magic/kubernetes_workshop/master/yaml/network-policy/pod-np.yml\n     \n     2) Create the Service.\n     kubectl expose --namespace=policy-demo pod nginx --port=80\n\n     3)Ensure the pod service is accessible.\n      kubectl run --namespace=policy-demo access --rm -ti --image busybox /bin/sh --------------\u003e create another and login into pod to ns\n         \n       command to check:\n          wget -q nginx -O -               #---------------\u003e wget the nginx inside the busybox to check here service acccesibilty.\n                                           #------------------\u003e You should see a response from nginx\n          \n      4) apply the policy block-np.yml.\n    \n                 kubectl apply -f block-np.yml\n                 \n                 \n      5) verify:\n      \n        kubectl run --namespace=policy-demo access --rm -ti --image busybox /bin/sh\n        \n               command to check:\n          wget -q nginx -O -               #---------------\u003e wget the nginx inside the busybox to check here service acccesibilty.\n\n                                           # wget: download timed out\n                                           \n     \n\n        \n\n      \n  \n      \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeta-magic%2Fnetwork-policy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeta-magic%2Fnetwork-policy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeta-magic%2Fnetwork-policy/lists"}