k8s-helper-cli 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: k8s-helper-cli
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: A simplified Python wrapper for common Kubernetes operations
5
5
  Author-email: Harshit Chatterjee <harshitchatterjee50@gmail.com>
6
6
  License-Expression: MIT
@@ -14,6 +14,8 @@ Requires-Dist: kubernetes>=26.1.0
14
14
  Requires-Dist: typer>=0.9.0
15
15
  Requires-Dist: rich>=13.0.0
16
16
  Requires-Dist: pyyaml>=6.0
17
+ Requires-Dist: boto3>=1.26.0
18
+ Requires-Dist: botocore>=1.29.0
17
19
  Provides-Extra: dev
18
20
  Requires-Dist: pytest>=7.0.0; extra == "dev"
19
21
  Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
@@ -30,8 +32,13 @@ A simplified Python wrapper for common Kubernetes operations that makes it easy
30
32
  ## Features
31
33
 
32
34
  - ✅ **Pod Management**: Create, delete, and list pods
33
- - ✅ **Deployment Management**: Create, delete, scale, and list deployments
34
- - ✅ **Service Management**: Create, delete, and list services
35
+ - ✅ **Deployment Management**: Create, delete, scale, and list deployments with init containers
36
+ - ✅ **Service Management**: Create, delete, list services with URL retrieval
37
+ - ✅ **AWS EKS Integration**: Create and manage EKS clusters with automatic configuration
38
+ - ✅ **Secrets Management**: Create, list, and delete Kubernetes secrets
39
+ - ✅ **Persistent Volume Claims**: Create, list, and delete PVCs with multiple access modes
40
+ - ✅ **Service URL Discovery**: Get service URLs including AWS ELB DNS names
41
+ - ✅ **Advanced Deployments**: Support for init containers, volume mounts, and complex configurations
35
42
  - ✅ **Resource Monitoring**: Get logs, events, and resource descriptions
36
43
  - ✅ **Easy Configuration**: Simple configuration management
37
44
  - ✅ **Formatted Output**: Beautiful table, YAML, and JSON output formats
@@ -60,6 +67,13 @@ pip install -e .
60
67
 
61
68
  **Important**: k8s-helper requires an active Kubernetes cluster connection. Without a properly configured kubectl and accessible cluster, the commands will fail with configuration errors.
62
69
 
70
+ ### AWS EKS Features Prerequisites
71
+
72
+ For AWS EKS integration features:
73
+ - AWS CLI configured with appropriate credentials (`aws configure`)
74
+ - AWS IAM permissions for EKS, EC2, and IAM operations
75
+ - boto3 package (automatically installed with k8s-helper-cli)
76
+
63
77
  ### Setting up Kubernetes (Choose one):
64
78
 
65
79
  1. **Local Development**:
@@ -702,6 +716,112 @@ k8s-helper --install-completion zsh
702
716
  k8s-helper --show-completion bash
