Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #21 from hello2mao/master
Browse files Browse the repository at this point in the history
rm file and modify ip
  • Loading branch information
hello2mao authored Dec 28, 2018
2 parents bc8098d + 2d61d5a commit 9fcf089
Show file tree
Hide file tree
Showing 28 changed files with 21 additions and 5,456 deletions.
10 changes: 5 additions & 5 deletions docs/controllers/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Get more info about Service:
```
kubectl get svc nginx-service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx-service LoadBalancer 172.18.127.136 180.76.177.103 80:30601/TCP 1m
nginx-service LoadBalancer 1.1.1.1 8.8.8.8 80:30601/TCP 1m
```
So, the EIP is `180.76.177.103`
So, the EIP is `8.8.8.8`

## HTTP loadbalancer with loadBalancerIP
If loadBalancerIP is specified, the load-balancer will be created with the user-specified loadBalancerIP:
Expand All @@ -28,7 +28,7 @@ Get more info about Service:
```
kubectl get svc nginx-service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx-service LoadBalancer 172.18.127.136 178.11.24.19 80:30601/TCP 1m
nginx-service LoadBalancer 1.1.1.1 8.8.8.8 80:30601/TCP 1m
```
As you can see, the EXTERNAL-IP is the user-specified loadBalancerIP.

Expand All @@ -44,6 +44,6 @@ Get more info about Service:
```
kubectl get svc nginx-service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx-service LoadBalancer 172.18.127.136 192.168.9.222 80:30601/TCP 1m
nginx-service LoadBalancer 1.1.1.1 2.2.2.2 80:30601/TCP 1m
```
As you can see, the EXTERNAL-IP `192.168.9.222` can only be accessed inside the VPC.
As you can see, the EXTERNAL-IP `2.2.2.2` can only be accessed inside the VPC.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
app: nginx
type: LoadBalancer
# here set your own EIP
loadBalancerIP: 178.11.24.19
loadBalancerIP: 8.8.8.8
ports:
- name: http
port: 80
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ExecStart=/opt/kube/bin/kube-cloud-controller-manager \
--allocate-node-cidrs=true \
--cloud-config=/etc/kubernetes/cloud.config \
--cloud-provider=cce \
--cluster-cidr=172.29.0.0/16 \
--cluster-cidr=172.0.0.1/16 \
--cluster-name=kubernetes \
--kubeconfig=/root/.kube/config \
--leader-elect=true \
Expand Down
10 changes: 5 additions & 5 deletions docs/example-manifests/cce-kube-apiserver-systemd-manifest
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ After=etcd.service
[Service]
ExecStart=/opt/kube/bin/kube-apiserver \
--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota,DefaultTolerationSeconds,PodPreset,Initializers \
--advertise-address=100.0.0.59 \
--advertise-address=127.0.0.1 \
--allow-privileged=true \
--apiserver-count=3 \
--authorization-mode=RBAC,Node \
--bind-address=100.0.0.59 \
--bind-address=127.0.0.1 \
--client-ca-file=/etc/kubernetes/pki/ca.pem \
--cloud-config=/etc/kubernetes/cloud.config \
--enable-swagger-ui=true \
--etcd-cafile=/etc/etcd/ssl/ca.pem \
--etcd-certfile=/etc/etcd/ssl/etcd.pem \
--etcd-keyfile=/etc/etcd/ssl/etcd-key.pem \
--etcd-servers=https://100.0.0.58:2379,https://100.0.0.60:2379,https://100.0.0.59:2379 \
--etcd-servers=https://127.0.0.1:2379,https://127.0.0.1:2379,https://127.0.0.1:2379 \
--enable-bootstrap-token-auth=true \
--external-hostname=100.0.0.59 \
--external-hostname=127.0.0.1 \
--feature-gates=DevicePlugins=true,RotateKubeletServerCertificate=true,MountPropagation=true,CSIPersistentVolume=true \
--insecure-port=0 \
--logtostderr=true \
--runtime-config=settings.k8s.io/v1alpha1=true,admissionregistration.k8s.io/v1alpha1=true,storage.k8s.io/v1alpha1=true \
--secure-port=6443 \
--service-account-key-file=/etc/kubernetes/pki/ca-key.pem \
--service-cluster-ip-range=172.16.0.0/16 \
--service-cluster-ip-range=127.0.0.1/16 \
--storage-backend=etcd3 \
--tls-cert-file=/etc/kubernetes/pki/apiserver.pem \
--tls-private-key-file=/etc/kubernetes/pki/apiserver-key.pem \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ After=kube-apiserver.service
ExecStart=/opt/kube/bin/kube-controller-manager \
--allocate-node-cidrs=true \
--cloud-config=/etc/kubernetes/cloud.config \
--cluster-cidr=172.29.0.0/16 \
--cluster-cidr=172.1.0.1/16 \
--cluster-name=kubernetes \
--cluster-signing-cert-file=/etc/kubernetes/pki/ca.pem \
--cluster-signing-key-file=/etc/kubernetes/pki/ca-key.pem \
Expand All @@ -17,11 +17,11 @@ ExecStart=/opt/kube/bin/kube-controller-manager \
--kubeconfig=/etc/kubernetes/controller-manager.conf \
--leader-elect=true \
--logtostderr=true \
--master=https://100.0.0.59:6443 \
--master=https://127.0.0.1:6443 \
--root-ca-file=/etc/kubernetes/pki/ca.pem \
--route-reconciliation-period=50s \
--service-account-private-key-file=/etc/kubernetes/pki/ca-key.pem \
--service-cluster-ip-range=172.16.0.0/16 \
--service-cluster-ip-range=172.0.0.1/16 \
--use-service-account-credentials=true \
--v=4
Restart=always
Expand Down
8 changes: 4 additions & 4 deletions docs/example-manifests/cce-kubelet-systemd-manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ Requires=docker.service

[Service]
ExecStart=/opt/kube/bin/kubelet \
--address=192.168.3.16 \
--address=127.0.0.1 \
--allow-privileged=true \
--client-ca-file=/etc/kubernetes/pki/ca.pem \
--cloud-config=/etc/kubernetes/cloud.config \
--cloud-provider=external \
--cluster-dns=172.16.0.10 \
--cluster-dns=127.0.0.1 \
--cluster-domain=cluster.local \
--docker-root=/var/lib/docker \
--fail-swap-on=false \
--feature-gates=DevicePlugins=true,RotateKubeletServerCertificate=true,MountPropagation=true,CSIPersistentVolume=true \
--hostname-override=192.168.3.16 \
--hostname-override=127.0.0.1 \
--kubeconfig=/etc/kubernetes/kubelet.conf \
--logtostderr=true \
--network-plugin=kubenet \
--non-masquerade-cidr=172.29.0.0/16 \
--non-masquerade-cidr=127.0.0.1/16 \
--pod-infra-container-image=hub-readonly.baidubce.com/public/pause:2.0 \
--pod-manifest-path=/etc/kubernetes/manifests \
--anonymous-auth=false \
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ IP which you can use to connect to your service.
```bash
$ kubectl get svc --watch
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx-service 10.96.97.137 129.213.12.174 80:30274/TCP 5m
nginx-service 1.1.1.1 8.8.8.8 80:30274/TCP 5m
```

You can now access your service via the provisioned load balancer

```bash
$ curl -i http://129.213.12.174
$ curl -i http://8.8.8.8
```
116 changes: 0 additions & 116 deletions pkg/sdk/bcc/cds_test.go

This file was deleted.

116 changes: 0 additions & 116 deletions pkg/sdk/bcc/client_test.go

This file was deleted.

Loading

0 comments on commit 9fcf089

Please sign in to comment.