cdk8s-aws-alb-ingress-controller-1.0.0
توضیحات
cdk8s-aws-alb-ingress-controller is an CDK8S construct library that provides AWS Alb Ingress Controller Deplyment Configure.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cdk8s-aws-alb-ingress-controller-1.0.0 |
| نام | cdk8s-aws-alb-ingress-controller |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Neil Kuan<guan840912@gmail.com> |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/guan840912/cdk8s-aws-alb-ingress-controller.git |
| آدرس اینترنتی | https://pypi.org/project/cdk8s-aws-alb-ingress-controller/ |
| مجوز | Apache-2.0 |
[](https://badge.fury.io/js/cdk8s-aws-alb-ingress-controller)
[](https://badge.fury.io/py/cdk8s-aws-alb-ingress-controller)




# cdk8s-aws-alb-ingress-controller
> [aws alb ingress controller](https://github.com/kubernetes-sigs/aws-alb-ingress-controller) constructs for cdk8s
Basic implementation of a [aws alb ingress controller](https://github.com/kubernetes-sigs/aws-alb-ingress-controller) construct for cdk8s. Contributions are welcome!
## Usage
### AWS Load Balance Controller V1
```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk8s import App, Chart
from constructs import Construct
from cdk8s_aws_alb_ingress_controller import AlbIngressController
class MyChart(Chart):
def __init__(self, scope, name):
super().__init__(scope, name)
AlbIngressController(self, "albingresscntroller",
cluster_name="EKScluster"
)
app = App()
MyChart(app, "testcdk8s")
app.synth()
```
### AWS Load Balance Controller V2
#### only support install in default namespace now!!!
```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk8s import App, Chart
from cdk8s_aws_alb_ingress_controller import AwsLoadBalancerController
import constructs as constructs
class MyChart(Chart):
def __init__(self, scope, name, *, clusterName):
super().__init__(scope, name)
alb = AwsLoadBalancerController(self, "alb",
cluster_name=cluster_name,
create_service_account=False
)
self.deployment_name = alb.deployment_name
self.deployment_name_space = alb.namespace
app = App()
MyChart(app, "testcdk8s")
app.synth()
```
# Featrue For Add IAM Policy.
* For IRSA add IAM Policy version 1.
```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
# CDK APP like eks_cluster.ts
from cdk8s_aws_alb_ingress_controller import AwsLoadBalancePolicy, VersionsLists
import aws_cdk.aws_eks as eks
cluster = eks.Cluster(self, "MyK8SCluster",
default_capacity=0,
masters_role=cluster_admin,
version=eks.KubernetesVersion.V1_18
)
alb_service_account = cluster.add_service_account("alb-ingress-controller",
name="alb-ingress-controller",
namespace="kube-system"
)
# will help you add policy to IAM Role .
AwsLoadBalancePolicy.add_policy(VersionsLists.AWS_LOAD_BALANCER_CONTROLLER_POLICY_V1, alb_service_account)
```
* For IRSA add IAM Policy version 2.
```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
# CDK APP like eks_cluster.ts
from cdk8s_aws_alb_ingress_controller import AwsLoadBalancePolicy, VersionsLists
import aws_cdk.aws_eks as eks
cluster = eks.Cluster(self, "MyK8SCluster",
default_capacity=0,
masters_role=cluster_admin,
version=eks.KubernetesVersion.V1_18
)
sa = eks.ServiceAccount(self, "albserviceaccount",
cluster=cluster,
name="aws-load-balancer-controller"
)
AwsLoadBalancePolicy.add_policy(VersionsLists.AWS_LOAD_BALANCER_CONTROLLER_POLICY_V2, sa)
```
Also can see [example repo](https://github.com/guan840912/cdk8s-cdk-example)
## License
Distributed under the [Apache 2.0](./LICENSE) license.
نیازمندی
| مقدار | نام |
|---|---|
| <2.0.0,>=1.74.0 | aws-cdk.aws-iam |
| <2.0.0,>=1.74.0 | aws-cdk.core |
| <0.34.0,>=0.33.0 | cdk8s-plus |
| <0.34.0,>=0.33.0 | cdk8s |
| <4.0.0,>=3.2.7 | constructs |
| <2.0.0,>=1.14.0 | jsii |
| >=0.0.3 | publication |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl cdk8s-aws-alb-ingress-controller-1.0.0:
pip install cdk8s-aws-alb-ingress-controller-1.0.0.whl
نصب پکیج tar.gz cdk8s-aws-alb-ingress-controller-1.0.0:
pip install cdk8s-aws-alb-ingress-controller-1.0.0.tar.gz