Horje
kubernetes pending loadballancer Code Example
kubernetes pending loadballancer
...
spec:
  type: LoadBalancer
  externalIPs:
  - 192.168.0.10
kubernetes pending loadballancer
$ kubectl run user-login --replicas=2 --labels="run=user-login" --image=kingslayerr/teamproject:version2  --port=5000

$ kubectl expose deployment user-login --type=NodePort --name=user-login-service

$ kubectl describe services user-login-service
kubernetes pending loadballancer
kubectl patch svc <svc-name> -n <namespace> -p '{"spec": {"type": "LoadBalancer", "externalIPs":["172.31.71.218"]}}'
kubernetes pending loadballancer

If it is your private k8s cluster, MetalLB would be a better fit. Below are the steps.

Step 1: Install MetalLB in your cluster

kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/metallb.yaml
# On first install only
kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"
Step 2: Configure it by using a configmap

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 172.42.42.100-172.42.42.105 #Update this with your Nodes IP range 




Shell

Related
gcc on ubuntu 20.04 Code Example gcc on ubuntu 20.04 Code Example
tar append Code Example tar append Code Example
retour chariot avec echo bash Code Example retour chariot avec echo bash Code Example
install zabbix Code Example install zabbix Code Example
proxy ssl certificate to jira centos8 Code Example proxy ssl certificate to jira centos8 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11