Skip to content

Instantly share code, notes, and snippets.

@yudapc
Created August 22, 2022 15:09
Show Gist options
  • Save yudapc/9a7bec395963177e99d2be80d8ea168e to your computer and use it in GitHub Desktop.
Save yudapc/9a7bec395963177e99d2be80d8ea168e to your computer and use it in GitHub Desktop.
Kubernetes
Kubernetes
Create secret:
kubectl create secret generic <secret-name> --from-literal=username=<username> --from-literal=username=<password> --from-literal=address=<ip-address>
Create Deployment:
kubectl create deployment <deployment-name> --image <docker-image-name> --dry-run=client -o yaml > deployment.yaml
Create Service:
kubectl expose deployment <deployment-name> --type LoadBalancer --port 80 --dry-run=client -o yaml > loadbalancer.yml
Source: https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/application/wordpress/wordpress-deployment.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment