GitHub OAuth第三方登录
前言
OAuth分1.0、1.0A、2.0三个版本,前二者已经淘汰以下所介绍的都是指2.0版本。
本文将以第三方网站获取GitHub代码仓库为例,简述OAuth的运作流程。
OAuth分1.0、1.0A、2.0三个版本,前二者已经淘汰以下所介绍的都是指2.0版本。
本文将以第三方网站获取GitHub代码仓库为例,简述OAuth的运作流程。
apiVersion: apps/v1
kind: Deployment
metadata:
labels: &id001
app: wordpress-demo-mysql
app_id: '262'
internal_name: wordpress-demo-mysql.wordpress-demo-mysql
name: wordpress-demo-mysql.wordpress-demo-mysql
spec:
replicas: 1
selector:
matchLabels: *id001
template:
metadata:
labels: *id001
spec:
containers:
- image: 47.75.159.100:5000/wordpress-demo/wordpress-demo-mysql-pure:5.7
name: mysql
ports:
- containerPort: 3306
name: mysql
protocol: TCP
env:
- name: MYSQL_ROOT_PASSWORD
value: sqsm1234
在我们的实际使用过程中,如果想让服务能从外部访问,就会使用到NodePort服务类型。默认的选择了NodePort类型之后,端口是从30000-32767范围内随机分配,就算用户自行指定其他端口号,也会报如下错误:
The Service "test" is invalid: spec.ports[0].nodePort: Invalid value: 7712: provided port is not in the valid range. The range of valid ports is 30000-32767
Pod一直处于ContainerCreating状态
[root@k8scluster2master ~]# kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE
abc.fgg-75b769789d-7dmjs 0/1 ContainerCreating 0 1h <none> k8scluster2node2
abc.fgg-75b769789d-f8pq2 0/1 ContainerCreating 0 1h <none> k8scluster2node2
abc.fgg-75b769789d-hzwrs 0/1 ContainerCreating 0 1h <none> k8scluster2node2
abc.fgg-75b769789d-jrzbp 0/1 ContainerCreating 0 1h <none> k8scluster2node2
abc.sdfdcard-67676989bd-7p7wf 0/1 ContainerCreating 0 1h <none> k8scluster2node2
default-http-backend-5c6d95c48-bpk54 0/1 ContainerCreating 0 1h <none> k8scluster2node2
game2.tgame-7bd6d45df8-n2v6h 0/1 ContainerCreating 0 1h <none> k8scluster2node2
game2.tgame-7bd6d45df8-tbdl7 0/1 ContainerCreating 0 1h <none> k8scluster2node2
ido.ido-57489d4b67-mrxs2 0/1 ContainerCreating 0 1h <none> k8scluster2node2
ido.ido-57489d4b67-v2rvq 0/1 ContainerCreating 0 1h <none> k8scluster2node2
nginx-ingress-controller-6c9fcdf8d9-dt8b6 0/1 ContainerCreating 0 1h <none> k8scluster2node2
shireapp.game2048-d64d84d54-6vvqg 0/1 ContainerCreating 0 1h <none> k8scluster2node2
shireapp.game2048-d64d84d54-qd9v8 0/1 ContainerCreating 0 1h <none> k8scluster2node2
shireapp.game2048-d64d84d54-t9sbz 0/1 ContainerCreating 0 1h <none> k8scluster2node2
使用阿里云主机通常会通过命令hostname -b
7月 04 09:46:50 k8scluster2master kubelet[1573]: I0704 09:46:50.750118 1573 kubelet_node_status.go:82] Attempting to register node izj6cgkv35o1qg19b4t96iz
7月 04 09:46:50 k8scluster2master kubelet[1573]: E0704 09:46:50.751935 1573 kubelet_node_status.go:106] Unable to register node "izj6cgkv35o1qg19b4t96iz" with API server: nodes "izj6cgkv35o1qg19b4t96iz" is forbidden: node "k8scluster2master" cannot modify node "izj6cgkv35o1qg19b4t96iz"