703
717
  ```
704
718
 
719
+ ### AWS EKS Integration
720
+
721
+ ```bash
722
+ # Create an EKS cluster
723
+ k8s-helper create-eks-cluster my-cluster --region us-west-2 --version 1.29
724
+
725
+ # Create EKS cluster with custom settings
726
+ k8s-helper create-eks-cluster my-cluster \
727
+ --region us-east-1 \
728
+ --instance-types t3.medium,t3.large \
729
+ --min-size 2 \
730
+ --max-size 10 \
731
+ --desired-size 3 \
732
+ --node-group my-nodes \
733
+ --wait
734
+
735
+ # Note: Requires AWS credentials configured (aws configure)
736
+ ```
737
+
738
+ ### Secrets Management
739
+
740
+ ```bash
741
+ # Create a secret
742
+ k8s-helper create-secret my-secret --data "username=admin,password=secret123"
743
+
744
+ # Create a TLS secret
745
+ k8s-helper create-secret tls-secret --data "tls.crt=cert_content,tls.key=key_content" --type kubernetes.io/tls
746
+
747
+ # List secrets
748
+ k8s-helper list-secrets --namespace my-namespace
749
+
750
+ # Delete a secret
751
+ k8s-helper delete-secret my-secret --namespace my-namespace
752
+ ```
753
+
754
+ ### Persistent Volume Claims (PVC)
755
+
756
+ ```bash
757
+ # Create a PVC
758
+ k8s-helper create-pvc my-storage 10Gi --access-modes ReadWriteOnce
759
+
760
+ # Create PVC with specific storage class
761
+ k8s-helper create-pvc my-storage 50Gi --storage-class fast-ssd --access-modes ReadWriteMany
762
+
763
+ # List PVCs
764
+ k8s-helper list-pvcs --namespace my-namespace
765
+
766
+ # Delete a PVC
767
+ k8s-helper delete-pvc my-storage --namespace my-namespace
768
+ ```
769
+
770
+ ### Service URL Retrieval
771
+
772
+ ```bash
773
+ # Get service URL (including AWS ELB URLs)
774
+ k8s-helper service-url my-service --namespace my-namespace
775
+
776
+ # Watch for URL changes (useful for LoadBalancer provisioning)
777
+ k8s-helper service-url my-service --watch --namespace my-namespace
778
+
779
+ # Shows:
780
+ # - ClusterIP access information
781
+ # - NodePort URLs
782
+ # - AWS ELB DNS names for LoadBalancer services
783
+ # - External IPs and hostnames
784
+ ```
785
+
786
+ ### Enhanced Application Deployment
787
+
788
+ ```bash
789
+ # Deploy with init container
790
+ k8s-helper apply my-app nginx:latest \
791
+ --init-container "init-db:postgres:13:pg_isready -h db" \
792
+ --init-env "PGHOST=db,PGPORT=5432"
793
+
794
+ # Deploy with PVC mount
795
+ k8s-helper apply my-app nginx:latest \
796
+ --pvc "my-storage:/data" \
797
+ --replicas 2
798
+
799
+ # Deploy with secret mount
800
+ k8s-helper apply my-app nginx:latest \
801
+ --secret "my-secret:/etc/secrets" \
802
+ --port 8080
803
+
804
+ # Deploy with LoadBalancer and show URL
805
+ k8s-helper apply my-app nginx:latest \
806
+ --service-type LoadBalancer \
807
+ --wait \
808
+ --show-url
809
+
810
+ # Complex deployment with multiple features
811
+ k8s-helper apply my-app nginx:latest \
812
+ --replicas 3 \
813
+ --port 8080 \
814
+ --service-type LoadBalancer \
815
+ --env "ENV=production,DEBUG=false" \
816
+ --labels "app=my-app,version=v1.0" \
817
+ --init-container "migrate:migrate-tool:latest:migrate up" \
818
+ --init-env "DB_HOST=postgres,DB_PORT=5432" \
819
+ --secret "db-secret:/etc/db" \
820
+ --pvc "app-storage:/var/data" \
821
+ --wait \
822
+ --show-url
823
+ ```
824
+
705
825
  ## Real-World Examples
706
826
 
707
827
  ### 1. Simple Web Application
@@ -0,0 +1,11 @@
1
+ k8s_helper/__init__.py,sha256=_xVS6ZvcjRkEujoKACtnSelsuAF9P1Hl36ALwrglsJo,2666
2
+ k8s_helper/cli.py,sha256=yphZTElwRv873GcYwAQDoonBK_qbj9VSS3Q8fo1aFIE,38671
3
+ k8s_helper/config.py,sha256=P7YdfyvCHprrNs2J9DRb3RrClylfTTh5hfTtDzLug0A,6867
4
+ k8s_helper/core.py,sha256=6qo-IqyL3Obgl4lP2DTXvikIAYLTglb9V9i4FaDVdF4,48991
5
+ k8s_helper/utils.py,sha256=wYgTd5ktyuI-EiVcfW7FrxA7MzXY5odrEKQgmMVdueY,9496
6
+ k8s_helper_cli-0.2.2.dist-info/licenses/LICENSE,sha256=tXPvVl3gLVc6e0qCEoLH9KjeA7z4JVL78UybpvGtBCw,1096
7
+ k8s_helper_cli-0.2.2.dist-info/METADATA,sha256=6eMV6fBAxMNN1dABhXQwl3dC0AlU5RzqgxdLEdDWvHg,26956
8
+ k8s_helper_cli-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ k8s_helper_cli-0.2.2.dist-info/entry_points.txt,sha256=IoCMWUZ6mn90LwzQzEy5YkWOwvogDdZ6ycqUWAzCFTQ,50
10
+ k8s_helper_cli-0.2.2.dist-info/top_level.txt,sha256=x9A1jflyer-z2cFnkqk5B42juoH2q0fy5hkT9upsTG8,11
11
+ k8s_helper_cli-0.2.2.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- k8s_helper/__init__.py,sha256=Q2GcFYJIwXQ5EmkCG5Tm8NKEKU6e4pKvNsUD1PSZkxg,2666
2
- k8s_helper/cli.py,sha256=s7O2sxkdrrpVyZcqL9tEQg4gYytkmBSzESqiflx-Xc4,18722
3
- k8s_helper/config.py,sha256=P7YdfyvCHprrNs2J9DRb3RrClylfTTh5hfTtDzLug0A,6867
4
- k8s_helper/core.py,sha256=gCQkJSEQ3_ectExB9h1rFvI56Egysg50eVgYtpfquH0,21066
5
- k8s_helper/utils.py,sha256=wYgTd5ktyuI-EiVcfW7FrxA7MzXY5odrEKQgmMVdueY,9496
6
- k8s_helper_cli-0.2.0.dist-info/licenses/LICENSE,sha256=tXPvVl3gLVc6e0qCEoLH9KjeA7z4JVL78UybpvGtBCw,1096
7
- k8s_helper_cli-0.2.0.dist-info/METADATA,sha256=Q4WVmlwoAhp5IT1vgiOGOB-HHv1Xof3uwgpHQpapbUM,23379
8
- k8s_helper_cli-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- k8s_helper_cli-0.2.0.dist-info/entry_points.txt,sha256=IoCMWUZ6mn90LwzQzEy5YkWOwvogDdZ6ycqUWAzCFTQ,50
10
- k8s_helper_cli-0.2.0.dist-info/top_level.txt,sha256=x9A1jflyer-z2cFnkqk5B42juoH2q0fy5hkT9upsTG8,11
11
- k8s_helper_cli-0.2.0.dist-info/RECORD,,